diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b31669..6d8c86a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,17 +16,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.18" + go-version-file: go.mod - name: Get dependencies run: | @@ -43,7 +36,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.52 + version: v1.58 args: --skip-files .*_test.go --enable wsl --enable misspell --out-format=colored-line-number --timeout 180s - name: Build diff --git a/cmd/clouddriver/clouddriver.go b/cmd/clouddriver/clouddriver.go index 657403c..242ed9e 100644 --- a/cmd/clouddriver/clouddriver.go +++ b/cmd/clouddriver/clouddriver.go @@ -7,9 +7,9 @@ import ( "strings" "github.com/gin-gonic/gin" + arcade "github.com/homedepot/arcade/pkg" "github.com/homedepot/go-clouddriver/internal" "github.com/homedepot/go-clouddriver/internal/api" - "github.com/homedepot/go-clouddriver/internal/arcade" "github.com/homedepot/go-clouddriver/internal/artifact" "github.com/homedepot/go-clouddriver/internal/fiat" "github.com/homedepot/go-clouddriver/internal/front50" @@ -38,21 +38,15 @@ func main() { func setupArcadeClient() (client arcade.Client) { url := os.Getenv("ARCADE_URL") - if url != "" { - client = arcade.NewClient(url) - } else { - client = arcade.NewDefaultClient() - } - arcadeAPIKey := os.Getenv("ARCADE_API_KEY") if arcadeAPIKey == "" { log.Println("[CLOUDDRIVER] WARNING: ARCADE_API_KEY not set") } + if url != "" { + return arcade.NewClient(url, arcadeAPIKey) + } - client.WithAPIKey(arcadeAPIKey) - client.WithShortExpiration(arcadeShortExpirationSeconds) - - return client + return arcade.NewDefaultClient(arcadeAPIKey) } func setupFiatClient() fiat.Client { diff --git a/go.mod b/go.mod index 5a8b879..91888a3 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,25 @@ module github.com/homedepot/go-clouddriver -go 1.18 +go 1.21 require ( cloud.google.com/go/storage v1.17.0 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/fatih/color v1.9.0 github.com/fsouza/fake-gcs-server v1.30.1 - github.com/gin-gonic/gin v1.6.3 + github.com/gin-gonic/gin v1.9.1 github.com/google/go-github/v32 v32.1.0 github.com/google/uuid v1.1.2 github.com/googleapis/gnostic v0.5.1 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 + github.com/homedepot/arcade v1.3.0 github.com/iancoleman/strcase v0.1.2 github.com/jonboulle/clockwork v0.1.0 - github.com/onsi/ginkgo/v2 v2.1.4 - github.com/onsi/gomega v1.19.0 + github.com/onsi/ginkgo/v2 v2.13.0 + github.com/onsi/gomega v1.30.0 github.com/peterbourgon/diskv v2.0.1+incompatible github.com/zsais/go-gin-prometheus v0.1.1-0.20200217150448-2199a42d96c1 - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f + golang.org/x/oauth2 v0.15.0 google.golang.org/api v0.57.0 gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/mysql v1.3.4 @@ -38,45 +39,54 @@ require ( github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bytedance/sonic v1.10.2 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful v2.16.0+incompatible // indirect github.com/evanphx/json-patch v4.9.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-logr/logr v0.2.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.3 // indirect github.com/go-openapi/jsonreference v0.19.3 // indirect github.com/go-openapi/spec v0.19.3 // indirect github.com/go-openapi/swag v0.19.5 // indirect - github.com/go-playground/locales v0.13.0 // indirect - github.com/go-playground/universal-translator v0.17.0 // indirect - github.com/go-playground/validator/v10 v10.2.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.16.0 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.1 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.0.0 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/googleapis/gax-go/v2 v2.1.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/json-iterator/go v1.1.10 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.2.0 // indirect + github.com/leodido/go-urn v1.2.4 // indirect github.com/mailru/easyjson v0.7.0 // indirect github.com/mattn/go-colorable v0.1.4 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v1.14.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.7.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -85,21 +95,24 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/ugorji/go/codec v1.1.7 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/arch v0.6.0 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/tools v0.12.0 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 // indirect google.golang.org/grpc v1.40.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect sigs.k8s.io/kustomize v2.0.3+incompatible // indirect sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect diff --git a/go.sum b/go.sum index d99295a..e1b8f83 100644 --- a/go.sum +++ b/go.sum @@ -82,11 +82,22 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce 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/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE= +github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= +github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -134,15 +145,19 @@ github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8S github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsouza/fake-gcs-server v1.30.1 h1:OBuje/XJiwwzGOuwEhPzZ8s2gF1vDHTZq1X+AhYEqjc= github.com/fsouza/fake-gcs-server v1.30.1/go.mod h1:8S1lJH/fxjz4AJMhQJn5AUU4m6jPoCTHQituQinWTAQ= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= 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= @@ -151,8 +166,9 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= @@ -168,17 +184,21 @@ github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dp github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= +github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= @@ -214,8 +234,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= @@ -234,8 +255,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= @@ -262,6 +284,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -288,7 +311,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/homedepot/arcade v1.3.0 h1:hJl8J/VtHPuqxT3Rr4Wsicm+Zb+WukMsiCphtYsOvdg= +github.com/homedepot/arcade v1.3.0/go.mod h1:L9Vl0UUAy2aHqaVBopWTNEns5ILjlWoGvB9rCzD0RvQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.1.2 h1:gnomlvw9tnV3ITTAxzKSgTF+8kFWcU/f+TgttpXGz1U= github.com/iancoleman/strcase v0.1.2/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= @@ -305,15 +329,19 @@ github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -326,8 +354,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -340,8 +368,8 @@ github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaa github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 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-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -356,24 +384,30 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= 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/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -431,17 +465,26 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -450,6 +493,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zsais/go-gin-prometheus v0.1.1-0.20200217150448-2199a42d96c1 h1:I0mc2IYyLOIg7m6/efsLimk77Nnzn83VGijD2Bu+jwg= github.com/zsais/go-gin-prometheus v0.1.1-0.20200217150448-2199a42d96c1/go.mod h1:Slirjzuz8uM8Cw0jmPNqbneoqcUtY2GGjn2bEd4NRLY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -465,6 +509,9 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= +golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -473,8 +520,9 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -510,6 +558,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -551,8 +602,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -567,8 +619,9 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -580,6 +633,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= @@ -603,7 +657,6 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/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= @@ -633,16 +686,22 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -651,8 +710,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -715,6 +776,9 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -755,8 +819,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -853,8 +918,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -862,7 +928,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -879,8 +944,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.3.4 h1:/KoBMgsUHC3bExsekDcmNYaBnfH2WNeFuXqqrqMc98Q= gorm.io/driver/mysql v1.3.4/go.mod h1:s4Tq0KmD0yhPGHbZEwg1VPlH0vT/GBHJZorPzhcxBUE= gorm.io/driver/sqlite v1.3.6 h1:Fi8xNYCUplOqWiPa3/GuCeowRNBRGTf62DEmhMDHeQQ= @@ -920,7 +986,9 @@ k8s.io/kubectl v0.19.2/go.mod h1:4ib3oj5ma6gF95QukTvC7ZBMxp60+UEAhDPjLuBIrV4= k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= diff --git a/internal/api/core/applications_test.go b/internal/api/core/applications_test.go index 9eb38d7..981e278 100644 --- a/internal/api/core/applications_test.go +++ b/internal/api/core/applications_test.go @@ -2,7 +2,7 @@ package core_test import ( "errors" - "io/ioutil" + "io" "log" "net/http" @@ -38,7 +38,7 @@ var _ = Describe("Application", func() { SpinnakerApp: "test-spinnaker-app2", }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -217,7 +217,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -617,7 +617,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) It("succeeds", func() { @@ -1054,7 +1054,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -1652,7 +1652,7 @@ var _ = Describe("Application", func() { Cluster: "test-kind3 test-name3", }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -2473,7 +2473,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -3624,7 +3624,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -4062,7 +4062,7 @@ var _ = Describe("Application", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -4129,7 +4129,7 @@ var _ = Describe("Application", func() { setup() uri = svr.URL + "/applications/test-application/jobs/test-account/test-namespace/job test-job1" createRequest(http.MethodDelete) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { diff --git a/internal/api/core/artifacts.go b/internal/api/core/artifacts.go index ec9f6b5..4c0b17b 100644 --- a/internal/api/core/artifacts.go +++ b/internal/api/core/artifacts.go @@ -8,7 +8,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "regexp" "sort" @@ -174,7 +173,7 @@ func (cc *Controller) GetArtifact(c *gin.Context) { defer reader.Close() // Read contents - b, err = ioutil.ReadAll(reader) + b, err = io.ReadAll(reader) if err != nil { clouddriver.Error(c, http.StatusInternalServerError, err) return @@ -265,7 +264,7 @@ func (cc *Controller) GetArtifact(c *gin.Context) { return } - rb, err := ioutil.ReadAll(resp.Body) + rb, err := io.ReadAll(resp.Body) if err != nil { clouddriver.Error(c, http.StatusInternalServerError, err) return @@ -321,7 +320,7 @@ func (cc *Controller) GetArtifact(c *gin.Context) { return } - tb, err := ioutil.ReadAll(tr) + tb, err := io.ReadAll(tr) if err != nil { clouddriver.Error(c, http.StatusInternalServerError, err) return @@ -383,7 +382,7 @@ func (cc *Controller) GetArtifact(c *gin.Context) { } defer resp.Body.Close() - b, err = ioutil.ReadAll(resp.Body) + b, err = io.ReadAll(resp.Body) if err != nil { clouddriver.Error(c, http.StatusInternalServerError, err) return diff --git a/internal/api/core/artifacts_test.go b/internal/api/core/artifacts_test.go index 608ddb4..8f6db4f 100644 --- a/internal/api/core/artifacts_test.go +++ b/internal/api/core/artifacts_test.go @@ -4,9 +4,9 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" "net/http" "net/url" + "os" "strings" "github.com/homedepot/go-clouddriver/internal/helm" @@ -568,7 +568,7 @@ var _ = Describe("Artifacts", func() { body.Write([]byte(fmt.Sprintf(payloadRequestFetchGitRepoArtifactBranch, fakeFileServer.URL()))) createRequest(http.MethodPut) - actual, err := ioutil.ReadFile("test/git-repo-test.tar.gz") + actual, err := os.ReadFile("test/git-repo-test.tar.gz") Expect(err).To(BeNil()) fakeFileServer.AppendHandlers(ghttp.CombineHandlers( ghttp.VerifyRequest(http.MethodGet, "/git-repo/archive/test.tar.gz"), @@ -577,7 +577,7 @@ var _ = Describe("Artifacts", func() { }) It("succeeds", func() { - expected, err := ioutil.ReadFile("test/expected-git-repo-test.tar.gz") + expected, err := os.ReadFile("test/expected-git-repo-test.tar.gz") Expect(err).To(BeNil()) Expect(res.StatusCode).To(Equal(http.StatusOK)) @@ -591,7 +591,7 @@ var _ = Describe("Artifacts", func() { body.Write([]byte(fmt.Sprintf(payloadRequestFetchGitRepoArtifactSubPath, fakeFileServer.URL()))) createRequest(http.MethodPut) - actual, err := ioutil.ReadFile("test/git-repo-master.tar.gz") + actual, err := os.ReadFile("test/git-repo-master.tar.gz") Expect(err).To(BeNil()) fakeFileServer.AppendHandlers(ghttp.CombineHandlers( ghttp.VerifyRequest(http.MethodGet, "/git-repo/archive/master.tar.gz"), @@ -600,7 +600,7 @@ var _ = Describe("Artifacts", func() { }) It("succeeds", func() { - expected, err := ioutil.ReadFile("test/expected-git-repo-master-subpath.tar.gz") + expected, err := os.ReadFile("test/expected-git-repo-master-subpath.tar.gz") Expect(err).To(BeNil()) Expect(res.StatusCode).To(Equal(http.StatusOK)) @@ -610,7 +610,7 @@ var _ = Describe("Artifacts", func() { When("it succeeds", func() { BeforeEach(func() { - actual, err := ioutil.ReadFile("test/git-repo-master.tar.gz") + actual, err := os.ReadFile("test/git-repo-master.tar.gz") Expect(err).To(BeNil()) fakeFileServer.AppendHandlers(ghttp.CombineHandlers( ghttp.VerifyRequest(http.MethodGet, "/git-repo/archive/master.tar.gz"), @@ -619,7 +619,7 @@ var _ = Describe("Artifacts", func() { }) It("succeeds", func() { - expected, err := ioutil.ReadFile("test/expected-git-repo-master.tar.gz") + expected, err := os.ReadFile("test/expected-git-repo-master.tar.gz") Expect(err).To(BeNil()) Expect(res.StatusCode).To(Equal(http.StatusOK)) diff --git a/internal/api/core/core_test.go b/internal/api/core/core_test.go index e915513..d33f09e 100644 --- a/internal/api/core/core_test.go +++ b/internal/api/core/core_test.go @@ -3,7 +3,7 @@ package core_test import ( "bytes" "encoding/json" - "io/ioutil" + "io" "log" "mime" "net/http" @@ -13,9 +13,9 @@ import ( "github.com/fsouza/fake-gcs-server/fakestorage" "github.com/gin-gonic/gin" "github.com/google/go-github/v32/github" + "github.com/homedepot/arcade/pkg/arcadefakes" "github.com/homedepot/go-clouddriver/internal" "github.com/homedepot/go-clouddriver/internal/api" - "github.com/homedepot/go-clouddriver/internal/arcade/arcadefakes" "github.com/homedepot/go-clouddriver/internal/artifact" "github.com/homedepot/go-clouddriver/internal/artifact/artifactfakes" "github.com/homedepot/go-clouddriver/internal/fiat/fiatfakes" @@ -294,7 +294,7 @@ func setup() { svr = httptest.NewServer(r) body = &bytes.Buffer{} // Ignore log output. - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) } func teardown() { @@ -303,7 +303,7 @@ func teardown() { } func createRequest(method string) { - req, _ = http.NewRequest(method, uri, ioutil.NopCloser(body)) + req, _ = http.NewRequest(method, uri, io.NopCloser(body)) req.Header.Set("API-Key", "test") } @@ -316,7 +316,7 @@ func validateResponse(expected string) { Expect(mt).To(Equal("application/json"), "content-type") Expect(mtp["charset"]).To(Equal("utf-8"), "charset") - actual, _ := ioutil.ReadAll(res.Body) + actual, _ := io.ReadAll(res.Body) Expect(actual).To(MatchJSON(expected), "correct body") } @@ -325,7 +325,7 @@ func validateTextResponse(expected string) { Expect(mt).To(Equal("text/plain"), "content-type") Expect(mtp["charset"]).To(Equal("utf-8"), "charset") - actual, _ := ioutil.ReadAll(res.Body) + actual, _ := io.ReadAll(res.Body) Expect(string(actual)).To(Equal(expected), "correct body") } @@ -333,13 +333,13 @@ func validateGZipResponse(expected []byte) { mt, _, _ := mime.ParseMediaType(res.Header.Get("content-type")) Expect(mt).To(Equal("application/x-gzip"), "content-type") - actual, _ := ioutil.ReadAll(res.Body) + actual, _ := io.ReadAll(res.Body) Expect(actual).To(Equal(expected), "correct body") } func getClouddriverError() clouddriver.ErrorResponse { ce := clouddriver.ErrorResponse{} - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) _ = json.Unmarshal(b, &ce) return ce diff --git a/internal/api/core/credentials_test.go b/internal/api/core/credentials_test.go index f5c5641..513b94c 100644 --- a/internal/api/core/credentials_test.go +++ b/internal/api/core/credentials_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "log" "net/http" @@ -138,7 +138,7 @@ var _ = Describe("Credential", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) AfterEach(func() { @@ -312,7 +312,7 @@ var _ = Describe("Credential", func() { It("succeeds", func() { Expect(res.StatusCode).To(Equal(http.StatusOK)) - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) creds := []clouddriver.Credentials{} err := json.Unmarshal(b, &creds) Expect(err).To(BeNil()) diff --git a/internal/api/core/kubernetes/kubernetes_test.go b/internal/api/core/kubernetes/kubernetes_test.go index d13e15e..996a66f 100644 --- a/internal/api/core/kubernetes/kubernetes_test.go +++ b/internal/api/core/kubernetes/kubernetes_test.go @@ -6,8 +6,8 @@ import ( "net/http/httptest" "github.com/gin-gonic/gin" + "github.com/homedepot/arcade/pkg/arcadefakes" "github.com/homedepot/go-clouddriver/internal" - "github.com/homedepot/go-clouddriver/internal/arcade/arcadefakes" "github.com/homedepot/go-clouddriver/internal/artifact" "github.com/homedepot/go-clouddriver/internal/kubernetes" clouddriver "github.com/homedepot/go-clouddriver/pkg" diff --git a/internal/api/core/ops_test.go b/internal/api/core/ops_test.go index 02e1dd9..9db8a8f 100644 --- a/internal/api/core/ops_test.go +++ b/internal/api/core/ops_test.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "errors" - "io/ioutil" + "io" "net/http" kube "github.com/homedepot/go-clouddriver/internal/api/core/kubernetes" @@ -217,7 +217,7 @@ var _ = Describe("Kubernetes", func() { It("succeeds", func() { Expect(res.StatusCode).To(Equal(http.StatusOK)) or := kube.OperationsResponse{} - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) json.Unmarshal(b, &or) uuidLen := 36 Expect(or.ID).To(HaveLen(uuidLen)) diff --git a/internal/api/core/project_test.go b/internal/api/core/project_test.go index f7fc839..212e029 100644 --- a/internal/api/core/project_test.go +++ b/internal/api/core/project_test.go @@ -2,7 +2,7 @@ package core_test import ( "errors" - "io/ioutil" + "io" "log" "net/http" @@ -204,7 +204,7 @@ var _ = Describe("Project", func() { }, }, }, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) JustBeforeEach(func() { diff --git a/internal/api/core/search_test.go b/internal/api/core/search_test.go index e744a13..9ccab52 100644 --- a/internal/api/core/search_test.go +++ b/internal/api/core/search_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" . "github.com/onsi/ginkgo/v2" @@ -233,7 +233,7 @@ var _ = Describe("Search", func() { It("succeeds", func() { Expect(res.StatusCode).To(Equal(http.StatusOK)) - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) s := core.SearchResponse{} err := json.Unmarshal(b, &s) Expect(err).To(BeNil()) diff --git a/internal/api/core/task_test.go b/internal/api/core/task_test.go index 6b0fcf6..1bd2398 100644 --- a/internal/api/core/task_test.go +++ b/internal/api/core/task_test.go @@ -3,7 +3,7 @@ package core_test import ( "encoding/json" "errors" - "io/ioutil" + "io" "net/http" "time" @@ -38,7 +38,7 @@ var _ = Describe("Task", func() { It("returns a failed task", func() { Expect(res.StatusCode).To(Equal(http.StatusInternalServerError)) t := clouddriver.Task{} - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) err := json.Unmarshal(b, &t) Expect(err).To(BeNil()) Expect(t.Status.Failed).To(BeTrue()) @@ -65,7 +65,7 @@ var _ = Describe("Task", func() { It("returns a failed task", func() { Expect(res.StatusCode).To(Equal(http.StatusInternalServerError)) t := clouddriver.Task{} - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) err := json.Unmarshal(b, &t) Expect(err).To(BeNil()) Expect(t.Status.Failed).To(BeTrue()) @@ -181,7 +181,7 @@ var _ = Describe("Task", func() { It("returns a failed task", func() { Expect(res.StatusCode).To(Equal(http.StatusInternalServerError)) t := clouddriver.Task{} - b, _ := ioutil.ReadAll(res.Body) + b, _ := io.ReadAll(res.Body) err := json.Unmarshal(b, &t) Expect(err).To(BeNil()) Expect(t.Status.Failed).To(BeTrue()) diff --git a/internal/api/v1/resource_test.go b/internal/api/v1/resource_test.go index 46f063d..9a3febf 100644 --- a/internal/api/v1/resource_test.go +++ b/internal/api/v1/resource_test.go @@ -2,7 +2,7 @@ package v1_test import ( "errors" - "io/ioutil" + "io" "log" "net/http" @@ -20,7 +20,7 @@ var _ = Describe("Resource", func() { setup() fakeSQLClient.DeleteKubernetesResourcesByAccountNameReturns(nil) fakeKubeClient.ListResourceWithContextReturns(&unstructured.UnstructuredList{}, nil) - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) uri = svr.URL + "/v1/kubernetes/providers/test-account/resources" body.Write([]byte(payloadRequestKubernetesProviders)) diff --git a/internal/api/v1/v1_test.go b/internal/api/v1/v1_test.go index 3d6996d..72e28ea 100644 --- a/internal/api/v1/v1_test.go +++ b/internal/api/v1/v1_test.go @@ -2,15 +2,15 @@ package v1_test import ( "bytes" - "io/ioutil" + "io" "mime" "net/http" "net/http/httptest" "github.com/gin-gonic/gin" + "github.com/homedepot/arcade/pkg/arcadefakes" "github.com/homedepot/go-clouddriver/internal" "github.com/homedepot/go-clouddriver/internal/api" - "github.com/homedepot/go-clouddriver/internal/arcade/arcadefakes" "github.com/homedepot/go-clouddriver/internal/kubernetes" "github.com/homedepot/go-clouddriver/internal/kubernetes/kubernetesfakes" "github.com/homedepot/go-clouddriver/internal/sql/sqlfakes" @@ -202,7 +202,7 @@ func teardown() { } func createRequest(method string) { - req, _ = http.NewRequest(method, uri, ioutil.NopCloser(body)) + req, _ = http.NewRequest(method, uri, io.NopCloser(body)) req.Header.Set("API-Key", "test") } @@ -211,6 +211,6 @@ func doRequest() { } func validateResponse(expected string) { - actual, _ := ioutil.ReadAll(res.Body) + actual, _ := io.ReadAll(res.Body) Expect(actual).To(MatchJSON(expected), "correct body") } diff --git a/internal/arcade/arcade_suite_test.go b/internal/arcade/arcade_suite_test.go deleted file mode 100644 index 35118f6..0000000 --- a/internal/arcade/arcade_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package arcade_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestArcade(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Arcade Suite") -} diff --git a/internal/arcade/arcadefakes/fake_client.go b/internal/arcade/arcadefakes/fake_client.go deleted file mode 100644 index 7ab2ee6..0000000 --- a/internal/arcade/arcadefakes/fake_client.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package arcadefakes - -import ( - "sync" - - "github.com/homedepot/go-clouddriver/internal/arcade" -) - -type FakeClient struct { - TokenStub func(string) (string, error) - tokenMutex sync.RWMutex - tokenArgsForCall []struct { - arg1 string - } - tokenReturns struct { - result1 string - result2 error - } - tokenReturnsOnCall map[int]struct { - result1 string - result2 error - } - WithAPIKeyStub func(string) - withAPIKeyMutex sync.RWMutex - withAPIKeyArgsForCall []struct { - arg1 string - } - WithShortExpirationStub func(int) - withShortExpirationMutex sync.RWMutex - withShortExpirationArgsForCall []struct { - arg1 int - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeClient) Token(arg1 string) (string, error) { - fake.tokenMutex.Lock() - ret, specificReturn := fake.tokenReturnsOnCall[len(fake.tokenArgsForCall)] - fake.tokenArgsForCall = append(fake.tokenArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.TokenStub - fakeReturns := fake.tokenReturns - fake.recordInvocation("Token", []interface{}{arg1}) - fake.tokenMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeClient) TokenCallCount() int { - fake.tokenMutex.RLock() - defer fake.tokenMutex.RUnlock() - return len(fake.tokenArgsForCall) -} - -func (fake *FakeClient) TokenCalls(stub func(string) (string, error)) { - fake.tokenMutex.Lock() - defer fake.tokenMutex.Unlock() - fake.TokenStub = stub -} - -func (fake *FakeClient) TokenArgsForCall(i int) string { - fake.tokenMutex.RLock() - defer fake.tokenMutex.RUnlock() - argsForCall := fake.tokenArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeClient) TokenReturns(result1 string, result2 error) { - fake.tokenMutex.Lock() - defer fake.tokenMutex.Unlock() - fake.TokenStub = nil - fake.tokenReturns = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeClient) TokenReturnsOnCall(i int, result1 string, result2 error) { - fake.tokenMutex.Lock() - defer fake.tokenMutex.Unlock() - fake.TokenStub = nil - if fake.tokenReturnsOnCall == nil { - fake.tokenReturnsOnCall = make(map[int]struct { - result1 string - result2 error - }) - } - fake.tokenReturnsOnCall[i] = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeClient) WithAPIKey(arg1 string) { - fake.withAPIKeyMutex.Lock() - fake.withAPIKeyArgsForCall = append(fake.withAPIKeyArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.WithAPIKeyStub - fake.recordInvocation("WithAPIKey", []interface{}{arg1}) - fake.withAPIKeyMutex.Unlock() - if stub != nil { - fake.WithAPIKeyStub(arg1) - } -} - -func (fake *FakeClient) WithAPIKeyCallCount() int { - fake.withAPIKeyMutex.RLock() - defer fake.withAPIKeyMutex.RUnlock() - return len(fake.withAPIKeyArgsForCall) -} - -func (fake *FakeClient) WithAPIKeyCalls(stub func(string)) { - fake.withAPIKeyMutex.Lock() - defer fake.withAPIKeyMutex.Unlock() - fake.WithAPIKeyStub = stub -} - -func (fake *FakeClient) WithAPIKeyArgsForCall(i int) string { - fake.withAPIKeyMutex.RLock() - defer fake.withAPIKeyMutex.RUnlock() - argsForCall := fake.withAPIKeyArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeClient) WithShortExpiration(arg1 int) { - fake.withShortExpirationMutex.Lock() - fake.withShortExpirationArgsForCall = append(fake.withShortExpirationArgsForCall, struct { - arg1 int - }{arg1}) - stub := fake.WithShortExpirationStub - fake.recordInvocation("WithShortExpiration", []interface{}{arg1}) - fake.withShortExpirationMutex.Unlock() - if stub != nil { - fake.WithShortExpirationStub(arg1) - } -} - -func (fake *FakeClient) WithShortExpirationCallCount() int { - fake.withShortExpirationMutex.RLock() - defer fake.withShortExpirationMutex.RUnlock() - return len(fake.withShortExpirationArgsForCall) -} - -func (fake *FakeClient) WithShortExpirationCalls(stub func(int)) { - fake.withShortExpirationMutex.Lock() - defer fake.withShortExpirationMutex.Unlock() - fake.WithShortExpirationStub = stub -} - -func (fake *FakeClient) WithShortExpirationArgsForCall(i int) int { - fake.withShortExpirationMutex.RLock() - defer fake.withShortExpirationMutex.RUnlock() - argsForCall := fake.withShortExpirationArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.tokenMutex.RLock() - defer fake.tokenMutex.RUnlock() - fake.withAPIKeyMutex.RLock() - defer fake.withAPIKeyMutex.RUnlock() - fake.withShortExpirationMutex.RLock() - defer fake.withShortExpirationMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ arcade.Client = new(FakeClient) diff --git a/internal/arcade/client.go b/internal/arcade/client.go deleted file mode 100644 index fa2cab4..0000000 --- a/internal/arcade/client.go +++ /dev/null @@ -1,81 +0,0 @@ -package arcade - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Client -type Client interface { - Token(string) (string, error) - WithAPIKey(string) - WithShortExpiration(int) -} - -func NewDefaultClient() Client { - return &client{ - url: "http://localhost:1982", - } -} - -func NewClient(url string) Client { - return &client{ - url: url, - } -} - -type client struct { - apiKey string - shortExpiration int - url string -} - -func (c *client) WithAPIKey(apiKey string) { - c.apiKey = apiKey -} - -func (c *client) WithShortExpiration(seconds int) { - c.shortExpiration = seconds -} - -func (c *client) Token(tokenProvider string) (string, error) { - req, err := http.NewRequest(http.MethodGet, c.url+"/tokens", nil) - if err != nil { - return "", err - } - - q := url.Values{} - q.Add("provider", tokenProvider) - req.URL.RawQuery = q.Encode() - - req.Header.Add("Api-Key", c.apiKey) - - res, err := http.DefaultClient.Do(req) - if err != nil { - return "", err - } - defer res.Body.Close() - - if res.StatusCode < 200 || res.StatusCode > 399 { - return "", fmt.Errorf("error getting token: %s", res.Status) - } - - var response struct { - Token string `json:"token"` - } - - b, err := ioutil.ReadAll(res.Body) - if err != nil { - return "", err - } - - err = json.Unmarshal(b, &response) - if err != nil { - return "", err - } - - return response.Token, nil -} diff --git a/internal/arcade/client_test.go b/internal/arcade/client_test.go deleted file mode 100644 index f5e0be5..0000000 --- a/internal/arcade/client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -package arcade_test - -import ( - "net/http" - "time" - - . "github.com/homedepot/go-clouddriver/internal/arcade" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/ghttp" -) - -var _ = Describe("Client", func() { - var ( - server *ghttp.Server - client Client - err error - token string - provider string - ) - - BeforeEach(func() { - provider = "google" - server = ghttp.NewServer() - client = NewClient(server.URL()) - client.WithAPIKey("test-api-key") - }) - - AfterEach(func() { - server.Close() - }) - - Describe("#NewDefaultClient", func() { - BeforeEach(func() { - client = NewDefaultClient() - }) - - It("succeeds", func() { - }) - }) - - Describe("#Token", func() { - JustBeforeEach(func() { - token, err = client.Token(provider) - }) - - When("the uri is invalid", func() { - BeforeEach(func() { - client = NewClient("::haha") - }) - - It("returns an error", func() { - Expect(err).ToNot(BeNil()) - }) - }) - - When("the server is not reachable", func() { - BeforeEach(func() { - server.Close() - }) - - It("returns an error", func() { - Expect(err).ToNot(BeNil()) - }) - }) - - When("the response is not 2XX", func() { - BeforeEach(func() { - server.AppendHandlers( - ghttp.RespondWith(http.StatusInternalServerError, nil), - ) - }) - - It("returns an error", func() { - Expect(err).ToNot(BeNil()) - Expect(err.Error()).To(Equal("error getting token: 500 Internal Server Error")) - }) - }) - - When("the server returns bad data", func() { - BeforeEach(func() { - server.AppendHandlers( - ghttp.RespondWith(http.StatusOK, ";{["), - ) - }) - - It("returns an error", func() { - Expect(err).ToNot(BeNil()) - Expect(err.Error()).To(Equal("invalid character ';' looking for beginning of value")) - }) - }) - - When("provider is rancher", func() { - BeforeEach(func() { - provider = "rancher" - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyHeaderKV("api-key", "test-api-key"), - ghttp.VerifyRequest(http.MethodGet, "/tokens", "provider=rancher"), - ghttp.RespondWith(http.StatusOK, `{"token":"some.bearer.token"}`), - )) - }) - - It("succeeds", func() { - Expect(err).To(BeNil()) - Expect(token).To(Equal("some.bearer.token")) - }) - }) - - When("provider is rancher and the 60 second short expiry has passed", func() { - BeforeEach(func() { - provider = "rancher" - client = NewClient(server.URL()) - client.WithAPIKey("test-api-key") - client.WithShortExpiration(2) - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyHeaderKV("api-key", "test-api-key"), - ghttp.VerifyRequest(http.MethodGet, "/tokens", "provider=rancher"), - ghttp.RespondWith(http.StatusOK, `{"token":"some.bearer.token"}`), - )) - - // call to test the short expiration - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyHeaderKV("api-key", "test-api-key"), - ghttp.VerifyRequest(http.MethodGet, "/tokens", "provider=rancher"), - ghttp.RespondWith(http.StatusOK, `{"token":"new.bearer.token"}`), - )) - }) - It("returns a new token", func() { - Expect(err).To(BeNil()) - Expect(token).To(Equal("some.bearer.token")) - - time.Sleep(3 * time.Second) - - token, err = client.Token(provider) - Expect(err).To(BeNil()) - Expect(token).To(Equal("new.bearer.token")) - }) - }) - - When("it succeeds", func() { - BeforeEach(func() { - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyHeaderKV("api-key", "test-api-key"), - ghttp.VerifyRequest(http.MethodGet, "/tokens", "provider=google"), - ghttp.RespondWith(http.StatusOK, `{"token":"some.bearer.token"}`), - )) - }) - - It("succeeds", func() { - Expect(err).To(BeNil()) - Expect(token).To(Equal("some.bearer.token")) - }) - }) - }) -}) diff --git a/internal/artifact/controller.go b/internal/artifact/controller.go index a2452f2..4f87cf7 100644 --- a/internal/artifact/controller.go +++ b/internal/artifact/controller.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "net/http" + "os" "path/filepath" "strings" @@ -78,7 +78,7 @@ func NewCredentialsController(dir string) (CredentialsController, error) { httpClients: map[string]*http.Client{}, } - files, err := ioutil.ReadDir(dir) + files, err := os.ReadDir(dir) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func NewCredentialsController(dir string) (CredentialsController, error) { path = ln } - b, err := ioutil.ReadFile(path) + b, err := os.ReadFile(path) if err != nil { // Just continue if we're not able to read the 'file' as the file might be a symlink to // a dir when using kubernetes ConfigMaps, for example: diff --git a/internal/artifact/controller_test.go b/internal/artifact/controller_test.go index 673c5bc..e870236 100644 --- a/internal/artifact/controller_test.go +++ b/internal/artifact/controller_test.go @@ -1,7 +1,7 @@ package artifact_test import ( - "io/ioutil" + "io" "log" "net/http" "os" @@ -23,7 +23,7 @@ var _ = Describe("Controller", func() { BeforeEach(func() { dir = "test" - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) Describe("#NewCredentialsController", func() { @@ -46,7 +46,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") }) AfterEach(func() { @@ -63,7 +63,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") _, err = tmpFile.WriteString("{}") Expect(err).To(BeNil()) }) @@ -82,7 +82,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") _, err = tmpFile.WriteString(`{ "name": "helm-test" }`) @@ -103,7 +103,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "gcs-fake.json") + tmpFile, err = os.CreateTemp("test", "gcs-fake.json") _, err = tmpFile.WriteString(`{ "name": "gcs-fake", "types": [ @@ -128,7 +128,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") _, err = tmpFile.WriteString(`{ "enterprise": true, "name": "github.example2.com", @@ -153,7 +153,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") _, err = tmpFile.WriteString(`{ "baseURL": ":haha", "enterprise": true, @@ -179,7 +179,7 @@ var _ = Describe("Controller", func() { var tmpFile *os.File BeforeEach(func() { - tmpFile, err = ioutil.TempFile("test", "cred*.json") + tmpFile, err = os.CreateTemp("test", "cred*.json") _, err = tmpFile.WriteString(`{ "name": "helm-test2", "types": [ diff --git a/internal/controller.go b/internal/controller.go index bad1e84..d039d98 100644 --- a/internal/controller.go +++ b/internal/controller.go @@ -7,7 +7,7 @@ import ( "k8s.io/client-go/rest" - "github.com/homedepot/go-clouddriver/internal/arcade" + arcade "github.com/homedepot/arcade/pkg" "github.com/homedepot/go-clouddriver/internal/artifact" "github.com/homedepot/go-clouddriver/internal/fiat" "github.com/homedepot/go-clouddriver/internal/front50" diff --git a/internal/controller_test.go b/internal/controller_test.go index ce722bf..dee4689 100644 --- a/internal/controller_test.go +++ b/internal/controller_test.go @@ -2,15 +2,15 @@ package internal_test import ( "errors" - "io/ioutil" + "io" "log" "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "github.com/homedepot/arcade/pkg/arcadefakes" "github.com/homedepot/go-clouddriver/internal" - "github.com/homedepot/go-clouddriver/internal/arcade/arcadefakes" "github.com/homedepot/go-clouddriver/internal/kubernetes" "github.com/homedepot/go-clouddriver/internal/kubernetes/kubernetesfakes" "github.com/homedepot/go-clouddriver/internal/sql/sqlfakes" @@ -70,7 +70,7 @@ var _ = Describe("Controller", func() { KubernetesController: fakeKubernetesController, SQLClient: fakeSQLClient, } - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) }) Describe("#KubernetesProvider", func() { diff --git a/internal/fiat/client.go b/internal/fiat/client.go index e07950b..1626372 100644 --- a/internal/fiat/client.go +++ b/internal/fiat/client.go @@ -3,7 +3,7 @@ package fiat import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" ) @@ -80,7 +80,7 @@ func (c *client) Authorize(account string) (Response, error) { return Response{}, fmt.Errorf("user authorization error: %s", res.Status) } - b, err := ioutil.ReadAll(res.Body) + b, err := io.ReadAll(res.Body) if err != nil { return Response{}, err } diff --git a/internal/front50/client.go b/internal/front50/client.go index be9431b..bd9c82e 100644 --- a/internal/front50/client.go +++ b/internal/front50/client.go @@ -3,7 +3,7 @@ package front50 import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" ) @@ -77,7 +77,7 @@ func (c *client) Project(project string) (Response, error) { return Response{}, fmt.Errorf("user authorization error: %s", res.Status) } - b, err := ioutil.ReadAll(res.Body) + b, err := io.ReadAll(res.Body) if err != nil { return Response{}, err } diff --git a/internal/helm/client.go b/internal/helm/client.go index b7b3350..e51e61e 100644 --- a/internal/helm/client.go +++ b/internal/helm/client.go @@ -3,7 +3,7 @@ package helm import ( "errors" "fmt" - "io/ioutil" + "io" "net/http" "sync" @@ -94,7 +94,7 @@ func (c *client) GetIndex() (Index, error) { return i, errors.New("error getting helm index: " + res.Status) } - b, err := ioutil.ReadAll(res.Body) + b, err := io.ReadAll(res.Body) if err != nil { return i, err } @@ -155,7 +155,7 @@ func (c *client) GetChart(name, version string) ([]byte, error) { continue } - b, err = ioutil.ReadAll(res.Body) + b, err = io.ReadAll(res.Body) if err != nil { continue } diff --git a/internal/kubernetes/cached/disk/cached_discovery.go b/internal/kubernetes/cached/disk/cached_discovery.go index d2b3b8e..40f1f28 100644 --- a/internal/kubernetes/cached/disk/cached_discovery.go +++ b/internal/kubernetes/cached/disk/cached_discovery.go @@ -18,7 +18,7 @@ package disk import ( "errors" - "io/ioutil" + "io" "net/http" "os" "path/filepath" @@ -177,7 +177,7 @@ func (d *cachedDiscoveryClient) getCachedFile(filename string) ([]byte, error) { } // the cache is present and its valid. Try to read and use it. - cachedBytes, err := ioutil.ReadAll(file) + cachedBytes, err := io.ReadAll(file) if err != nil { return nil, err } @@ -199,7 +199,7 @@ func (d *cachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Obj return err } - f, err := ioutil.TempFile(filepath.Dir(filename), filepath.Base(filename)+".") + f, err := os.CreateTemp(filepath.Dir(filename), filepath.Base(filename)+".") if err != nil { return err } diff --git a/internal/kubernetes/cached/disk/cached_discovery_test.go b/internal/kubernetes/cached/disk/cached_discovery_test.go index 5d8f3b4..5fd797a 100644 --- a/internal/kubernetes/cached/disk/cached_discovery_test.go +++ b/internal/kubernetes/cached/disk/cached_discovery_test.go @@ -18,7 +18,6 @@ package disk_test import ( "fmt" - "io/ioutil" "os" "path/filepath" "time" @@ -48,7 +47,7 @@ var _ = Describe("CachedDiscovery", func() { Describe("#Fresh", func() { BeforeEach(func() { - d, err = ioutil.TempDir("", "") + d, err = os.MkdirTemp("", "") Expect(err).To(BeNil()) c = &fakeDiscoveryClient{} cdc = NewCachedDiscoveryClient(c, d, 60*time.Second) @@ -169,7 +168,7 @@ var _ = Describe("CachedDiscovery", func() { Describe("#TTL", func() { BeforeEach(func() { - d, err = ioutil.TempDir("", "") + d, err = os.MkdirTemp("", "") Expect(err).To(BeNil()) c = &fakeDiscoveryClient{} cdc = NewCachedDiscoveryClient(c, d, 1*time.Nanosecond) @@ -195,7 +194,7 @@ var _ = Describe("CachedDiscovery", func() { Describe("#PathPerm", func() { BeforeEach(func() { - d, err = ioutil.TempDir("", "") + d, err = os.MkdirTemp("", "") Expect(err).To(BeNil()) os.RemoveAll(d) c = &fakeDiscoveryClient{} diff --git a/internal/kubernetes/cached/disk/round_tripper_test.go b/internal/kubernetes/cached/disk/round_tripper_test.go index 42e24c9..8bfb908 100644 --- a/internal/kubernetes/cached/disk/round_tripper_test.go +++ b/internal/kubernetes/cached/disk/round_tripper_test.go @@ -19,7 +19,7 @@ package disk_test import ( "bytes" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -55,7 +55,7 @@ var _ = Describe("CachedDiscovery", func() { BeforeEach(func() { rt = &testRoundTripper{} - cacheDir, err = ioutil.TempDir("", "cache-rt") + cacheDir, err = os.MkdirTemp("", "cache-rt") Expect(err).To(BeNil()) }) @@ -81,7 +81,7 @@ var _ = Describe("CachedDiscovery", func() { JustBeforeEach(func() { resp, err = cache.RoundTrip(req) Expect(err).To(BeNil()) - content, err = ioutil.ReadAll(resp.Body) + content, err = io.ReadAll(resp.Body) Expect(err).To(BeNil()) }) @@ -89,7 +89,7 @@ var _ = Describe("CachedDiscovery", func() { BeforeEach(func() { rt.Response = &http.Response{ Header: http.Header{"ETag": []string{`"123456"`}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))), + Body: io.NopCloser(bytes.NewReader([]byte("Content"))), StatusCode: http.StatusOK, } }) @@ -103,7 +103,7 @@ var _ = Describe("CachedDiscovery", func() { BeforeEach(func() { rt.Response = &http.Response{ StatusCode: http.StatusNotModified, - Body: ioutil.NopCloser(bytes.NewReader([]byte("Other Content"))), + Body: io.NopCloser(bytes.NewReader([]byte("Other Content"))), } }) @@ -117,7 +117,7 @@ var _ = Describe("CachedDiscovery", func() { os.RemoveAll(cacheDir) rt.Response = &http.Response{ Header: http.Header{"ETag": []string{`"123456"`}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))), + Body: io.NopCloser(bytes.NewReader([]byte("Content"))), StatusCode: http.StatusOK, } }) diff --git a/internal/kubernetes/cached/memory/round_tripper_test.go b/internal/kubernetes/cached/memory/round_tripper_test.go index cedd89f..f3e0be8 100644 --- a/internal/kubernetes/cached/memory/round_tripper_test.go +++ b/internal/kubernetes/cached/memory/round_tripper_test.go @@ -18,7 +18,7 @@ package memory_test import ( "bytes" - "io/ioutil" + "io" "net/http" "net/url" @@ -77,7 +77,7 @@ var _ = Describe("CachedDiscovery", func() { JustBeforeEach(func() { resp, err = cache.RoundTrip(req) Expect(err).To(BeNil()) - content, err = ioutil.ReadAll(resp.Body) + content, err = io.ReadAll(resp.Body) Expect(err).To(BeNil()) }) @@ -85,7 +85,7 @@ var _ = Describe("CachedDiscovery", func() { BeforeEach(func() { rt.Response = &http.Response{ Header: http.Header{"ETag": []string{`"123456"`}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))), + Body: io.NopCloser(bytes.NewReader([]byte("Content"))), StatusCode: http.StatusOK, } }) @@ -99,7 +99,7 @@ var _ = Describe("CachedDiscovery", func() { BeforeEach(func() { rt.Response = &http.Response{ StatusCode: http.StatusNotModified, - Body: ioutil.NopCloser(bytes.NewReader([]byte("Other Content"))), + Body: io.NopCloser(bytes.NewReader([]byte("Other Content"))), } }) diff --git a/internal/middleware/auth_test.go b/internal/middleware/auth_test.go index fdc9069..f865570 100644 --- a/internal/middleware/auth_test.go +++ b/internal/middleware/auth_test.go @@ -3,7 +3,7 @@ package middleware_test import ( "bytes" "errors" - "io/ioutil" + "io" "net/http" "net/http/httptest" @@ -230,7 +230,7 @@ var _ = Describe("Auth", func() { Describe("#AuthOps", func() { BeforeEach(func() { - c.Request, _ = http.NewRequest(http.MethodPost, "", ioutil.NopCloser(bytes.NewReader([]byte(`[ + c.Request, _ = http.NewRequest(http.MethodPost, "", io.NopCloser(bytes.NewReader([]byte(`[ { "cleanupArtifacts": { "account": "test-cleanup-account" } }, { "deleteManifest": { "account": "test-delete-account" } }, { "deployManifest": { "account": "test-deploy-account" } }, @@ -264,7 +264,7 @@ var _ = Describe("Auth", func() { When("no accounts found in payload", func() { BeforeEach(func() { - c.Request, _ = http.NewRequest(http.MethodPost, "", ioutil.NopCloser(bytes.NewReader([]byte(`[ + c.Request, _ = http.NewRequest(http.MethodPost, "", io.NopCloser(bytes.NewReader([]byte(`[ { "rollingRestartManifest": {} } diff --git a/internal/middleware/log.go b/internal/middleware/log.go index 737a34e..2a96979 100644 --- a/internal/middleware/log.go +++ b/internal/middleware/log.go @@ -6,7 +6,7 @@ import ( "encoding/base64" "encoding/json" "fmt" - "io/ioutil" + "io" "log" "time" @@ -30,13 +30,13 @@ func LogRequest() gin.HandlerFunc { clone := c.Request.Clone(context.TODO()) _, _ = buf.ReadFrom(c.Request.Body) - c.Request.Body = ioutil.NopCloser(&buf) - clone.Body = ioutil.NopCloser(bytes.NewReader(buf.Bytes())) + c.Request.Body = io.NopCloser(&buf) + clone.Body = io.NopCloser(bytes.NewReader(buf.Bytes())) if err != nil { clouddriver.Log(err) } else { - b, _ := ioutil.ReadAll(clone.Body) + b, _ := io.ReadAll(clone.Body) buffer := &bytes.Buffer{} buffer.WriteString(bold("REQUEST: ["+time.Now().In(time.UTC).Format(time.RFC3339)) + bold("]"))