Skip to content

Commit da57f13

Browse files
committedMar 25, 2021
*.go: Commit changes after running 'make lint' locally
1 parent 607d373 commit da57f13

18 files changed

+62
-53
lines changed
 

‎pkg/api/grpc_health_v1/health.pb.go

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/api/grpc_health_v1/health_grpc.pb.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/api/registry.pb.go

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/api/registry_grpc.pb.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkg/image/containerdregistry/resolver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func NewResolver(configDir string, insecure bool, roots *x509.CertPool) (remotes
2828
ExpectContinueTimeout: 5 * time.Second,
2929
TLSClientConfig: &tls.Config{
3030
InsecureSkipVerify: false,
31-
RootCAs: roots,
31+
RootCAs: roots,
3232
},
3333
}
3434

@@ -60,7 +60,7 @@ func NewResolver(configDir string, insecure bool, roots *x509.CertPool) (remotes
6060
}
6161

6262
opts := docker.ResolverOptions{
63-
Hosts: docker.ConfigureDefaultRegistries(regopts...),
63+
Hosts: docker.ConfigureDefaultRegistries(regopts...),
6464
Headers: headers,
6565
}
6666

‎pkg/image/registry.go

-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ type Registry interface {
2929
// If it exists, it's used as the base image.
3030
// Pack(ctx context.Context, ref Reference, from io.Reader) (next string, err error)
3131
}
32-

‎pkg/lib/bundle/interfaces.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ func NewImageValidator(registry image.Registry, logger *logrus.Entry, options ..
2525
return imageValidator{
2626
registry: registry,
2727
logger: logger,
28-
optional: options,
28+
optional: options,
2929
}
3030
}

‎pkg/lib/dns/nsswitch_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package dns
22

33
import (
4-
"github.com/stretchr/testify/require"
54
"io/ioutil"
65
"os"
76
"testing"
7+
8+
"github.com/stretchr/testify/require"
89
)
910

1011
func TestEnsureNsswitch(t *testing.T) {

‎pkg/lib/indexer/indexer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestGetBundlesToExport(t *testing.T) {
2929
t.Fatalf("creating querier: %s", err)
3030
}
3131

32-
bundleMap, err := getBundlesToExport(dbQuerier, []string {"etcd"})
32+
bundleMap, err := getBundlesToExport(dbQuerier, []string{"etcd"})
3333
if err != nil {
3434
t.Fatalf("exporting bundles from db: %s", err)
3535
}

‎pkg/registry/bundlegraphloader_test.go

+31-30
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package registry
22

33
import (
44
"encoding/json"
5-
"github.com/blang/semver"
65
"testing"
76

7+
"github.com/blang/semver"
8+
89
"github.com/stretchr/testify/assert"
910
"github.com/stretchr/testify/require"
1011
)
@@ -315,55 +316,55 @@ func TestBundleGraphLoader(t *testing.T) {
315316
}
316317

317318
func TestIsSkipPatchCandidate(t *testing.T) {
318-
tests := []struct{
319-
name string
320-
added string
321-
compare string
322-
expected bool
319+
tests := []struct {
320+
name string
321+
added string
322+
compare string
323+
expected bool
323324
commutative bool
324325
}{
325326
{
326-
name: "equal versions",
327-
added: "0.0.0",
328-
compare: "0.0.0",
329-
expected: false,
327+
name: "equal versions",
328+
added: "0.0.0",
329+
compare: "0.0.0",
330+
expected: false,
330331
commutative: true,
331332
},
332333
{
333-
name: "do not accept different major/minor version",
334-
added: "0.1.0",
335-
compare: "0.2.0",
336-
expected: false,
334+
name: "do not accept different major/minor version",
335+
added: "0.1.0",
336+
compare: "0.2.0",
337+
expected: false,
337338
commutative: true,
338339
},
339340
{
340-
name: "accept larger patch version",
341-
added: "0.0.1",
342-
compare: "0.0.0",
341+
name: "accept larger patch version",
342+
added: "0.0.1",
343+
compare: "0.0.0",
343344
expected: true,
344345
},
345346
{
346-
name: "accept patch version without pre-release",
347-
added: "0.0.0",
348-
compare: "0.0.0-1",
347+
name: "accept patch version without pre-release",
348+
added: "0.0.0",
349+
compare: "0.0.0-1",
349350
expected: true,
350351
},
351352
{
352-
name: "accept longer pre-release with same prefix",
353-
added: "0.0.1-1.2",
354-
compare: "0.0.1-1",
353+
name: "accept longer pre-release with same prefix",
354+
added: "0.0.1-1.2",
355+
compare: "0.0.1-1",
355356
expected: true,
356357
},
357358
{
358-
name: "accept numerically larger pre-release",
359-
added: "0.0.1-11",
360-
compare: "0.0.1-2",
359+
name: "accept numerically larger pre-release",
360+
added: "0.0.1-11",
361+
compare: "0.0.1-2",
361362
expected: true,
362363
},
363364
{
364-
name: "accept lexicographically larger pre-release",
365-
added: "0.0.1-beta.1",
366-
compare: "0.0.1-alpha.1",
365+
name: "accept lexicographically larger pre-release",
366+
added: "0.0.1-beta.1",
367+
compare: "0.0.1-alpha.1",
367368
expected: true,
368369
},
369370
}
@@ -382,4 +383,4 @@ func TestIsSkipPatchCandidate(t *testing.T) {
382383
}
383384
})
384385
}
385-
}
386+
}

