From dcfd45590906fe8ebed4814f6effcdc2564848e4 Mon Sep 17 00:00:00 2001 From: Sebastian Laskawiec Date: Mon, 8 Jun 2020 13:36:07 +0200 Subject: [PATCH] KEYCLOAK-14355-Linter-fixes --- .github/workflows/lint.yml | 11 +- .golangci.yml | 13 +- Makefile | 10 +- cmd/manager/main.go | 7 +- go.mod | 26 +-- go.sum | 97 +---------- pkg/common/client.go | 18 +-- pkg/common/cluster_actions.go | 30 ++-- pkg/common/cluster_state.go | 2 +- pkg/common/readiness_checks.go | 5 +- .../keycloak/keycloak_controller.go | 2 +- .../keycloak/keycloak_migrations_test.go | 4 +- .../keycloakbackup_controller.go | 9 +- .../keycloakclient_controller.go | 4 +- .../keycloakrclient_reconciler.go | 2 +- .../keycloakuser/keycloakuser_controller.go | 2 +- pkg/model/constants.go | 4 +- pkg/model/postgresql_service_endpoints.go | 2 +- pkg/model/util.go | 2 +- test/e2e/keycloak_client_test.go | 6 +- test/e2e/keycloak_main_test.go | 2 + test/e2e/keycloaks_test.go | 7 +- test/e2e/utils.go | 22 +-- .../pkg/restmapper/dynamicrestmapper.go | 152 ------------------ vendor/modules.txt | 4 +- .../controller-runtime/pkg/runtime/log/log.go | 58 ------- 26 files changed, 90 insertions(+), 411 deletions(-) delete mode 100644 vendor/github.com/operator-framework/operator-sdk/pkg/restmapper/dynamicrestmapper.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log/log.go diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a4240a30..1c9141a8b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,9 +5,12 @@ jobs: name: lint runs-on: ubuntu-latest steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: 1.13 + id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: golangci-lint - uses: actions-contrib/golangci-lint@v1 - with: - golangci_lint_version: v1.26 \ No newline at end of file + - name: Lint + run: make setup/linter code/lint \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index c2cdbda07..0f0f6940d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,22 +1,21 @@ linters-settings: golint: - # set the confidence level of a problem before it is reported. Setting it to 0 will show every issue from golint. min-confidence: 0 gocyclo: - # a minimal complexity of function to report it - min-complexity: 60 + min-complexity: 70 goconst: - # only report strings with the minimum given length min-len: 2 - # report from how many occurrence min-occurrences: 2 funlen: - # We have very long type definitions for K8s resources lines: 200 + statements: 70 run: modules-download-mode: vendor +service: + golangci-lint-version: 1.26.0 + linters: enable-all: true disable: @@ -29,3 +28,5 @@ linters: - wsl - godox - gomnd + - testpackage + - godot diff --git a/Makefile b/Makefile index b448393fb..8259889a1 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,11 @@ setup/operator-sdk: @echo Installing Operator SDK @curl -Lo operator-sdk ${OPERATOR_SDK_DOWNLOAD_URL} && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ +.PHONY: setup/linter +setup/linter: + @echo Installing Linter + @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.26.0 + .PHONY: code/run code/run: @operator-sdk run --local --namespace=${NAMESPACE} @@ -139,10 +144,7 @@ code/fix: .PHONY: code/lint code/lint: @echo "--> Running golangci-lint" - @which golangci-lint 2>/dev/null ; if [ $$? -eq 1 ]; then \ - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0; \ - fi - golangci-lint run + @$(shell go env GOPATH)/bin/golangci-lint run --timeout 10m ############################## # CI # diff --git a/cmd/manager/main.go b/cmd/manager/main.go index d6c83361f..db86aea3a 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -8,6 +8,7 @@ import ( "runtime" "github.com/keycloak/keycloak-operator/version" + "github.com/pkg/errors" "github.com/keycloak/keycloak-operator/pkg/common" routev1 "github.com/openshift/api/route/v1" @@ -27,7 +28,6 @@ import ( "github.com/operator-framework/operator-sdk/pkg/leader" "github.com/operator-framework/operator-sdk/pkg/log/zap" "github.com/operator-framework/operator-sdk/pkg/metrics" - "github.com/operator-framework/operator-sdk/pkg/restmapper" sdkVersion "github.com/operator-framework/operator-sdk/version" "github.com/spf13/pflag" v1 "k8s.io/api/core/v1" @@ -102,7 +102,6 @@ func main() { // Create a new Cmd to provide shared dependencies and start components mgr, err := manager.New(cfg, manager.Options{ Namespace: namespace, - MapperProvider: restmapper.NewDynamicRESTMapper, MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), }) if err != nil { @@ -178,7 +177,7 @@ func main() { log.Info("Could not create ServiceMonitor object", "error", err.Error()) // If this operator is deployed to a cluster without the prometheus-operator running, it will return // ErrServiceMonitorNotPresent, which can be used to safely skip ServiceMonitor creation. - if err == metrics.ErrServiceMonitorNotPresent { + if errors.Is(err, metrics.ErrServiceMonitorNotPresent) { log.Info("Install prometheus-operator in your cluster to create ServiceMonitor objects", "error", err.Error()) } } @@ -194,7 +193,7 @@ func main() { func addMonitoringKeyLabelToOperatorService(ctx context.Context, cfg *rest.Config, service *v1.Service) error { if service == nil { - return fmt.Errorf("service doesn't exist") + return errors.Errorf("service doesn't exist") } kclient, err := client.New(cfg, client.Options{}) diff --git a/go.mod b/go.mod index d8100c5a8..b31af1141 100644 --- a/go.mod +++ b/go.mod @@ -2,65 +2,41 @@ module github.com/keycloak/keycloak-operator require ( cloud.google.com/go v0.57.0 // indirect - github.com/Djarvur/go-err113 v0.1.0 // indirect - github.com/bombsimon/wsl/v3 v3.1.0 // indirect github.com/coreos/prometheus-operator v0.34.0 - github.com/fatih/color v1.9.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/go-critic/go-critic v0.4.3 // indirect github.com/go-openapi/spec v0.19.6 - github.com/go-toolsmith/typep v1.0.2 // indirect github.com/golang/protobuf v1.4.2 // indirect - github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect github.com/golangci/golangci-lint v1.27.0 // indirect - github.com/golangci/misspell v0.3.5 // indirect - github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect github.com/google/go-cmp v0.4.1 // indirect - github.com/gostaticanalysis/analysisutil v0.0.3 // indirect github.com/integr8ly/grafana-operator/v3 v3.0.2-0.20200103111057-03d7fa884db4 - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/json-iterator/go v1.1.9 github.com/kr/text v0.2.0 // indirect - github.com/mattn/go-colorable v0.1.6 // indirect - github.com/mitchellh/mapstructure v1.3.1 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/onsi/ginkgo v1.12.0 // indirect github.com/onsi/gomega v1.9.0 // indirect github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible github.com/operator-framework/operator-sdk v0.15.1 - github.com/pelletier/go-toml v1.8.0 // indirect github.com/pkg/errors v0.9.1 github.com/rogpeppe/go-internal v1.5.2 // indirect - github.com/ryancurrah/gomodguard v1.1.0 // indirect github.com/sirupsen/logrus v1.6.0 - github.com/sourcegraph/go-diff v0.5.3 // indirect - github.com/spf13/cast v1.3.1 // indirect github.com/spf13/cobra v1.0.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.7.0 // indirect github.com/stretchr/testify v1.6.0 - github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect - github.com/tetafro/godot v0.4.2 // indirect - github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect golang.org/x/mod v0.3.0 // indirect golang.org/x/net v0.0.0-20200528225125-3c3fba18258b // indirect golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect - golang.org/x/tools v0.0.0-20200601175630-2caf76543d99 // indirect + golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6 // indirect google.golang.org/protobuf v1.24.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect - gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 // indirect - honnef.co/go/tools v0.0.1-2020.1.4 // indirect k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 k8s.io/client-go v12.0.0+incompatible k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d - mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 // indirect sigs.k8s.io/controller-runtime v0.4.0 - sourcegraph.com/sqs/pbtypes v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index c1e7932b9..cfe088cef 100644 --- a/go.sum +++ b/go.sum @@ -22,7 +22,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -63,8 +62,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157 h1:hY39LwQHh+1kaovmIjOrlqnXNX6tygSRfLkkK33IkZU= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/Djarvur/go-err113 v0.1.0 h1:uCRZZOdMQ0TZPHYTdYpoC0bLYJKPEHPUJ8MeAa51lNU= -github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= @@ -109,8 +106,6 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQY github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= @@ -123,11 +118,9 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -135,8 +128,6 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bombsimon/wsl/v3 v3.0.0 h1:w9f49xQatuaeTJFaNP4SpiWSR5vfT6IstPtM62JjcqA= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/bombsimon/wsl/v3 v3.1.0 h1:E5SRssoBgtVFPcYWUOFJEcgaySgdtTNYzsSKDOY7ss8= -github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= @@ -285,8 +276,6 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -311,8 +300,6 @@ github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-critic/go-critic v0.4.1 h1:4DTQfT1wWwLg/hzxwD9bkdhDQrdJtxe6DUTadPlrIeE= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= -github.com/go-critic/go-critic v0.4.3 h1:sGEEdiuvLV0OC7/yC6MnK3K6LCPBplspK45B0XVdFAc= -github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -415,9 +402,6 @@ github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUD github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU= @@ -500,8 +484,6 @@ github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgO github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d h1:pXTK/gkVNs7Zyy7WKgLXmpQ5bHTrq5GDsp8R9Qs67g0= -github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.27.0 h1:VYLx63qb+XJsHdZ27PMS2w5JZacN0XG8ffUwe7yQomo= @@ -514,14 +496,10 @@ github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29M github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 h1:XQKc8IYQOeRwVs36tDrEmTgDgP88d5iEURwpmtiAlOM= -github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= @@ -587,11 +565,8 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3 h1:iwp+5/UAyzQSFgQ4uR2sni99sJ8Eo9DEacKWM5pekIg= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gosuri/uitable v0.0.1/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -613,20 +588,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= @@ -636,10 +601,6 @@ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/heketi/heketi v0.0.0-20181109135656-558b29266ce0/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/heketi v9.0.0+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= @@ -671,8 +632,6 @@ github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a h1:Gmsqmapf github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3 h1:jNYPNLe3d8smommaoQlK7LOA5ESyUJJ+Wf79ZtA7Vp4= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= @@ -770,15 +729,10 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v0.0.0-20180605041737-f8471b0a71de/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -797,30 +751,21 @@ github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPx github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v0.0.0-20160614162101-5d001d020961/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.1 h1:cCBH2gTD2K0OtLlv/Y5H01VQCqmlDxz30kS5Y5bqfLA= -github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -917,18 +862,14 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= -github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -941,7 +882,6 @@ github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6/go.mod h1:NxmoDg/QLVWluQD github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -990,8 +930,6 @@ github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8 h1:DvnesvLtRPQOvaUbfXfh0tpMHg29by0H7F2U+QIkSu8= -github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= @@ -1015,13 +953,9 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.0.4 h1:oCreMAt9GuFXDe9jW4HBpc3GjdX3R/sUEcLAGh1zPx8= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= -github.com/ryancurrah/gomodguard v1.1.0 h1:DWbye9KyMgytn8uYpuHkwf0RHqAYO6Ay/D0TbCpPtVU= -github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.0.0-20150813023252-1b506fc7c24e/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/securego/gosec/v2 v2.3.0 h1:y/9mCF2WPDbSDpL3QDWZD3HHGrSYw0QSHnCqTfs4JPE= @@ -1073,8 +1007,6 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -github.com/sourcegraph/go-diff v0.5.3 h1:lhIKJ2nXLZZ+AfbHpYxTn0pXpNTTui0DX7DO3xeb1Zs= -github.com/sourcegraph/go-diff v0.5.3/go.mod h1:v9JDtjCE4HHHCZGId75rg8gkKKa98RVjBcBGsVmMmak= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -1084,8 +1016,6 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -1109,8 +1039,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1132,19 +1060,13 @@ github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= github.com/tetafro/godot v0.3.7 h1:+mecr7RKrUKB5UQ1gwqEMn13sDKTyDR8KNIquB9mm+8= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= -github.com/tetafro/godot v0.4.2 h1:Dib7un+rYJFUi8vN0Bk6EHheKy6fv6ZzFURHw75g6m8= -github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1217,7 +1139,6 @@ golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1347,13 +1268,11 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03i golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180117170059-2c42eef0765b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1385,14 +1304,12 @@ golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934 h1:u/E0NqCIWRDAo9WCFo6Ko49njPFDLSd3z+X1HgWDMpE= golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1461,7 +1378,6 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1480,11 +1396,10 @@ golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99 h1:deddXmhOJb/bvD/4M/j2AUMrhHeh6GkqykJSCWyTNVk= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6 h1:5Y8c5HBW6hBYnGEE3AbJPV0R8RsQmg1/eaJrpvasns0= +golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= @@ -1601,8 +1516,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -1644,8 +1557,6 @@ honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20191016110408-35e52d86657a h1:VVUE9xTCXP6KUPMf92cQmN88orz600ebexcRRaBTepQ= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 h1:kThoiqgMsSwBdMK/lPgjtYTsEjbUU9nXCA9DyU3feok= @@ -1729,8 +1640,6 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= -mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= -mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/letsencrypt v0.0.1/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1755,6 +1664,4 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= -sourcegraph.com/sqs/pbtypes v1.0.0 h1:f7lAwqviDEGvON4kRv0o5V7FT/IQK+tbkF664XMbP3o= -sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/common/client.go b/pkg/common/client.go index 3ea28a3af..7e94cd5ed 100644 --- a/pkg/common/client.go +++ b/pkg/common/client.go @@ -66,7 +66,7 @@ func (c *Client) create(obj T, resourcePath, resourceName string) (string, error defer res.Body.Close() if res.StatusCode != 201 && res.StatusCode != 204 { - return "", fmt.Errorf("failed to create %s: (%d) %s", resourceName, res.StatusCode, res.Status) + return "", errors.Errorf("failed to create %s: (%d) %s", resourceName, res.StatusCode, res.Status) } if resourceName == "client" { @@ -192,7 +192,7 @@ func (c *Client) FindUserByUsername(name, realm string) (*v1alpha1.KeycloakAPIUs return user, nil } } - return nil, errors.New("not found") + return nil, errors.Errorf("not found") }) if err != nil { return nil, err @@ -234,7 +234,7 @@ func (c *Client) get(resourcePath, resourceName string, unMarshalFunc func(body } if res.StatusCode != 200 { - return nil, fmt.Errorf("failed to GET %s: (%d) %s", resourceName, res.StatusCode, res.Status) + return nil, errors.Errorf("failed to GET %s: (%d) %s", resourceName, res.StatusCode, res.Status) } body, err := ioutil.ReadAll(res.Body) @@ -386,7 +386,7 @@ func (c *Client) update(obj T, resourcePath, resourceName string) error { defer res.Body.Close() if res.StatusCode < 200 || res.StatusCode > 299 { logrus.Errorf("failed to UPDATE %s %v", resourceName, res.Status) - return fmt.Errorf("failed to UPDATE %s: (%d) %s", resourceName, res.StatusCode, res.Status) + return errors.Errorf("failed to UPDATE %s: (%d) %s", resourceName, res.StatusCode, res.Status) } return nil @@ -452,7 +452,7 @@ func (c *Client) delete(resourcePath, resourceName string, obj T) error { logrus.Errorf("Resource %v/%v already deleted", resourcePath, resourceName) } if res.StatusCode != 204 && res.StatusCode != 404 { - return fmt.Errorf("failed to DELETE %s: (%d) %s", resourceName, res.StatusCode, res.Status) + return errors.Errorf("failed to DELETE %s: (%d) %s", resourceName, res.StatusCode, res.Status) } return nil @@ -504,7 +504,7 @@ func (c *Client) list(resourcePath, resourceName string, unMarshalListFunc func( defer res.Body.Close() if res.StatusCode < 200 || res.StatusCode > 299 { - return nil, fmt.Errorf("failed to LIST %s: (%d) %s", resourceName, res.StatusCode, res.Status) + return nil, errors.Errorf("failed to LIST %s: (%d) %s", resourceName, res.StatusCode, res.Status) } body, err := ioutil.ReadAll(res.Body) @@ -548,7 +548,7 @@ func (c *Client) ListClients(realmName string) ([]*v1alpha1.KeycloakAPIClient, e res, ok := result.([]*v1alpha1.KeycloakAPIClient) if !ok { - return nil, errors.New("error decoding list clients response") + return nil, errors.Errorf("error decoding list clients response") } return res, nil @@ -666,7 +666,7 @@ func (c *Client) Ping() error { logrus.Debugf("response status: %v, %v", res.StatusCode, res.Status) if res.StatusCode != 200 { - return fmt.Errorf("failed to ping, response status code: %v", res.StatusCode) + return errors.Errorf("failed to ping, response status code: %v", res.StatusCode) } defer res.Body.Close() @@ -711,7 +711,7 @@ func (c *Client) login(user, pass string) error { if tokenRes.Error != "" { logrus.Errorf("error with request: " + tokenRes.ErrorDescription) - return errors.New(tokenRes.ErrorDescription) + return errors.Errorf(tokenRes.ErrorDescription) } c.token = tokenRes.AccessToken diff --git a/pkg/common/cluster_actions.go b/pkg/common/cluster_actions.go index 688bc535d..f98398200 100644 --- a/pkg/common/cluster_actions.go +++ b/pkg/common/cluster_actions.go @@ -112,7 +112,7 @@ func (i *ClusterActionRunner) Update(obj runtime.Object) error { // Create a new realm using the keycloak api func (i *ClusterActionRunner) CreateRealm(obj *v1alpha1.KeycloakRealm) error { if i.keycloakClient == nil { - return errors.New("cannot perform realm create when client is nil") + return errors.Errorf("cannot perform realm create when client is nil") } _, err := i.keycloakClient.CreateRealm(obj) @@ -121,7 +121,7 @@ func (i *ClusterActionRunner) CreateRealm(obj *v1alpha1.KeycloakRealm) error { func (i *ClusterActionRunner) CreateClient(obj *v1alpha1.KeycloakClient, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform client create when client is nil") + return errors.Errorf("cannot perform client create when client is nil") } uid, err := i.keycloakClient.CreateClient(obj.Spec.Client, realm) @@ -137,7 +137,7 @@ func (i *ClusterActionRunner) CreateClient(obj *v1alpha1.KeycloakClient, realm s func (i *ClusterActionRunner) UpdateClient(obj *v1alpha1.KeycloakClient, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform client update when client is nil") + return errors.Errorf("cannot perform client update when client is nil") } return i.keycloakClient.UpdateClient(obj.Spec.Client, realm) } @@ -145,21 +145,21 @@ func (i *ClusterActionRunner) UpdateClient(obj *v1alpha1.KeycloakClient, realm s // Delete a realm using the keycloak api func (i *ClusterActionRunner) DeleteRealm(obj *v1alpha1.KeycloakRealm) error { if i.keycloakClient == nil { - return errors.New("cannot perform realm delete when client is nil") + return errors.Errorf("cannot perform realm delete when client is nil") } return i.keycloakClient.DeleteRealm(obj.Spec.Realm.Realm) } func (i *ClusterActionRunner) DeleteClient(obj *v1alpha1.KeycloakClient, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform client delete when client is nil") + return errors.Errorf("cannot perform client delete when client is nil") } return i.keycloakClient.DeleteClient(obj.Spec.Client.ID, realm) } func (i *ClusterActionRunner) CreateUser(obj *v1alpha1.KeycloakUser, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform user create when client is nil") + return errors.Errorf("cannot perform user create when client is nil") } // Create the user @@ -175,7 +175,7 @@ func (i *ClusterActionRunner) CreateUser(obj *v1alpha1.KeycloakUser, realm strin func (i *ClusterActionRunner) UpdateUser(obj *v1alpha1.KeycloakUser, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform user update when client is nil") + return errors.Errorf("cannot perform user update when client is nil") } err := i.keycloakClient.UpdateUser(&obj.Spec.User, realm) @@ -188,7 +188,7 @@ func (i *ClusterActionRunner) UpdateUser(obj *v1alpha1.KeycloakUser, realm strin func (i *ClusterActionRunner) DeleteUser(id, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform user delete when client is nil") + return errors.Errorf("cannot perform user delete when client is nil") } return i.keycloakClient.DeleteUser(id, realm) } @@ -196,14 +196,14 @@ func (i *ClusterActionRunner) DeleteUser(id, realm string) error { // Check if Keycloak is available func (i *ClusterActionRunner) Ping() error { if i.keycloakClient == nil { - return errors.New("cannot perform keycloak ping when client is nil") + return errors.Errorf("cannot perform keycloak ping when client is nil") } return i.keycloakClient.Ping() } func (i *ClusterActionRunner) AssignRealmRole(obj *v1alpha1.KeycloakUserRole, userID, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform role assign when client is nil") + return errors.Errorf("cannot perform role assign when client is nil") } _, err := i.keycloakClient.CreateUserRealmRole(obj, realm, userID) @@ -212,14 +212,14 @@ func (i *ClusterActionRunner) AssignRealmRole(obj *v1alpha1.KeycloakUserRole, us func (i *ClusterActionRunner) RemoveRealmRole(obj *v1alpha1.KeycloakUserRole, userID, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform role remove when client is nil") + return errors.Errorf("cannot perform role remove when client is nil") } return i.keycloakClient.DeleteUserRealmRole(obj, realm, userID) } func (i *ClusterActionRunner) AssignClientRole(obj *v1alpha1.KeycloakUserRole, clientID, userID, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform role assign when client is nil") + return errors.Errorf("cannot perform role assign when client is nil") } _, err := i.keycloakClient.CreateUserClientRole(obj, realm, clientID, userID) @@ -228,7 +228,7 @@ func (i *ClusterActionRunner) AssignClientRole(obj *v1alpha1.KeycloakUserRole, c func (i *ClusterActionRunner) RemoveClientRole(obj *v1alpha1.KeycloakUserRole, clientID, userID, realm string) error { if i.keycloakClient == nil { - return errors.New("cannot perform role remove when client is nil") + return errors.Errorf("cannot perform role remove when client is nil") } return i.keycloakClient.DeleteUserClientRole(obj, realm, clientID, userID) } @@ -236,7 +236,7 @@ func (i *ClusterActionRunner) RemoveClientRole(obj *v1alpha1.KeycloakUserRole, c // Delete a realm using the keycloak api func (i *ClusterActionRunner) ApplyOverrides(obj *v1alpha1.KeycloakRealm) error { if i.keycloakClient == nil { - return errors.New("cannot perform realm configure when client is nil") + return errors.Errorf("cannot perform realm configure when client is nil") } for _, override := range obj.Spec.RealmOverrides { @@ -265,7 +265,7 @@ func (i *ClusterActionRunner) configureBrowserRedirector(provider, flow string, } } if redirectorExecutionID == "" { - return errors.New("'identity-provider-redirector' was not found in the list of executions of the 'browser' flow") + return errors.Errorf("'identity-provider-redirector' was not found in the list of executions of the 'browser' flow") } var authenticatorConfig *v1alpha1.AuthenticatorConfig diff --git a/pkg/common/cluster_state.go b/pkg/common/cluster_state.go index ad16d34f0..7dac75646 100644 --- a/pkg/common/cluster_state.go +++ b/pkg/common/cluster_state.go @@ -57,7 +57,7 @@ type ClusterState struct { KeycloakProbes *v1.ConfigMap } -func (i *ClusterState) Read(context context.Context, cr *kc.Keycloak, controllerClient client.Client) error { //nolint +func (i *ClusterState) Read(context context.Context, cr *kc.Keycloak, controllerClient client.Client) error { stateManager := GetStateManager() routeKindExists, keyExists := stateManager.GetState(RouteKind).(bool) diff --git a/pkg/common/readiness_checks.go b/pkg/common/readiness_checks.go index c4de37ef0..24bc43b79 100644 --- a/pkg/common/readiness_checks.go +++ b/pkg/common/readiness_checks.go @@ -1,9 +1,8 @@ package common import ( - "errors" - v1 "github.com/openshift/api/route/v1" + "github.com/pkg/errors" v12 "k8s.io/api/apps/v1" v13 "k8s.io/api/batch/v1" ) @@ -48,7 +47,7 @@ func IsDeploymentReady(deployment *v12.Deployment) (bool, error) { for _, condition := range deployment.Status.Conditions { // One failure condition exists, if this exists, return the Reason if condition.Type == v12.DeploymentReplicaFailure { - return false, errors.New(condition.Reason) + return false, errors.Errorf(condition.Reason) // A successful deployment will have the progressing condition type as true } else if condition.Type == v12.DeploymentProgressing && condition.Status != ConditionStatusSuccess { return false, nil diff --git a/pkg/controller/keycloak/keycloak_controller.go b/pkg/controller/keycloak/keycloak_controller.go index 5751e6b79..8a0ce55b8 100644 --- a/pkg/controller/keycloak/keycloak_controller.go +++ b/pkg/controller/keycloak/keycloak_controller.go @@ -235,7 +235,7 @@ func (r *ReconcileKeycloak) ManageSuccess(instance *v1alpha1.Keycloak, currentSt } // Make this keycloaks url public to allow access via the client - if currentState.KeycloakRoute != nil && currentState.KeycloakRoute.Spec.Host != "" { + if currentState.KeycloakRoute != nil && currentState.KeycloakRoute.Spec.Host != "" { //nolint instance.Status.InternalURL = fmt.Sprintf("https://%v", currentState.KeycloakRoute.Spec.Host) } else if currentState.KeycloakIngress != nil && currentState.KeycloakIngress.Spec.Rules[0].Host != "" { instance.Status.InternalURL = fmt.Sprintf("https://%v", currentState.KeycloakIngress.Spec.Rules[0].Host) diff --git a/pkg/controller/keycloak/keycloak_migrations_test.go b/pkg/controller/keycloak/keycloak_migrations_test.go index 8c28ad884..0209853ad 100644 --- a/pkg/controller/keycloak/keycloak_migrations_test.go +++ b/pkg/controller/keycloak/keycloak_migrations_test.go @@ -58,7 +58,7 @@ func TestKeycloakMigrations_Test_Migrating_Image(t *testing.T) { keycloakDeployment := model.KeycloakDeployment(cr, model.DatabaseSecret(cr)) keycloakDeployment.Spec.Replicas = &[]int32{5}[0] - keycloakDeployment.Spec.Template.Spec.Containers[0].Image = "old_image" //nolint + keycloakDeployment.Spec.Template.Spec.Containers[0].Image = "old_image" currentState := common.ClusterState{ KeycloakDeployment: keycloakDeployment, @@ -88,7 +88,7 @@ func TestKeycloakMigrations_Test_Migrating_RHSSO_Image(t *testing.T) { keycloakDeployment := model.RHSSODeployment(cr, model.DatabaseSecret(cr)) keycloakDeployment.Spec.Replicas = &[]int32{5}[0] - keycloakDeployment.Spec.Template.Spec.Containers[0].Image = "old_image" //nolint + keycloakDeployment.Spec.Template.Spec.Containers[0].Image = "old_image" currentState := common.ClusterState{ KeycloakDeployment: keycloakDeployment, diff --git a/pkg/controller/keycloakbackup/keycloakbackup_controller.go b/pkg/controller/keycloakbackup/keycloakbackup_controller.go index 808377497..2bc2e82fb 100644 --- a/pkg/controller/keycloakbackup/keycloakbackup_controller.go +++ b/pkg/controller/keycloakbackup/keycloakbackup_controller.go @@ -7,19 +7,20 @@ import ( kc "github.com/keycloak/keycloak-operator/pkg/apis/keycloak/v1alpha1" "github.com/keycloak/keycloak-operator/pkg/common" + errors "github.com/pkg/errors" v1 "k8s.io/api/batch/v1" "k8s.io/api/batch/v1beta1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" + logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" ) @@ -99,7 +100,7 @@ func (r *ReconcileKeycloakBackup) Reconcile(request reconcile.Request) (reconcil instance := &kc.KeycloakBackup{} err := r.client.Get(context.TODO(), request.NamespacedName, instance) if err != nil { - if errors.IsNotFound(err) { + if kubeerrors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. // Return and don't requeue @@ -123,7 +124,7 @@ func (r *ReconcileKeycloakBackup) Reconcile(request reconcile.Request) (reconcil // backups without instances to backup are treated as errors if len(keycloaks.Items) == 0 { - return r.ManageError(instance, fmt.Errorf("no instance to backup for %v/%v", instance.Namespace, instance.Name)) + return r.ManageError(instance, errors.Errorf("no instance to backup for %v/%v", instance.Namespace, instance.Name)) } log.Info(fmt.Sprintf("found %v matching keycloak(s) for backup %v/%v", len(keycloaks.Items), instance.Namespace, instance.Name)) diff --git a/pkg/controller/keycloakclient/keycloakclient_controller.go b/pkg/controller/keycloakclient/keycloakclient_controller.go index 62274c70e..f91e7c763 100644 --- a/pkg/controller/keycloakclient/keycloakclient_controller.go +++ b/pkg/controller/keycloakclient/keycloakclient_controller.go @@ -15,9 +15,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" + logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" ) @@ -91,7 +91,7 @@ type ReconcileKeycloakClient struct { // Reconcile reads that state of the cluster for a KeycloakClient object and makes changes based on the state read // and what is in the KeycloakClient.Spec -func (r *ReconcileKeycloakClient) Reconcile(request reconcile.Request) (reconcile.Result, error) { //nolint +func (r *ReconcileKeycloakClient) Reconcile(request reconcile.Request) (reconcile.Result, error) { reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) reqLogger.Info("Reconciling KeycloakClient") diff --git a/pkg/controller/keycloakclient/keycloakrclient_reconciler.go b/pkg/controller/keycloakclient/keycloakrclient_reconciler.go index a6360a949..8491e516f 100644 --- a/pkg/controller/keycloakclient/keycloakrclient_reconciler.go +++ b/pkg/controller/keycloakclient/keycloakrclient_reconciler.go @@ -26,7 +26,7 @@ func (i *KeycloakClientReconciler) Reconcile(state *common.ClientState, cr *kc.K desired := common.DesiredClusterState{} desired.AddAction(i.pingKeycloak()) - if cr.DeletionTimestamp != nil { //nolint + if cr.DeletionTimestamp != nil { desired.AddAction(i.getDeletedClientState(state, cr)) return desired } diff --git a/pkg/controller/keycloakuser/keycloakuser_controller.go b/pkg/controller/keycloakuser/keycloakuser_controller.go index 51b269e8c..1055104c2 100644 --- a/pkg/controller/keycloakuser/keycloakuser_controller.go +++ b/pkg/controller/keycloakuser/keycloakuser_controller.go @@ -18,9 +18,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" + logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "sigs.k8s.io/controller-runtime/pkg/source" ) diff --git a/pkg/model/constants.go b/pkg/model/constants.go index 053538a91..3f8a92ad8 100644 --- a/pkg/model/constants.go +++ b/pkg/model/constants.go @@ -31,8 +31,8 @@ const ( DatabaseSecretExternalPortProperty = "POSTGRES_EXTERNAL_PORT" // nolint KeycloakServicePort = 8443 PostgresDefaultPort = 5432 - AdminUsernameProperty = "ADMIN_USERNAME" // nolint - AdminPasswordProperty = "ADMIN_PASSWORD" // nolint + AdminUsernameProperty = "ADMIN_USERNAME" + AdminPasswordProperty = "ADMIN_PASSWORD" ServingCertSecretName = "sso-x509-https-secret" // nolint LivenessProbeProperty = "liveness_probe.sh" ReadinessProbeProperty = "readiness_probe.sh" diff --git a/pkg/model/postgresql_service_endpoints.go b/pkg/model/postgresql_service_endpoints.go index c98d33020..c8fbf0aa4 100644 --- a/pkg/model/postgresql_service_endpoints.go +++ b/pkg/model/postgresql_service_endpoints.go @@ -41,7 +41,7 @@ func PostgresqlServiceEndpointsReconciled(cr *v1alpha1.Keycloak, currentState *v // improve the user experience. port := string(currentDatabaseSecret.Data[DatabaseSecretExternalPortProperty]) - portAsInt, err := strconv.Atoi(port) + portAsInt, err := strconv.ParseInt(port, 10, 32) if err != nil { // Default Postgresql Port - maybe we'll be lucky... portAsInt = 5432 diff --git a/pkg/model/util.go b/pkg/model/util.go index 765a3a547..28ae5b868 100644 --- a/pkg/model/util.go +++ b/pkg/model/util.go @@ -121,7 +121,7 @@ func GetExternalDatabasePort(secret *v1.Secret) int32 { } port := secret.Data[DatabaseSecretExternalPortProperty] - parsed, err := strconv.Atoi(string(port)) + parsed, err := strconv.ParseInt(string(port), 10, 32) if err != nil { return PostgresDefaultPort } diff --git a/test/e2e/keycloak_client_test.go b/test/e2e/keycloak_client_test.go index 0563c03c4..3e7f5db8d 100644 --- a/test/e2e/keycloak_client_test.go +++ b/test/e2e/keycloak_client_test.go @@ -41,9 +41,9 @@ func getKeycloakClientCR(namespace string) *keycloakv1alpha1.KeycloakClient { MatchLabels: CreateLabel(namespace), }, Client: &keycloakv1alpha1.KeycloakAPIClient{ - ID: clientName, - ClientID: clientName, - Name: clientName, + ID: clientName, + ClientID: clientName, + Name: clientName, SurrogateAuthRequired: false, Enabled: true, BaseURL: "https://operator-test.url/client-base-url", diff --git a/test/e2e/keycloak_main_test.go b/test/e2e/keycloak_main_test.go index aaffdebc0..fb26dd572 100644 --- a/test/e2e/keycloak_main_test.go +++ b/test/e2e/keycloak_main_test.go @@ -87,6 +87,8 @@ func runTestsFromCRDInterface(t *testing.T, crd *CRDTestStruct) { } for testName, testStep := range crd.testSteps { + testName := testName + testStep := testStep t.Run(testName, func(t *testing.T) { t.Logf("test %s started", testName) testCTX := framework.NewTestCtx(t) diff --git a/test/e2e/keycloaks_test.go b/test/e2e/keycloaks_test.go index 3ca67b464..65890d99b 100644 --- a/test/e2e/keycloaks_test.go +++ b/test/e2e/keycloaks_test.go @@ -2,10 +2,11 @@ package e2e import ( "crypto/tls" - "fmt" "net/http" "testing" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" "k8s.io/client-go/kubernetes" @@ -44,7 +45,7 @@ func getKeycloakCR(namespace string) *keycloakv1alpha1.Keycloak { func getDeployedKeycloakCR(framework *framework.Framework, namespace string) keycloakv1alpha1.Keycloak { keycloakCR := keycloakv1alpha1.Keycloak{} - GetNamespacedObject(framework, namespace, testKeycloakCRName, &keycloakCR) + _ = GetNamespacedObject(framework, namespace, testKeycloakCRName, &keycloakCR) return keycloakCR } @@ -86,7 +87,7 @@ func keycloakDeploymentTest(t *testing.T, f *framework.Framework, ctx *framework if response.StatusCode == 200 { return nil } - return fmt.Errorf("invalid response from Keycloak (%v)", response.Status) + return errors.Errorf("invalid response from Keycloak (%v)", response.Status) }) return err } diff --git a/test/e2e/utils.go b/test/e2e/utils.go index e0976e074..59c1f37ef 100644 --- a/test/e2e/utils.go +++ b/test/e2e/utils.go @@ -3,12 +3,13 @@ package e2e import ( "context" "encoding/json" - "fmt" "io/ioutil" "net/http" "testing" "time" + "github.com/pkg/errors" + keycloakv1alpha1 "github.com/keycloak/keycloak-operator/pkg/apis/keycloak/v1alpha1" "github.com/stretchr/testify/assert" @@ -42,13 +43,13 @@ func WaitForStatefulSetReplicasReady(t *testing.T, c kubernetes.Interface, state return WaitForCondition(t, c, func(t *testing.T, c kubernetes.Interface) error { sts, err := c.AppsV1().StatefulSets(ns).Get(statefulSetName, metav1.GetOptions{}) if err != nil { - return fmt.Errorf("get StatefulSet %s failed, ignoring for %v: %v", statefulSetName, pollRetryInterval, err) + return errors.Errorf("get StatefulSet %s failed, ignoring for %v: %v", statefulSetName, pollRetryInterval, err) } if sts.Status.ReadyReplicas == *sts.Spec.Replicas { t.Logf("all %d replicas of StatefulSet %s are ready.", sts.Status.ReadyReplicas, statefulSetName) return nil } - return fmt.Errorf("statefulSet %s found but there are %d ready replicas and %d total replicas", statefulSetName, sts.Status.ReadyReplicas, *sts.Spec.Replicas) + return errors.Errorf("statefulSet %s found but there are %d ready replicas and %d total replicas", statefulSetName, sts.Status.ReadyReplicas, *sts.Spec.Replicas) }) } @@ -57,13 +58,13 @@ func WaitForPersistentVolumeClaimCreated(t *testing.T, c kubernetes.Interface, p return WaitForCondition(t, c, func(t *testing.T, c kubernetes.Interface) error { pvc, err := c.CoreV1().PersistentVolumeClaims(ns).Get(persistentVolumeClaimName, metav1.GetOptions{}) if err != nil { - return fmt.Errorf("get PersistentVolumeClaim %s failed, ignoring for %v: %v", persistentVolumeClaimName, pollRetryInterval, err) + return errors.Errorf("get PersistentVolumeClaim %s failed, ignoring for %v: %v", persistentVolumeClaimName, pollRetryInterval, err) } if pvc.Status.Phase == "Bound" { t.Logf("PersistentVolumeClaim is bound") return nil } - return fmt.Errorf("persistentVolumeClaim %s found but is not bound", persistentVolumeClaimName) + return errors.Errorf("persistentVolumeClaim %s found but is not bound", persistentVolumeClaimName) }) } @@ -82,7 +83,7 @@ func WaitForRealmToBeReady(t *testing.T, framework *framework.Framework, namespa return err } - return fmt.Errorf("keycloakRealm is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) + return errors.Errorf("keycloakRealm is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) } return nil @@ -104,7 +105,7 @@ func WaitForClientToBeReady(t *testing.T, framework *framework.Framework, namesp return err } - return fmt.Errorf("keycloakClient is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) + return errors.Errorf("keycloakClient is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) } return nil @@ -126,7 +127,7 @@ func WaitForUserToBeReady(t *testing.T, framework *framework.Framework, namespac return err } - return fmt.Errorf("keycloakRealm is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) + return errors.Errorf("keycloakRealm is not ready \nCurrent CR value: %s", string(keycloakRealmCRParsed)) } return nil @@ -135,15 +136,14 @@ func WaitForUserToBeReady(t *testing.T, framework *framework.Framework, namespac func WaitForSuccessResponseToContain(t *testing.T, framework *framework.Framework, url string, expectedString string) error { return WaitForCondition(t, framework.KubeClient, func(t *testing.T, c kubernetes.Interface) error { - //golint:ignore - response, err := http.Get(url) + response, err := http.Get(url) //nolint if err != nil { return err } defer response.Body.Close() if response.StatusCode != 200 { - return fmt.Errorf("invalid response from url %s (%v)", url, response.Status) + return errors.Errorf("invalid response from url %s (%v)", url, response.Status) } responseData, err := ioutil.ReadAll(response.Body) diff --git a/vendor/github.com/operator-framework/operator-sdk/pkg/restmapper/dynamicrestmapper.go b/vendor/github.com/operator-framework/operator-sdk/pkg/restmapper/dynamicrestmapper.go deleted file mode 100644 index 0edbe3ea0..000000000 --- a/vendor/github.com/operator-framework/operator-sdk/pkg/restmapper/dynamicrestmapper.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2019 The Operator-SDK Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package restmapper - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/discovery" - "k8s.io/client-go/rest" - "k8s.io/client-go/restmapper" -) - -// Deprecated: DynamicRESTMapper exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -type DynamicRESTMapper struct { - client discovery.DiscoveryInterface - delegate meta.RESTMapper -} - -// NewDynamicRESTMapper returns a RESTMapper that dynamically discovers resource -// types at runtime. This is in contrast to controller-manager's default RESTMapper, which -// only checks resource types at startup, and so can't handle the case of first creating a -// CRD and then creating an instance of that CRD. -// -// Deprecated: NewDynamicRESTMapper exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func NewDynamicRESTMapper(cfg *rest.Config) (meta.RESTMapper, error) { - client, err := discovery.NewDiscoveryClientForConfig(cfg) - if err != nil { - return nil, err - } - - drm := &DynamicRESTMapper{client: client} - if err := drm.reload(); err != nil { - return nil, err - } - return drm, nil -} - -func (drm *DynamicRESTMapper) reload() error { - gr, err := restmapper.GetAPIGroupResources(drm.client) - if err != nil { - return err - } - drm.delegate = restmapper.NewDiscoveryRESTMapper(gr) - return nil -} - -// reloadOnError checks if an error indicates that the delegated RESTMapper needs to be -// reloaded, and if so, reloads it and returns true. -func (drm *DynamicRESTMapper) reloadOnError(err error) bool { - if _, matches := err.(*meta.NoKindMatchError); !matches { - return false - } - err = drm.reload() - if err != nil { - utilruntime.HandleError(err) - } - return err == nil -} - -// Deprecated: KindFor exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - gvk, err := drm.delegate.KindFor(resource) - if drm.reloadOnError(err) { - gvk, err = drm.delegate.KindFor(resource) - } - return gvk, err -} - -// Deprecated: KindsFor exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { - gvks, err := drm.delegate.KindsFor(resource) - if drm.reloadOnError(err) { - gvks, err = drm.delegate.KindsFor(resource) - } - return gvks, err -} - -// Deprecated: ResourceFor exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) { - gvr, err := drm.delegate.ResourceFor(input) - if drm.reloadOnError(err) { - gvr, err = drm.delegate.ResourceFor(input) - } - return gvr, err -} - -// Deprecated: ResourcesFor exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - gvrs, err := drm.delegate.ResourcesFor(input) - if drm.reloadOnError(err) { - gvrs, err = drm.delegate.ResourcesFor(input) - } - return gvrs, err -} - -// Deprecated: RESTMapping exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) { - m, err := drm.delegate.RESTMapping(gk, versions...) - if drm.reloadOnError(err) { - m, err = drm.delegate.RESTMapping(gk, versions...) - } - return m, err -} - -// Deprecated: RESTMappings exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) { - ms, err := drm.delegate.RESTMappings(gk, versions...) - if drm.reloadOnError(err) { - ms, err = drm.delegate.RESTMappings(gk, versions...) - } - return ms, err -} - -// Deprecated: ResourceSingularizer exists for historical compatibility -// and should not be used. See that it was implemented in the controller-runtime. -// More info: https://github.com/kubernetes-sigs/controller-runtime/pull/554 -func (drm *DynamicRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - s, err := drm.delegate.ResourceSingularizer(resource) - if drm.reloadOnError(err) { - s, err = drm.delegate.ResourceSingularizer(resource) - } - return s, err -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 8f3dbc422..3c9370d5d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -128,7 +128,6 @@ github.com/operator-framework/operator-sdk/pkg/kube-metrics github.com/operator-framework/operator-sdk/pkg/leader github.com/operator-framework/operator-sdk/pkg/log/zap github.com/operator-framework/operator-sdk/pkg/metrics -github.com/operator-framework/operator-sdk/pkg/restmapper github.com/operator-framework/operator-sdk/pkg/test github.com/operator-framework/operator-sdk/pkg/test/e2eutil github.com/operator-framework/operator-sdk/version @@ -208,7 +207,7 @@ golang.org/x/text/unicode/norm golang.org/x/text/width # golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 golang.org/x/time/rate -# golang.org/x/tools v0.0.0-20200601175630-2caf76543d99 +# golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6 golang.org/x/tools/go/ast/astutil golang.org/x/tools/imports golang.org/x/tools/internal/event @@ -483,7 +482,6 @@ sigs.k8s.io/controller-runtime/pkg/predicate sigs.k8s.io/controller-runtime/pkg/reconcile sigs.k8s.io/controller-runtime/pkg/recorder sigs.k8s.io/controller-runtime/pkg/runtime/inject -sigs.k8s.io/controller-runtime/pkg/runtime/log sigs.k8s.io/controller-runtime/pkg/runtime/scheme sigs.k8s.io/controller-runtime/pkg/scheme sigs.k8s.io/controller-runtime/pkg/source diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log/log.go b/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log/log.go deleted file mode 100644 index c5425fe06..000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log/log.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package log contains (deprecated) utilities for fetching a new logger when -// one is not already available. -// -// Deprecated: use pkg/log -package log - -import ( - "github.com/go-logr/logr" - - "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" -) - -var ( - // ZapLogger is a Logger implementation. - // If development is true, a Zap development config will be used - // (stacktraces on warnings, no sampling), otherwise a Zap production - // config will be used (stacktraces on errors, sampling). - ZapLogger = zap.Logger - - // ZapLoggerTo returns a new Logger implementation using Zap which logs - // to the given destination, instead of stderr. It otherwise behaves like - // ZapLogger. - ZapLoggerTo = zap.LoggerTo - - // SetLogger sets a concrete logging implementation for all deferred Loggers. - SetLogger = log.SetLogger - - // Log is the base logger used by kubebuilder. It delegates - // to another logr.Logger. You *must* call SetLogger to - // get any actual logging. - Log = log.Log - - // KBLog is a base parent logger for use inside controller-runtime. - // Deprecated: don't use this outside controller-runtime - // (inside CR, use pkg/internal/log.RuntimeLog) - KBLog logr.Logger -) - -func init() { - KBLog = log.Log.WithName("controller-runtime") -}