‎pkg/registry/csv_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/stretchr/testify/assert"
99
"github.com/stretchr/testify/require"
10-
"k8s.io/apimachinery/pkg/apis/meta/v1"
10+
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111
)
1212

1313
func TestClusterServiceVersion_GetApiServiceDefinitions(t *testing.T) {

‎pkg/registry/decode_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package registry
22

33
import (
4-
"github.com/stretchr/testify/assert"
5-
"github.com/stretchr/testify/require"
64
"io"
7-
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
85
"os"
96
"testing"
7+
8+
"github.com/stretchr/testify/assert"
9+
"github.com/stretchr/testify/require"
10+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1011
)
1112

1213
func TestDecodeUnstructured(t *testing.T) {

‎pkg/server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type RegistryServer struct {
1515
var _ api.RegistryServer = &RegistryServer{}
1616

1717
func NewRegistryServer(store registry.Query) *RegistryServer {
18-
return &RegistryServer{UnimplementedRegistryServer: api.UnimplementedRegistryServer{}, store: store}
18+
return &RegistryServer{UnimplementedRegistryServer: api.UnimplementedRegistryServer{}, store: store}
1919
}
2020

2121
func (s *RegistryServer) ListPackages(req *api.ListPackageRequest, stream api.Registry_ListPackagesServer) error {

‎pkg/sqlite/db.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sqlite
22

33
import (
44
"database/sql"
5+
56
_ "github.com/mattn/go-sqlite3"
67
)
78

@@ -19,11 +20,10 @@ func OpenReadOnly(fileName string) (*sql.DB, error) {
1920
// EnableForeignKeys appends the option to enable foreign keys on connections
2021
// note that without this option, PRAGMAs about foreign keys will lie.
2122
func EnableForeignKeys(fileName string) string {
22-
return "file:"+fileName+"?_foreign_keys=on"
23+
return "file:" + fileName + "?_foreign_keys=on"
2324
}
2425

2526
// Immutable appends the option to mark the db immutable on connections
2627
func EnableImmutable(fileName string) string {
27-
return "file:"+fileName+"?immutable=true"
28+
return "file:" + fileName + "?immutable=true"
2829
}
29-

‎pkg/sqlite/migrations/006_associate_apis_with_bundle.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package migrations
33
import (
44
"context"
55
"database/sql"
6+
67
"github.com/operator-framework/operator-registry/pkg/registry"
78
)
89

‎pkg/sqlite/migrations/006_associate_apis_with_bundle_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import (
44
"context"
55
"database/sql"
66
"fmt"
7-
"github.com/operator-framework/operator-registry/pkg/registry"
87
"testing"
98

9+
"github.com/operator-framework/operator-registry/pkg/registry"
10+
1011
"github.com/stretchr/testify/require"
1112

1213
"github.com/operator-framework/operator-registry/pkg/sqlite/migrations"

‎pkg/sqlite/remove_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package sqlite
22

33
import (
44
"context"
5-
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
65
"testing"
76

7+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
8+
89
"github.com/operator-framework/operator-registry/pkg/image"
910
"github.com/operator-framework/operator-registry/pkg/registry"
1011

‎tools.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
package tools
44

55
import (
6-
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
7-
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
86
_ "github.com/grpc-ecosystem/grpc-health-probe"
97
_ "github.com/maxbrunsfeld/counterfeiter/v6"
108
_ "github.com/onsi/ginkgo/ginkgo"
11-
)
9+
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
10+
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
11+
)

0 commit comments

Comments
 (0)
Please sign in to comment.