diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2aeea27e..d9583df1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,12 @@ jobs: runs-on: ubuntu-latest env: CGO_ENABLED: 0 + GOEXPERIMENT: greenteagc steps: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25.2 - name: Check out source code uses: actions/checkout@v4 - run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" diff --git a/Dockerfile b/Dockerfile index afbe8e50..b29a8f26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,13 @@ RUN make build_ui ###################################### # Prepare go_builder ###################################### -FROM golang:1.24-alpine as go_builder +FROM golang:1.25.2-alpine as go_builder WORKDIR /go/src/github.com/openflagr/flagr RUN apk add --no-cache git make build-base ADD . . ENV CGO_ENABLED=0 +ENV GOEXPERIMENT=greenteagc RUN make build FROM alpine diff --git a/Makefile b/Makefile index 7b04c336..7cbab95e 100644 --- a/Makefile +++ b/Makefile @@ -44,8 +44,8 @@ start: gen: api_docs swagger deps: - @CGO_ENABLED=0 go install github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0 - @CGO_ENABLED=0 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5 + @CGO_ENABLED=0 go install github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1 + @CGO_ENABLED=0 go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0 serve_docs: @npm install -g docsify-cli@4 diff --git a/go.mod b/go.mod index b38ed492..9addef8d 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ module github.com/openflagr/flagr -go 1.23.0 +go 1.25.2 require ( - cloud.google.com/go v0.110.0 // indirect + cloud.google.com/go v0.123.0 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible github.com/Shopify/sarama v1.38.0 github.com/a8m/kinesis-producer v0.2.0 github.com/auth0/go-jwt-middleware v1.0.2-0.20210804140707-b4090e955b98 github.com/avast/retry-go v3.0.0+incompatible - github.com/aws/aws-sdk-go v1.44.180 - github.com/brandur/simplebox v0.0.0-20150921201729-84e9865bb03a + github.com/aws/aws-sdk-go v1.55.8 + github.com/brandur/simplebox v0.1.0 github.com/bsm/ratelimit v2.0.0+incompatible github.com/caarlos0/env v3.5.0+incompatible github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect @@ -19,15 +19,15 @@ require ( github.com/evalphobia/logrus_sentry v0.8.2 github.com/form3tech-oss/jwt-go v3.2.5+incompatible github.com/getsentry/raven-go v0.2.0 - github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/errors v0.22.0 - github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/go-openapi/loads v0.22.0 - github.com/go-openapi/runtime v0.28.0 - github.com/go-openapi/spec v0.21.0 - github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.23.0 - github.com/go-openapi/validate v0.24.0 + github.com/go-openapi/analysis v0.24.0 // indirect + github.com/go-openapi/errors v0.22.3 + github.com/go-openapi/jsonreference v0.21.2 // indirect + github.com/go-openapi/loads v0.23.1 + github.com/go-openapi/runtime v0.29.0 + github.com/go-openapi/spec v0.22.0 + github.com/go-openapi/strfmt v0.24.0 + github.com/go-openapi/swag v0.25.1 + github.com/go-openapi/validate v0.25.0 github.com/gohttp/pprof v0.0.0-20141119085724-c9d246cbb3ba github.com/jessevdk/go-flags v1.5.0 github.com/jpillora/backoff v1.0.0 // indirect @@ -35,26 +35,26 @@ require ( github.com/philhofer/fwd v1.1.2 // indirect github.com/phyber/negroni-gzip v1.0.0 github.com/prashantv/gostub v1.1.0 - github.com/prometheus/client_golang v1.14.0 - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rs/cors v1.8.3 - github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cast v1.5.0 - github.com/stretchr/testify v1.9.0 + github.com/prometheus/client_golang v1.20.4 + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/rs/cors v1.11.1 + github.com/sirupsen/logrus v1.9.3 + github.com/spf13/cast v1.10.0 + github.com/stretchr/testify v1.11.1 github.com/tinylib/msgp v1.1.8 // indirect github.com/urfave/negroni v1.0.0 github.com/yadvendar/negroni-newrelic-go-agent v0.0.0-20160803090806-3dc58758cb67 github.com/zhouzhuojie/conditions v0.2.3 github.com/zhouzhuojie/withtimeout v0.0.0-20190405051827-12b39eb2edd5 - golang.org/x/net v0.33.0 - google.golang.org/api v0.114.0 - google.golang.org/grpc v1.56.3 + golang.org/x/net v0.46.0 + google.golang.org/api v0.247.0 + google.golang.org/grpc v1.74.2 gopkg.in/DataDog/dd-trace-go.v1 v1.46.0 ) require ( - cloud.google.com/go/pubsub v1.30.0 + cloud.google.com/go/pubsub v1.49.0 github.com/glebarez/sqlite v1.6.0 github.com/newrelic/go-agent v2.1.0+incompatible gorm.io/driver/mysql v1.4.5 @@ -63,8 +63,10 @@ require ( ) require ( - cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/iam v0.13.0 // indirect + cloud.google.com/go/auth v0.16.4 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.8.0 // indirect + cloud.google.com/go/iam v1.5.2 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.41.1 // indirect github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.42.0-rc.5 // indirect github.com/DataDog/datadog-go/v5 v5.2.0 // indirect @@ -73,24 +75,39 @@ require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/go-resiliency v1.3.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/glebarez/go-sqlite v1.21.2 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/swag/cmdutils v0.25.1 // indirect + github.com/go-openapi/swag/conv v0.25.1 // indirect + github.com/go-openapi/swag/fileutils v0.25.1 // indirect + github.com/go-openapi/swag/jsonname v0.25.1 // indirect + github.com/go-openapi/swag/jsonutils v0.25.1 // indirect + github.com/go-openapi/swag/loading v0.25.1 // indirect + github.com/go-openapi/swag/mangling v0.25.1 // indirect + github.com/go-openapi/swag/netutils v0.25.1 // indirect + github.com/go-openapi/swag/stringutils v0.25.1 // indirect + github.com/go-openapi/swag/typeutils v0.25.1 // indirect + github.com/go-openapi/swag/yamlutils v0.25.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect - github.com/golang/glog v1.2.4 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/golang/glog v1.2.5 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect + github.com/googleapis/gax-go/v2 v2.15.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect @@ -106,37 +123,45 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/compress v1.15.14 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/common v0.39.0 // indirect + github.com/prometheus/common v0.66.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect - go.mongodb.org/mongo-driver v1.15.1 // indirect + go.einride.tech/aip v0.68.1 // indirect + go.mongodb.org/mongo-driver v1.17.4 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect go.uber.org/atomic v1.10.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect - golang.org/x/crypto v0.31.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/crypto v0.43.0 // indirect + golang.org/x/mod v0.28.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/time v0.12.0 // indirect + golang.org/x/tools v0.37.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect + google.golang.org/protobuf v1.36.8 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect inet.af/netaddr v0.0.0-20220811202034-502d2d690317 // indirect modernc.org/libc v1.22.5 // indirect diff --git a/go.sum b/go.sum index 47d65b92..d04defc7 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,20 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/kms v1.10.1 h1:7hm1bRqGCA1GBRQUrp831TwJ9TWhP+tvLuP497CQS2g= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/pubsub v1.30.0 h1:vCge8m7aUKBJYOgrZp7EsNDf6QMd2CAlXZqWTn3yq6s= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= +cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= +cloud.google.com/go/auth v0.16.4 h1:fXOAIQmkApVvcIn7Pc2+5J8QTMVbUGLscnSVNl11su8= +cloud.google.com/go/auth v0.16.4/go.mod h1:j10ncYwjX/g3cdX7GpEzsdM+d+ZNsXAbb6qXA7p1Y5M= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.8.0 h1:HxMRIbao8w17ZX6wBnjhcDkW6lTFpgcaobyVfZWqRLA= +cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= +cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= +cloud.google.com/go/kms v1.22.0 h1:dBRIj7+GDeeEvatJeTB19oYZNV0aj6wEqSIT/7gLqtk= +cloud.google.com/go/kms v1.22.0/go.mod h1:U7mf8Sva5jpOb4bxYZdtw/9zsbIjrklYwPcvMk34AL8= +cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= +cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= +cloud.google.com/go/pubsub v1.49.0 h1:5054IkbslnrMCgA2MAEPcsN3Ky+AyMpEZcii/DoySPo= +cloud.google.com/go/pubsub v1.49.0/go.mod h1:K1FswTWP+C1tI/nfi3HQecoVeFvL4HUOB1tdaNXKhUY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/datadog-agent/pkg/obfuscate v0.41.1 h1:AHZu7lzfW6amjOLkbjioAxT+pKiiwD6KdkR0VfT3pMw= github.com/DataDog/datadog-agent/pkg/obfuscate v0.41.1/go.mod h1:DNHeRExTGWQoMgmOgcDtNENOEHN/tYJIicmAUgW1nXk= @@ -41,12 +45,12 @@ github.com/auth0/go-jwt-middleware v1.0.2-0.20210804140707-b4090e955b98 h1:cH5eD github.com/auth0/go-jwt-middleware v1.0.2-0.20210804140707-b4090e955b98/go.mod h1:YSeUX3z6+TF2H+7padiEqNJ73Zy9vXW72U//IgN0BIM= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= -github.com/aws/aws-sdk-go v1.44.180 h1:VLZuAHI9fa/3WME5JjpVjcPCNfpGHVMiHx8sLHWhMgI= -github.com/aws/aws-sdk-go v1.44.180/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ= +github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk= 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/brandur/simplebox v0.0.0-20150921201729-84e9865bb03a h1:EMG9wk3iGM7WBAohiKenvpfyh1L5jv3snIMj3ffAMY8= -github.com/brandur/simplebox v0.0.0-20150921201729-84e9865bb03a/go.mod h1:8hDWkKEpFQwZcugC69PxsoNQMh+0/A3FzLCppp/yJZM= +github.com/brandur/simplebox v0.1.0 h1:6LKvBOuQ/KNDtuNg0e/OTLeS6IDKN1osuXGF67xEynk= +github.com/brandur/simplebox v0.1.0/go.mod h1:ve8E6jyrNkKHIdDJwpoGcNrNCuNUYFBdLUor2SmwmT8= github.com/bsm/ratelimit v2.0.0+incompatible h1:cV5yEqApIEkLumVjN65y/PlVrzJfCfz+b7BUQrNvCxA= github.com/bsm/ratelimit v2.0.0+incompatible/go.mod h1:CKXgBlwczX35ERUvw2g6Nl+CT0QNd5m+xh3fpzjgbzo= github.com/caarlos0/env v3.5.0+incompatible h1:Yy0UN8o9Wtr/jGHZDpCBLpNrzcFLLM2yixi/rBrKyJs= @@ -55,8 +59,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s= github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -95,14 +99,16 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evalphobia/logrus_sentry v0.8.2 h1:dotxHq+YLZsT1Bb45bB5UQbfCh3gM/nFFetyN46VoDQ= github.com/evalphobia/logrus_sentry v0.8.2/go.mod h1:pKcp+vriitUqu9KiWj/VRFbRfFNUwz95/UkgG8a6MNc= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e/go.mod h1:HyVoz1Mz5Co8TFO8EupIdlcpwShBmY98dkT2xeHkvEI= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -113,43 +119,72 @@ github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9g github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= github.com/glebarez/sqlite v1.6.0 h1:ZpvDLv4zBi2cuuQPitRiVz/5Uh6sXa5d8eBu0xNTpAo= github.com/glebarez/sqlite v1.6.0/go.mod h1:6D6zPU/HTrFlYmVDKqBJlmQvma90P6r7sRRdkUUZOYk= -github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= -github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= -github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= -github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= -github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= -github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= -github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= -github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= -github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= -github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= -github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= -github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= +github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= +github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= +github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= +github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= +github.com/go-openapi/loads v0.23.1 h1:H8A0dX2KDHxDzc797h0+uiCZ5kwE2+VojaQVaTlXvS0= +github.com/go-openapi/loads v0.23.1/go.mod h1:hZSXkyACCWzWPQqizAv/Ye0yhi2zzHwMmoXQ6YQml44= +github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= +github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= +github.com/go-openapi/spec v0.22.0 h1:xT/EsX4frL3U09QviRIZXvkh80yibxQmtoEvyqug0Tw= +github.com/go-openapi/spec v0.22.0/go.mod h1:K0FhKxkez8YNS94XzF8YKEMULbFrRw4m15i2YUht4L0= +github.com/go-openapi/strfmt v0.24.0 h1:dDsopqbI3wrrlIzeXRbqMihRNnjzGC+ez4NQaAAJLuc= +github.com/go-openapi/strfmt v0.24.0/go.mod h1:Lnn1Bk9rZjXxU9VMADbEEOo7D7CDyKGLsSKekhFr7s4= +github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= +github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= +github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= +github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= +github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= +github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= +github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= +github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= +github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= +github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= +github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= +github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= +github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= +github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= +github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= +github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= +github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= +github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= +github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= +github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= +github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= +github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= +github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= +github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= +github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gohttp/pprof v0.0.0-20141119085724-c9d246cbb3ba h1:OckY4Dk1WhEEEz4zYYMsXG5f6necMtGAyAs19vcpRXk= github.com/gohttp/pprof v0.0.0-20141119085724-c9d246cbb3ba/go.mod h1:V97TX7IXWIioKfmy0IKnnBzsC1jRXP2VicslN9O8IIQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= -github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -160,8 +195,8 @@ 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.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/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -172,21 +207,23 @@ github.com/google/go-cmp v0.5.0/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -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-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= +github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= +github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -239,15 +276,13 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/klauspost/compress v1.15.14 h1:i7WCKDToww0wA+9qrUZ1xOjp218vfFo3nTU6UHp+gOc= -github.com/klauspost/compress v1.15.14/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -257,18 +292,16 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/meatballhat/negroni-logrus v1.1.1 h1:eDgsDdJYy97gI9kr+YS/uDKCaqK4S6CUQLPG0vNDqZA= github.com/meatballhat/negroni-logrus v1.1.1/go.mod h1:FlwPdXB6PeT8EG/gCd/2766M2LNF7SwZiNGD6t2NRGU= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/newrelic/go-agent v2.1.0+incompatible h1:fCuxXeM4eeIKPbzffOWW6y2Dj+eYfc3yylgNZACZqkM= github.com/newrelic/go-agent v2.1.0+incompatible/go.mod h1:a8Fv1b/fYhFSReoTU6HDkTYIMZeSVNffmoS726Y0LzQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -301,38 +334,38 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/secure-systems-lab/go-securesystemslib v0.3.1/go.mod h1:o8hhjkbNl2gOamKUA/eNW3xUrntHT9L4W89W1nfj43U= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0 h1:MkTeG1DMwsrdH7QtLXy5W+fUxWq+vmb6cLmyJ7aRtF0= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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= @@ -347,8 +380,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= @@ -363,12 +396,36 @@ github.com/zhouzhuojie/conditions v0.2.3 h1:TS3X6vA9CVXXteRdeXtpOw3hAar+01f0TI/d github.com/zhouzhuojie/conditions v0.2.3/go.mod h1:Izhy98HD3MkfwGPz+p9ZV2JuqrpbHjaQbUq9iZHh+ZY= github.com/zhouzhuojie/withtimeout v0.0.0-20190405051827-12b39eb2edd5 h1:YuR5otuPvpk6EPrKy9rVXiQKTqgY6OEqSlzko9kcfCI= github.com/zhouzhuojie/withtimeout v0.0.0-20190405051827-12b39eb2edd5/go.mod h1:nhm/3zpPm56iKoXLEeeevuI5V9qEtNhuhLbPZwcrgcs= -go.mongodb.org/mongo-driver v1.15.1 h1:l+RvoUOoMXFmADTLfYDm7On9dRm7p4T80/lEQM+r7HU= -go.mongodb.org/mongo-driver v1.15.1/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.einride.tech/aip v0.68.1 h1:16/AfSxcQISGN5z9C5lM+0mLYXihrHbQ1onvYTr93aQ= +go.einride.tech/aip v0.68.1/go.mod h1:XaFtaj4HuA3Zwk9xoBtTWgNubZ0ZZXv9BZJCkuKuWbg= +go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= +go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/intern v0.0.0-20220617035311-6925f38cc365 h1:t9hFvR102YlOqU0fQn1wgwhNvSbHGBbbJxX9JKfU3l0= go4.org/intern v0.0.0-20220617035311-6925f38cc365/go.mod h1:WXRv3p7T6gzt0CcJm43AAKdKVZmcQbwwC7EwquU5BZU= @@ -383,8 +440,8 @@ golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -393,15 +450,14 @@ golang.org/x/mod v0.3.0/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.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= 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= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -415,24 +471,22 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= 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= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -463,13 +517,11 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -477,12 +529,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -496,32 +547,34 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.247.0 h1:tSd/e0QrUlLsrwMKmkbQhYVa109qIintOls2Wh6bngc= +google.golang.org/api v0.247.0/go.mod h1:r1qZOPmxXffXg6xS5uhx16Fa/UFY8QU/K4bfKrnvovM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= +google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= +google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= +google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -534,8 +587,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/DataDog/dd-trace-go.v1 v1.46.0 h1:h/SbNfGfDMhBkB+/zzCWKPOlLcdd0Fc+QBAnZm009XM= gopkg.in/DataDog/dd-trace-go.v1 v1.46.0/go.mod h1:kaa8caaECrtY0V/MUtPQAh1lx/euFzPJwrY1taTx3O4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -563,6 +616,8 @@ gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.24.2/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= gorm.io/gorm v1.24.3 h1:WL2ifUmzR/SLp85CSURAfybcHnGZ+yLSGSxgYXlFBHg= gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= inet.af/netaddr v0.0.0-20220811202034-502d2d690317 h1:U2fwK6P2EqmopP/hFLTOAjWTki0qgd4GMJn5X8wOleU= diff --git a/integration_tests/Dockerfile-Integration-Test b/integration_tests/Dockerfile-Integration-Test index 75383589..73648a78 100644 --- a/integration_tests/Dockerfile-Integration-Test +++ b/integration_tests/Dockerfile-Integration-Test @@ -1,8 +1,9 @@ -FROM golang:1.24-alpine as go_builder +FROM golang:1.25.2-alpine as go_builder WORKDIR /go/src/github.com/openflagr/flagr RUN apk add --no-cache git make build-base ADD . . ENV CGO_ENABLED=0 +ENV GOEXPERIMENT=greenteagc RUN make build FROM alpine diff --git a/pkg/entity/flag.go b/pkg/entity/flag.go index 0132226b..8704496b 100644 --- a/pkg/entity/flag.go +++ b/pkg/entity/flag.go @@ -77,7 +77,7 @@ func (f *Flag) PrepareEvaluation() error { } } for i := range f.Variants { - f.FlagEvaluation.VariantsMap[f.Variants[i].Model.ID] = &f.Variants[i] + f.FlagEvaluation.VariantsMap[f.Variants[i].ID] = &f.Variants[i] } return nil } diff --git a/pkg/entity/flag_snapshot.go b/pkg/entity/flag_snapshot.go index 28dc088e..b814a116 100644 --- a/pkg/entity/flag_snapshot.go +++ b/pkg/entity/flag_snapshot.go @@ -42,7 +42,7 @@ func SaveFlagSnapshot(db *gorm.DB, flagID uint, updatedBy string) { return } - fs := FlagSnapshot{FlagID: f.Model.ID, UpdatedBy: updatedBy, Flag: b} + fs := FlagSnapshot{FlagID: f.ID, UpdatedBy: updatedBy, Flag: b} if err := tx.Create(&fs).Error; err != nil { logrus.WithFields(logrus.Fields{ "err": err, @@ -53,7 +53,7 @@ func SaveFlagSnapshot(db *gorm.DB, flagID uint, updatedBy string) { } f.UpdatedBy = updatedBy - f.SnapshotID = fs.Model.ID + f.SnapshotID = fs.ID if err := tx.Save(f).Error; err != nil { logrus.WithFields(logrus.Fields{ diff --git a/pkg/entity/flag_snapshot_test.go b/pkg/entity/flag_snapshot_test.go index 1f22323e..9293663e 100644 --- a/pkg/entity/flag_snapshot_test.go +++ b/pkg/entity/flag_snapshot_test.go @@ -16,7 +16,7 @@ func TestSaveFlagSnapshot(t *testing.T) { defer tmpDB.Close() t.Run("happy code path", func(t *testing.T) { - SaveFlagSnapshot(db, f.Model.ID, "flagr-test@example.com") + SaveFlagSnapshot(db, f.ID, "flagr-test@example.com") }) t.Run("save on non-existing flag", func(t *testing.T) { diff --git a/pkg/handler/crud.go b/pkg/handler/crud.go index 64f2d4d0..389b692d 100644 --- a/pkg/handler/crud.go +++ b/pkg/handler/crud.go @@ -181,10 +181,7 @@ func (c *crud) GetFlagSnapshots(params flag.GetFlagSnapshotsParams) middleware.R tx = tx.Offset(int(*params.Offset)) } - descending := true - if params.Sort != nil && *params.Sort == "ASC" { - descending = false - } + descending := params.Sort == nil || *params.Sort != "ASC" if err := tx. Order(clause.OrderByColumn{ diff --git a/pkg/handler/data_recorder_kinesis.go b/pkg/handler/data_recorder_kinesis.go index 4ef276a3..04c4f6f2 100644 --- a/pkg/handler/data_recorder_kinesis.go +++ b/pkg/handler/data_recorder_kinesis.go @@ -3,9 +3,9 @@ package handler import ( producer "github.com/a8m/kinesis-producer" "github.com/a8m/kinesis-producer/loggers/kplogrus" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/kinesis" + "github.com/aws/aws-sdk-go/aws" //nolint:staticcheck // Using AWS SDK v1 intentionally for backward compatibility + "github.com/aws/aws-sdk-go/aws/session" //nolint:staticcheck // Using AWS SDK v1 intentionally for backward compatibility + "github.com/aws/aws-sdk-go/service/kinesis" //nolint:staticcheck // Using AWS SDK v1 intentionally for backward compatibility "github.com/openflagr/flagr/pkg/config" "github.com/openflagr/flagr/swagger_gen/models" "github.com/sirupsen/logrus" diff --git a/pkg/handler/data_recorder_pubsub_test.go b/pkg/handler/data_recorder_pubsub_test.go index 0000f4a1..5fc994af 100644 --- a/pkg/handler/data_recorder_pubsub_test.go +++ b/pkg/handler/data_recorder_pubsub_test.go @@ -60,7 +60,7 @@ func mockClient(t *testing.T) *pubsub.Client { ctx := context.Background() srv := pstest.NewServer() defer srv.Close() - conn, err := grpc.Dial(srv.Addr, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(srv.Addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal("cannot connect to mocked server") } diff --git a/pkg/handler/fixture.go b/pkg/handler/fixture.go index ad84e591..2b8c510f 100644 --- a/pkg/handler/fixture.go +++ b/pkg/handler/fixture.go @@ -16,7 +16,7 @@ func GenFixtureEvalCache() *EvalCache { ec := &EvalCache{ cache: &cacheContainer{ - idCache: map[string]*entity.Flag{util.SafeString(f.Model.ID): &f}, + idCache: map[string]*entity.Flag{util.SafeString(f.ID): &f}, keyCache: map[string]*entity.Flag{f.Key: &f}, tagCache: tagCache, }, diff --git a/pkg/mapper/entity_restapi/r2e/r2e.go b/pkg/mapper/entity_restapi/r2e/r2e.go index a4e169e8..4e90d56d 100644 --- a/pkg/mapper/entity_restapi/r2e/r2e.go +++ b/pkg/mapper/entity_restapi/r2e/r2e.go @@ -36,7 +36,7 @@ func MapAttachment(a interface{}) (entity.Attachment, error) { if a != nil { m, ok := a.(map[string]interface{}) if !ok { - return e, fmt.Errorf("Make sure JSON is properly formatted into key/value pairs. Invalid attachment format %s", spew.Sdump(a)) + return e, fmt.Errorf("make sure JSON is properly formatted into key/value pairs. Invalid attachment format %s", spew.Sdump(a)) } e = m } diff --git a/swagger_gen/cmd/flagr-server/main.go b/swagger_gen/cmd/flagr-server/main.go index 75a7196a..dc10ebd2 100644 --- a/swagger_gen/cmd/flagr-server/main.go +++ b/swagger_gen/cmd/flagr-server/main.go @@ -3,12 +3,14 @@ package main import ( + "errors" "log" "os" - "github.com/go-openapi/loads" flags "github.com/jessevdk/go-flags" + "github.com/go-openapi/loads" + "github.com/openflagr/flagr/swagger_gen/restapi" "github.com/openflagr/flagr/swagger_gen/restapi/operations" ) @@ -17,7 +19,6 @@ import ( // Make sure not to overwrite this file after you generated it because all your edits would be lost! func main() { - swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON) if err != nil { log.Fatalln(err) @@ -25,12 +26,11 @@ func main() { api := operations.NewFlagrAPI(swaggerSpec) server := restapi.NewServer(api) - defer server.Shutdown() + server.ConfigureFlags() // inject API-specific custom flags. Must be called before args parsing parser := flags.NewParser(server, flags.Default) parser.ShortDescription = "Flagr" parser.LongDescription = "Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".\n" - server.ConfigureFlags() for _, optsGroup := range api.CommandLineOptionsGroups { _, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options) if err != nil { @@ -40,7 +40,8 @@ func main() { if _, err := parser.Parse(); err != nil { code := 1 - if fe, ok := err.(*flags.Error); ok { + fe := new(flags.Error) + if errors.As(err, &fe) { if fe.Type == flags.ErrHelp { code = 0 } @@ -48,10 +49,11 @@ func main() { os.Exit(code) } - server.ConfigureAPI() + server.ConfigureAPI() // configure handlers, routes and middleware if err := server.Serve(); err != nil { + _ = server.Shutdown() + log.Fatalln(err) } - } diff --git a/swagger_gen/models/constraint.go b/swagger_gen/models/constraint.go index e17c62a1..a8a5f0d8 100644 --- a/swagger_gen/models/constraint.go +++ b/swagger_gen/models/constraint.go @@ -80,7 +80,7 @@ func (m *Constraint) validateID(formats strfmt.Registry) error { return nil } -var constraintTypeOperatorPropEnum []interface{} +var constraintTypeOperatorPropEnum []any func init() { var res []string @@ -199,7 +199,7 @@ func (m *Constraint) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *Constraint) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/models/create_variant_request.go b/swagger_gen/models/create_variant_request.go index 9e9141bb..81b5c750 100644 --- a/swagger_gen/models/create_variant_request.go +++ b/swagger_gen/models/create_variant_request.go @@ -20,7 +20,7 @@ import ( type CreateVariantRequest struct { // attachment - Attachment interface{} `json:"attachment,omitempty"` + Attachment any `json:"attachment,omitempty"` // key // Required: true diff --git a/swagger_gen/models/distribution.go b/swagger_gen/models/distribution.go index ada6f4ab..637ccb3d 100644 --- a/swagger_gen/models/distribution.go +++ b/swagger_gen/models/distribution.go @@ -138,7 +138,7 @@ func (m *Distribution) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *Distribution) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/models/eval_context.go b/swagger_gen/models/eval_context.go index 4541a391..296a6876 100644 --- a/swagger_gen/models/eval_context.go +++ b/swagger_gen/models/eval_context.go @@ -24,7 +24,7 @@ type EvalContext struct { EnableDebug bool `json:"enableDebug,omitempty"` // entity context - EntityContext interface{} `json:"entityContext,omitempty"` + EntityContext any `json:"entityContext,omitempty"` // entityID is used to deterministically at random to evaluate the flag result. If it's empty, flagr will randomly generate one. EntityID string `json:"entityID,omitempty"` @@ -77,7 +77,7 @@ func (m *EvalContext) validateFlagID(formats strfmt.Registry) error { return nil } -var evalContextTypeFlagTagsOperatorPropEnum []interface{} +var evalContextTypeFlagTagsOperatorPropEnum []any func init() { var res []string diff --git a/swagger_gen/models/eval_debug_log.go b/swagger_gen/models/eval_debug_log.go index 496be0ae..f79cf1b0 100644 --- a/swagger_gen/models/eval_debug_log.go +++ b/swagger_gen/models/eval_debug_log.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *EvalDebugLog) validateSegmentDebugLogs(formats strfmt.Registry) error { if m.SegmentDebugLogs[i] != nil { if err := m.SegmentDebugLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("segmentDebugLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("segmentDebugLogs" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *EvalDebugLog) contextValidateSegmentDebugLogs(ctx context.Context, form } if err := m.SegmentDebugLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("segmentDebugLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("segmentDebugLogs" + "." + strconv.Itoa(i)) } + return err } } diff --git a/swagger_gen/models/eval_result.go b/swagger_gen/models/eval_result.go index 4a2cf89b..d518caca 100644 --- a/swagger_gen/models/eval_result.go +++ b/swagger_gen/models/eval_result.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -43,7 +44,7 @@ type EvalResult struct { Timestamp string `json:"timestamp,omitempty"` // variant attachment - VariantAttachment interface{} `json:"variantAttachment,omitempty"` + VariantAttachment any `json:"variantAttachment,omitempty"` // variant ID VariantID int64 `json:"variantID,omitempty"` @@ -77,11 +78,15 @@ func (m *EvalResult) validateEvalContext(formats strfmt.Registry) error { if m.EvalContext != nil { if err := m.EvalContext.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evalContext") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evalContext") } + return err } } @@ -96,11 +101,15 @@ func (m *EvalResult) validateEvalDebugLog(formats strfmt.Registry) error { if m.EvalDebugLog != nil { if err := m.EvalDebugLog.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evalDebugLog") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evalDebugLog") } + return err } } @@ -135,11 +144,15 @@ func (m *EvalResult) contextValidateEvalContext(ctx context.Context, formats str } if err := m.EvalContext.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evalContext") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evalContext") } + return err } } @@ -156,11 +169,15 @@ func (m *EvalResult) contextValidateEvalDebugLog(ctx context.Context, formats st } if err := m.EvalDebugLog.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evalDebugLog") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evalDebugLog") } + return err } } diff --git a/swagger_gen/models/evaluation_batch_request.go b/swagger_gen/models/evaluation_batch_request.go index 9cbaf235..d3735c89 100644 --- a/swagger_gen/models/evaluation_batch_request.go +++ b/swagger_gen/models/evaluation_batch_request.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -95,11 +96,15 @@ func (m *EvaluationBatchRequest) validateEntities(formats strfmt.Registry) error if m.Entities[i] != nil { if err := m.Entities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("entities" + "." + strconv.Itoa(i)) } + return err } } @@ -175,7 +180,7 @@ func (m *EvaluationBatchRequest) validateFlagTags(formats strfmt.Registry) error return nil } -var evaluationBatchRequestTypeFlagTagsOperatorPropEnum []interface{} +var evaluationBatchRequestTypeFlagTagsOperatorPropEnum []any func init() { var res []string @@ -242,11 +247,15 @@ func (m *EvaluationBatchRequest) contextValidateEntities(ctx context.Context, fo } if err := m.Entities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("entities" + "." + strconv.Itoa(i)) } + return err } } diff --git a/swagger_gen/models/evaluation_batch_response.go b/swagger_gen/models/evaluation_batch_response.go index 0fc1359d..d0e32974 100644 --- a/swagger_gen/models/evaluation_batch_response.go +++ b/swagger_gen/models/evaluation_batch_response.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *EvaluationBatchResponse) validateEvaluationResults(formats strfmt.Regis if m.EvaluationResults[i] != nil { if err := m.EvaluationResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evaluationResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evaluationResults" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *EvaluationBatchResponse) contextValidateEvaluationResults(ctx context.C } if err := m.EvaluationResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("evaluationResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("evaluationResults" + "." + strconv.Itoa(i)) } + return err } } diff --git a/swagger_gen/models/evaluation_entity.go b/swagger_gen/models/evaluation_entity.go index df7a6d26..248c9889 100644 --- a/swagger_gen/models/evaluation_entity.go +++ b/swagger_gen/models/evaluation_entity.go @@ -18,7 +18,7 @@ import ( type EvaluationEntity struct { // entity context - EntityContext interface{} `json:"entityContext,omitempty"` + EntityContext any `json:"entityContext,omitempty"` // entity ID EntityID string `json:"entityID,omitempty"` diff --git a/swagger_gen/models/flag.go b/swagger_gen/models/flag.go index bec83168..3b0fe3a2 100644 --- a/swagger_gen/models/flag.go +++ b/swagger_gen/models/flag.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -181,11 +182,15 @@ func (m *Flag) validateSegments(formats strfmt.Registry) error { if m.Segments[i] != nil { if err := m.Segments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("segments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("segments" + "." + strconv.Itoa(i)) } + return err } } @@ -207,11 +212,15 @@ func (m *Flag) validateTags(formats strfmt.Registry) error { if m.Tags[i] != nil { if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } + return err } } @@ -245,11 +254,15 @@ func (m *Flag) validateVariants(formats strfmt.Registry) error { if m.Variants[i] != nil { if err := m.Variants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("variants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("variants" + "." + strconv.Itoa(i)) } + return err } } @@ -287,7 +300,7 @@ func (m *Flag) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Flag) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } @@ -305,11 +318,15 @@ func (m *Flag) contextValidateSegments(ctx context.Context, formats strfmt.Regis } if err := m.Segments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("segments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("segments" + "." + strconv.Itoa(i)) } + return err } } @@ -330,11 +347,15 @@ func (m *Flag) contextValidateTags(ctx context.Context, formats strfmt.Registry) } if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } + return err } } @@ -355,11 +376,15 @@ func (m *Flag) contextValidateVariants(ctx context.Context, formats strfmt.Regis } if err := m.Variants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("variants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("variants" + "." + strconv.Itoa(i)) } + return err } } diff --git a/swagger_gen/models/flag_snapshot.go b/swagger_gen/models/flag_snapshot.go index 7ca500bb..a2ff75c7 100644 --- a/swagger_gen/models/flag_snapshot.go +++ b/swagger_gen/models/flag_snapshot.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -68,11 +69,15 @@ func (m *FlagSnapshot) validateFlag(formats strfmt.Registry) error { if m.Flag != nil { if err := m.Flag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("flag") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("flag") } + return err } } @@ -82,7 +87,7 @@ func (m *FlagSnapshot) validateFlag(formats strfmt.Registry) error { func (m *FlagSnapshot) validateID(formats strfmt.Registry) error { - if err := validate.Required("id", "body", int64(m.ID)); err != nil { + if err := validate.Required("id", "body", m.ID); err != nil { return err } @@ -129,11 +134,15 @@ func (m *FlagSnapshot) contextValidateFlag(ctx context.Context, formats strfmt.R if m.Flag != nil { if err := m.Flag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("flag") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("flag") } + return err } } @@ -143,7 +152,7 @@ func (m *FlagSnapshot) contextValidateFlag(ctx context.Context, formats strfmt.R func (m *FlagSnapshot) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/models/put_distributions_request.go b/swagger_gen/models/put_distributions_request.go index 9ea2709d..48f865b1 100644 --- a/swagger_gen/models/put_distributions_request.go +++ b/swagger_gen/models/put_distributions_request.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PutDistributionsRequest) validateDistributions(formats strfmt.Registry) if m.Distributions[i] != nil { if err := m.Distributions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("distributions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("distributions" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PutDistributionsRequest) contextValidateDistributions(ctx context.Conte } if err := m.Distributions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("distributions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("distributions" + "." + strconv.Itoa(i)) } + return err } } diff --git a/swagger_gen/models/put_variant_request.go b/swagger_gen/models/put_variant_request.go index e5e5d875..aad14f81 100644 --- a/swagger_gen/models/put_variant_request.go +++ b/swagger_gen/models/put_variant_request.go @@ -20,7 +20,7 @@ import ( type PutVariantRequest struct { // attachment - Attachment interface{} `json:"attachment,omitempty"` + Attachment any `json:"attachment,omitempty"` // key // Required: true diff --git a/swagger_gen/models/segment.go b/swagger_gen/models/segment.go index c915a331..9439ffc5 100644 --- a/swagger_gen/models/segment.go +++ b/swagger_gen/models/segment.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -94,11 +95,15 @@ func (m *Segment) validateConstraints(formats strfmt.Registry) error { if m.Constraints[i] != nil { if err := m.Constraints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("constraints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("constraints" + "." + strconv.Itoa(i)) } + return err } } @@ -133,11 +138,15 @@ func (m *Segment) validateDistributions(formats strfmt.Registry) error { if m.Distributions[i] != nil { if err := m.Distributions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("distributions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("distributions" + "." + strconv.Itoa(i)) } + return err } } @@ -222,11 +231,15 @@ func (m *Segment) contextValidateConstraints(ctx context.Context, formats strfmt } if err := m.Constraints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("constraints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("constraints" + "." + strconv.Itoa(i)) } + return err } } @@ -247,11 +260,15 @@ func (m *Segment) contextValidateDistributions(ctx context.Context, formats strf } if err := m.Distributions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("distributions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("distributions" + "." + strconv.Itoa(i)) } + return err } } @@ -263,7 +280,7 @@ func (m *Segment) contextValidateDistributions(ctx context.Context, formats strf func (m *Segment) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/models/tag.go b/swagger_gen/models/tag.go index 8e43218f..b253a846 100644 --- a/swagger_gen/models/tag.go +++ b/swagger_gen/models/tag.go @@ -89,7 +89,7 @@ func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *Tag) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/models/variant.go b/swagger_gen/models/variant.go index d83c8736..3c7567ce 100644 --- a/swagger_gen/models/variant.go +++ b/swagger_gen/models/variant.go @@ -20,7 +20,7 @@ import ( type Variant struct { // attachment - Attachment interface{} `json:"attachment,omitempty"` + Attachment any `json:"attachment,omitempty"` // id // Read Only: true @@ -92,7 +92,7 @@ func (m *Variant) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Variant) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { return err } diff --git a/swagger_gen/restapi/operations/constraint/create_constraint.go b/swagger_gen/restapi/operations/constraint/create_constraint.go index e1ccd517..733c8649 100644 --- a/swagger_gen/restapi/operations/constraint/create_constraint.go +++ b/swagger_gen/restapi/operations/constraint/create_constraint.go @@ -51,6 +51,7 @@ func (o *CreateConstraint) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/constraint/create_constraint_parameters.go b/swagger_gen/restapi/operations/constraint/create_constraint_parameters.go index 45a9f0a9..f9be6f1b 100644 --- a/swagger_gen/restapi/operations/constraint/create_constraint_parameters.go +++ b/swagger_gen/restapi/operations/constraint/create_constraint_parameters.go @@ -6,6 +6,7 @@ package constraint // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewCreateConstraintParams() CreateConstraintParams { // // swagger:parameters createConstraint type CreateConstraintParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,12 +41,14 @@ type CreateConstraintParams struct { In: body */ Body *models.CreateConstraintRequest + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -65,10 +67,12 @@ func (o *CreateConstraintParams) BindRequest(r *http.Request, route *middleware. o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateConstraintRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -130,7 +134,7 @@ func (o *CreateConstraintParams) bindFlagID(rawData []string, hasKey bool, forma return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *CreateConstraintParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -163,7 +167,7 @@ func (o *CreateConstraintParams) bindSegmentID(rawData []string, hasKey bool, fo return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *CreateConstraintParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/constraint/create_constraint_urlbuilder.go b/swagger_gen/restapi/operations/constraint/create_constraint_urlbuilder.go index 28245b04..cd84abed 100644 --- a/swagger_gen/restapi/operations/constraint/create_constraint_urlbuilder.go +++ b/swagger_gen/restapi/operations/constraint/create_constraint_urlbuilder.go @@ -47,14 +47,14 @@ func (o *CreateConstraintURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on CreateConstraintURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on CreateConstraintURL") } diff --git a/swagger_gen/restapi/operations/constraint/delete_constraint.go b/swagger_gen/restapi/operations/constraint/delete_constraint.go index 8e3e284e..1c84ab1b 100644 --- a/swagger_gen/restapi/operations/constraint/delete_constraint.go +++ b/swagger_gen/restapi/operations/constraint/delete_constraint.go @@ -51,6 +51,7 @@ func (o *DeleteConstraint) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/constraint/delete_constraint_parameters.go b/swagger_gen/restapi/operations/constraint/delete_constraint_parameters.go index 5de487d0..70fda792 100644 --- a/swagger_gen/restapi/operations/constraint/delete_constraint_parameters.go +++ b/swagger_gen/restapi/operations/constraint/delete_constraint_parameters.go @@ -28,7 +28,6 @@ func NewDeleteConstraintParams() DeleteConstraintParams { // // swagger:parameters deleteConstraint type DeleteConstraintParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,12 +37,14 @@ type DeleteConstraintParams struct { In: path */ ConstraintID int64 + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -104,7 +105,7 @@ func (o *DeleteConstraintParams) bindConstraintID(rawData []string, hasKey bool, return nil } -// validateConstraintID carries on validations for parameter ConstraintID +// validateConstraintID carries out validations for parameter ConstraintID func (o *DeleteConstraintParams) validateConstraintID(formats strfmt.Registry) error { if err := validate.MinimumInt("constraintID", "path", o.ConstraintID, 1, false); err != nil { @@ -137,7 +138,7 @@ func (o *DeleteConstraintParams) bindFlagID(rawData []string, hasKey bool, forma return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *DeleteConstraintParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -170,7 +171,7 @@ func (o *DeleteConstraintParams) bindSegmentID(rawData []string, hasKey bool, fo return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *DeleteConstraintParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/constraint/delete_constraint_responses.go b/swagger_gen/restapi/operations/constraint/delete_constraint_responses.go index 2c204d3a..5ceb8c70 100644 --- a/swagger_gen/restapi/operations/constraint/delete_constraint_responses.go +++ b/swagger_gen/restapi/operations/constraint/delete_constraint_responses.go @@ -33,7 +33,7 @@ func NewDeleteConstraintOK() *DeleteConstraintOK { // WriteResponse to the client func (o *DeleteConstraintOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/constraint/delete_constraint_urlbuilder.go b/swagger_gen/restapi/operations/constraint/delete_constraint_urlbuilder.go index 767bd857..78215288 100644 --- a/swagger_gen/restapi/operations/constraint/delete_constraint_urlbuilder.go +++ b/swagger_gen/restapi/operations/constraint/delete_constraint_urlbuilder.go @@ -48,21 +48,21 @@ func (o *DeleteConstraintURL) Build() (*url.URL, error) { constraintID := swag.FormatInt64(o.ConstraintID) if constraintID != "" { - _path = strings.Replace(_path, "{constraintID}", constraintID, -1) + _path = strings.ReplaceAll(_path, "{constraintID}", constraintID) } else { return nil, errors.New("constraintId is required on DeleteConstraintURL") } flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on DeleteConstraintURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on DeleteConstraintURL") } diff --git a/swagger_gen/restapi/operations/constraint/find_constraints.go b/swagger_gen/restapi/operations/constraint/find_constraints.go index f63dcc0c..d457bc1a 100644 --- a/swagger_gen/restapi/operations/constraint/find_constraints.go +++ b/swagger_gen/restapi/operations/constraint/find_constraints.go @@ -51,6 +51,7 @@ func (o *FindConstraints) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/constraint/find_constraints_parameters.go b/swagger_gen/restapi/operations/constraint/find_constraints_parameters.go index 28caf043..5b93b184 100644 --- a/swagger_gen/restapi/operations/constraint/find_constraints_parameters.go +++ b/swagger_gen/restapi/operations/constraint/find_constraints_parameters.go @@ -28,7 +28,6 @@ func NewFindConstraintsParams() FindConstraintsParams { // // swagger:parameters findConstraints type FindConstraintsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,6 +37,7 @@ type FindConstraintsParams struct { In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -93,7 +93,7 @@ func (o *FindConstraintsParams) bindFlagID(rawData []string, hasKey bool, format return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *FindConstraintsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -126,7 +126,7 @@ func (o *FindConstraintsParams) bindSegmentID(rawData []string, hasKey bool, for return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *FindConstraintsParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/constraint/find_constraints_urlbuilder.go b/swagger_gen/restapi/operations/constraint/find_constraints_urlbuilder.go index cbd0a6c4..af073bf3 100644 --- a/swagger_gen/restapi/operations/constraint/find_constraints_urlbuilder.go +++ b/swagger_gen/restapi/operations/constraint/find_constraints_urlbuilder.go @@ -47,14 +47,14 @@ func (o *FindConstraintsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on FindConstraintsURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on FindConstraintsURL") } diff --git a/swagger_gen/restapi/operations/constraint/put_constraint.go b/swagger_gen/restapi/operations/constraint/put_constraint.go index 0613e544..9970e89e 100644 --- a/swagger_gen/restapi/operations/constraint/put_constraint.go +++ b/swagger_gen/restapi/operations/constraint/put_constraint.go @@ -51,6 +51,7 @@ func (o *PutConstraint) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/constraint/put_constraint_parameters.go b/swagger_gen/restapi/operations/constraint/put_constraint_parameters.go index a17abc61..744fb536 100644 --- a/swagger_gen/restapi/operations/constraint/put_constraint_parameters.go +++ b/swagger_gen/restapi/operations/constraint/put_constraint_parameters.go @@ -6,6 +6,7 @@ package constraint // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutConstraintParams() PutConstraintParams { // // swagger:parameters putConstraint type PutConstraintParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,18 +41,21 @@ type PutConstraintParams struct { In: body */ Body *models.CreateConstraintRequest + /*numeric ID of the constraint Required: true Minimum: 1 In: path */ ConstraintID int64 + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -71,10 +74,12 @@ func (o *PutConstraintParams) BindRequest(r *http.Request, route *middleware.Mat o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateConstraintRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -141,7 +146,7 @@ func (o *PutConstraintParams) bindConstraintID(rawData []string, hasKey bool, fo return nil } -// validateConstraintID carries on validations for parameter ConstraintID +// validateConstraintID carries out validations for parameter ConstraintID func (o *PutConstraintParams) validateConstraintID(formats strfmt.Registry) error { if err := validate.MinimumInt("constraintID", "path", o.ConstraintID, 1, false); err != nil { @@ -174,7 +179,7 @@ func (o *PutConstraintParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutConstraintParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -207,7 +212,7 @@ func (o *PutConstraintParams) bindSegmentID(rawData []string, hasKey bool, forma return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *PutConstraintParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/constraint/put_constraint_urlbuilder.go b/swagger_gen/restapi/operations/constraint/put_constraint_urlbuilder.go index c421532b..f234020b 100644 --- a/swagger_gen/restapi/operations/constraint/put_constraint_urlbuilder.go +++ b/swagger_gen/restapi/operations/constraint/put_constraint_urlbuilder.go @@ -48,21 +48,21 @@ func (o *PutConstraintURL) Build() (*url.URL, error) { constraintID := swag.FormatInt64(o.ConstraintID) if constraintID != "" { - _path = strings.Replace(_path, "{constraintID}", constraintID, -1) + _path = strings.ReplaceAll(_path, "{constraintID}", constraintID) } else { return nil, errors.New("constraintId is required on PutConstraintURL") } flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutConstraintURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on PutConstraintURL") } diff --git a/swagger_gen/restapi/operations/distribution/find_distributions.go b/swagger_gen/restapi/operations/distribution/find_distributions.go index 39d40c43..2924a512 100644 --- a/swagger_gen/restapi/operations/distribution/find_distributions.go +++ b/swagger_gen/restapi/operations/distribution/find_distributions.go @@ -51,6 +51,7 @@ func (o *FindDistributions) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/distribution/find_distributions_parameters.go b/swagger_gen/restapi/operations/distribution/find_distributions_parameters.go index 87065c61..c7e98533 100644 --- a/swagger_gen/restapi/operations/distribution/find_distributions_parameters.go +++ b/swagger_gen/restapi/operations/distribution/find_distributions_parameters.go @@ -28,7 +28,6 @@ func NewFindDistributionsParams() FindDistributionsParams { // // swagger:parameters findDistributions type FindDistributionsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,6 +37,7 @@ type FindDistributionsParams struct { In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -93,7 +93,7 @@ func (o *FindDistributionsParams) bindFlagID(rawData []string, hasKey bool, form return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *FindDistributionsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -126,7 +126,7 @@ func (o *FindDistributionsParams) bindSegmentID(rawData []string, hasKey bool, f return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *FindDistributionsParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/distribution/find_distributions_urlbuilder.go b/swagger_gen/restapi/operations/distribution/find_distributions_urlbuilder.go index 73ac5177..39ada7f1 100644 --- a/swagger_gen/restapi/operations/distribution/find_distributions_urlbuilder.go +++ b/swagger_gen/restapi/operations/distribution/find_distributions_urlbuilder.go @@ -47,14 +47,14 @@ func (o *FindDistributionsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on FindDistributionsURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on FindDistributionsURL") } diff --git a/swagger_gen/restapi/operations/distribution/put_distributions.go b/swagger_gen/restapi/operations/distribution/put_distributions.go index 87db49cd..a8b1ed2a 100644 --- a/swagger_gen/restapi/operations/distribution/put_distributions.go +++ b/swagger_gen/restapi/operations/distribution/put_distributions.go @@ -51,6 +51,7 @@ func (o *PutDistributions) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/distribution/put_distributions_parameters.go b/swagger_gen/restapi/operations/distribution/put_distributions_parameters.go index a9cc57be..6c92532a 100644 --- a/swagger_gen/restapi/operations/distribution/put_distributions_parameters.go +++ b/swagger_gen/restapi/operations/distribution/put_distributions_parameters.go @@ -6,6 +6,7 @@ package distribution // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutDistributionsParams() PutDistributionsParams { // // swagger:parameters putDistributions type PutDistributionsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,12 +41,14 @@ type PutDistributionsParams struct { In: body */ Body *models.PutDistributionsRequest + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -65,10 +67,12 @@ func (o *PutDistributionsParams) BindRequest(r *http.Request, route *middleware. o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.PutDistributionsRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -130,7 +134,7 @@ func (o *PutDistributionsParams) bindFlagID(rawData []string, hasKey bool, forma return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutDistributionsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -163,7 +167,7 @@ func (o *PutDistributionsParams) bindSegmentID(rawData []string, hasKey bool, fo return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *PutDistributionsParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/distribution/put_distributions_urlbuilder.go b/swagger_gen/restapi/operations/distribution/put_distributions_urlbuilder.go index d0c5a3cf..11ab6977 100644 --- a/swagger_gen/restapi/operations/distribution/put_distributions_urlbuilder.go +++ b/swagger_gen/restapi/operations/distribution/put_distributions_urlbuilder.go @@ -47,14 +47,14 @@ func (o *PutDistributionsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutDistributionsURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on PutDistributionsURL") } diff --git a/swagger_gen/restapi/operations/evaluation/post_evaluation.go b/swagger_gen/restapi/operations/evaluation/post_evaluation.go index e2005978..ad165422 100644 --- a/swagger_gen/restapi/operations/evaluation/post_evaluation.go +++ b/swagger_gen/restapi/operations/evaluation/post_evaluation.go @@ -51,6 +51,7 @@ func (o *PostEvaluation) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/evaluation/post_evaluation_batch.go b/swagger_gen/restapi/operations/evaluation/post_evaluation_batch.go index 9cf73647..c1e3f89f 100644 --- a/swagger_gen/restapi/operations/evaluation/post_evaluation_batch.go +++ b/swagger_gen/restapi/operations/evaluation/post_evaluation_batch.go @@ -51,6 +51,7 @@ func (o *PostEvaluationBatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/evaluation/post_evaluation_batch_parameters.go b/swagger_gen/restapi/operations/evaluation/post_evaluation_batch_parameters.go index 163d871e..a1a4e086 100644 --- a/swagger_gen/restapi/operations/evaluation/post_evaluation_batch_parameters.go +++ b/swagger_gen/restapi/operations/evaluation/post_evaluation_batch_parameters.go @@ -6,6 +6,7 @@ package evaluation // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -30,7 +31,6 @@ func NewPostEvaluationBatchParams() PostEvaluationBatchParams { // // swagger:parameters postEvaluationBatch type PostEvaluationBatchParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -51,10 +51,12 @@ func (o *PostEvaluationBatchParams) BindRequest(r *http.Request, route *middlewa o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.EvaluationBatchRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) diff --git a/swagger_gen/restapi/operations/evaluation/post_evaluation_parameters.go b/swagger_gen/restapi/operations/evaluation/post_evaluation_parameters.go index f3378d4c..cd0e9de2 100644 --- a/swagger_gen/restapi/operations/evaluation/post_evaluation_parameters.go +++ b/swagger_gen/restapi/operations/evaluation/post_evaluation_parameters.go @@ -6,6 +6,7 @@ package evaluation // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -30,7 +31,6 @@ func NewPostEvaluationParams() PostEvaluationParams { // // swagger:parameters postEvaluation type PostEvaluationParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -51,10 +51,12 @@ func (o *PostEvaluationParams) BindRequest(r *http.Request, route *middleware.Ma o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.EvalContext if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) diff --git a/swagger_gen/restapi/operations/export/get_export_eval_cache_json.go b/swagger_gen/restapi/operations/export/get_export_eval_cache_json.go index 0f526a92..3f93996c 100644 --- a/swagger_gen/restapi/operations/export/get_export_eval_cache_json.go +++ b/swagger_gen/restapi/operations/export/get_export_eval_cache_json.go @@ -51,6 +51,7 @@ func (o *GetExportEvalCacheJSON) ServeHTTP(rw http.ResponseWriter, r *http.Reque } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/export/get_export_eval_cache_json_parameters.go b/swagger_gen/restapi/operations/export/get_export_eval_cache_json_parameters.go index e0ccb9bd..e1fa384a 100644 --- a/swagger_gen/restapi/operations/export/get_export_eval_cache_json_parameters.go +++ b/swagger_gen/restapi/operations/export/get_export_eval_cache_json_parameters.go @@ -25,7 +25,6 @@ func NewGetExportEvalCacheJSONParams() GetExportEvalCacheJSONParams { // // swagger:parameters getExportEvalCacheJSON type GetExportEvalCacheJSONParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` } diff --git a/swagger_gen/restapi/operations/export/get_export_eval_cache_json_responses.go b/swagger_gen/restapi/operations/export/get_export_eval_cache_json_responses.go index 3630db05..eed73f12 100644 --- a/swagger_gen/restapi/operations/export/get_export_eval_cache_json_responses.go +++ b/swagger_gen/restapi/operations/export/get_export_eval_cache_json_responses.go @@ -26,7 +26,7 @@ type GetExportEvalCacheJSONOK struct { /* In: Body */ - Payload interface{} `json:"body,omitempty"` + Payload any `json:"body,omitempty"` } // NewGetExportEvalCacheJSONOK creates GetExportEvalCacheJSONOK with default headers values @@ -36,13 +36,13 @@ func NewGetExportEvalCacheJSONOK() *GetExportEvalCacheJSONOK { } // WithPayload adds the payload to the get export eval cache Json o k response -func (o *GetExportEvalCacheJSONOK) WithPayload(payload interface{}) *GetExportEvalCacheJSONOK { +func (o *GetExportEvalCacheJSONOK) WithPayload(payload any) *GetExportEvalCacheJSONOK { o.Payload = payload return o } // SetPayload sets the payload to the get export eval cache Json o k response -func (o *GetExportEvalCacheJSONOK) SetPayload(payload interface{}) { +func (o *GetExportEvalCacheJSONOK) SetPayload(payload any) { o.Payload = payload } diff --git a/swagger_gen/restapi/operations/export/get_export_sqlite.go b/swagger_gen/restapi/operations/export/get_export_sqlite.go index c6f6a4cc..9d9f6dd5 100644 --- a/swagger_gen/restapi/operations/export/get_export_sqlite.go +++ b/swagger_gen/restapi/operations/export/get_export_sqlite.go @@ -51,6 +51,7 @@ func (o *GetExportSqlite) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/export/get_export_sqlite_parameters.go b/swagger_gen/restapi/operations/export/get_export_sqlite_parameters.go index c36b4cdd..eb00a16d 100644 --- a/swagger_gen/restapi/operations/export/get_export_sqlite_parameters.go +++ b/swagger_gen/restapi/operations/export/get_export_sqlite_parameters.go @@ -28,7 +28,6 @@ func NewGetExportSqliteParams() GetExportSqliteParams { // // swagger:parameters getExportSqlite type GetExportSqliteParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -47,7 +46,6 @@ func (o *GetExportSqliteParams) BindRequest(r *http.Request, route *middleware.M var res []error o.HTTPRequest = r - qs := runtime.Values(r.URL.Query()) qExcludeSnapshots, qhkExcludeSnapshots, _ := qs.GetOK("exclude_snapshots") diff --git a/swagger_gen/restapi/operations/flag/create_flag.go b/swagger_gen/restapi/operations/flag/create_flag.go index dacdcca6..0162fd61 100644 --- a/swagger_gen/restapi/operations/flag/create_flag.go +++ b/swagger_gen/restapi/operations/flag/create_flag.go @@ -51,6 +51,7 @@ func (o *CreateFlag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/create_flag_parameters.go b/swagger_gen/restapi/operations/flag/create_flag_parameters.go index 42e939e7..9498afd2 100644 --- a/swagger_gen/restapi/operations/flag/create_flag_parameters.go +++ b/swagger_gen/restapi/operations/flag/create_flag_parameters.go @@ -6,6 +6,7 @@ package flag // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -30,7 +31,6 @@ func NewCreateFlagParams() CreateFlagParams { // // swagger:parameters createFlag type CreateFlagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -51,10 +51,12 @@ func (o *CreateFlagParams) BindRequest(r *http.Request, route *middleware.Matche o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateFlagRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) diff --git a/swagger_gen/restapi/operations/flag/delete_flag.go b/swagger_gen/restapi/operations/flag/delete_flag.go index 130a6c38..a3ecb82d 100644 --- a/swagger_gen/restapi/operations/flag/delete_flag.go +++ b/swagger_gen/restapi/operations/flag/delete_flag.go @@ -51,6 +51,7 @@ func (o *DeleteFlag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/delete_flag_parameters.go b/swagger_gen/restapi/operations/flag/delete_flag_parameters.go index 3cb60b85..21816ee6 100644 --- a/swagger_gen/restapi/operations/flag/delete_flag_parameters.go +++ b/swagger_gen/restapi/operations/flag/delete_flag_parameters.go @@ -28,7 +28,6 @@ func NewDeleteFlagParams() DeleteFlagParams { // // swagger:parameters deleteFlag type DeleteFlagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *DeleteFlagParams) bindFlagID(rawData []string, hasKey bool, formats str return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *DeleteFlagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/flag/delete_flag_responses.go b/swagger_gen/restapi/operations/flag/delete_flag_responses.go index 31c5a3db..baa62dfb 100644 --- a/swagger_gen/restapi/operations/flag/delete_flag_responses.go +++ b/swagger_gen/restapi/operations/flag/delete_flag_responses.go @@ -33,7 +33,7 @@ func NewDeleteFlagOK() *DeleteFlagOK { // WriteResponse to the client func (o *DeleteFlagOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/flag/delete_flag_urlbuilder.go b/swagger_gen/restapi/operations/flag/delete_flag_urlbuilder.go index dff1910b..bfac276c 100644 --- a/swagger_gen/restapi/operations/flag/delete_flag_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/delete_flag_urlbuilder.go @@ -46,7 +46,7 @@ func (o *DeleteFlagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on DeleteFlagURL") } diff --git a/swagger_gen/restapi/operations/flag/find_flags.go b/swagger_gen/restapi/operations/flag/find_flags.go index 89f6d2cd..3e80a8d7 100644 --- a/swagger_gen/restapi/operations/flag/find_flags.go +++ b/swagger_gen/restapi/operations/flag/find_flags.go @@ -51,6 +51,7 @@ func (o *FindFlags) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/find_flags_parameters.go b/swagger_gen/restapi/operations/flag/find_flags_parameters.go index 37f11945..28e7c7e3 100644 --- a/swagger_gen/restapi/operations/flag/find_flags_parameters.go +++ b/swagger_gen/restapi/operations/flag/find_flags_parameters.go @@ -28,7 +28,6 @@ func NewFindFlagsParams() FindFlagsParams { // // swagger:parameters findFlags type FindFlagsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -36,34 +35,42 @@ type FindFlagsParams struct { In: query */ Deleted *bool + /*return flags exactly matching given description In: query */ Description *string + /*return flags partially matching given description In: query */ DescriptionLike *string + /*return flags having given enabled status In: query */ Enabled *bool + /*return flags matching given key In: query */ Key *string + /*the numbers of flags to return In: query */ Limit *int64 + /*return flags given the offset, it should usually set together with limit In: query */ Offset *int64 + /*return flags with preloaded segments and variants In: query */ Preload *bool + /*return flags with the given tags (comma separated) In: query */ @@ -78,7 +85,6 @@ func (o *FindFlagsParams) BindRequest(r *http.Request, route *middleware.Matched var res []error o.HTTPRequest = r - qs := runtime.Values(r.URL.Query()) qDeleted, qhkDeleted, _ := qs.GetOK("deleted") diff --git a/swagger_gen/restapi/operations/flag/get_flag.go b/swagger_gen/restapi/operations/flag/get_flag.go index 7d4b65ab..e03ae48b 100644 --- a/swagger_gen/restapi/operations/flag/get_flag.go +++ b/swagger_gen/restapi/operations/flag/get_flag.go @@ -51,6 +51,7 @@ func (o *GetFlag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/get_flag_entity_types.go b/swagger_gen/restapi/operations/flag/get_flag_entity_types.go index 6f373ae4..861c5972 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_entity_types.go +++ b/swagger_gen/restapi/operations/flag/get_flag_entity_types.go @@ -51,6 +51,7 @@ func (o *GetFlagEntityTypes) ServeHTTP(rw http.ResponseWriter, r *http.Request) } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/get_flag_entity_types_parameters.go b/swagger_gen/restapi/operations/flag/get_flag_entity_types_parameters.go index cf2e9dfd..de58ab46 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_entity_types_parameters.go +++ b/swagger_gen/restapi/operations/flag/get_flag_entity_types_parameters.go @@ -25,7 +25,6 @@ func NewGetFlagEntityTypesParams() GetFlagEntityTypesParams { // // swagger:parameters getFlagEntityTypes type GetFlagEntityTypesParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` } diff --git a/swagger_gen/restapi/operations/flag/get_flag_parameters.go b/swagger_gen/restapi/operations/flag/get_flag_parameters.go index bcbdbb76..ec9e1f25 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_parameters.go +++ b/swagger_gen/restapi/operations/flag/get_flag_parameters.go @@ -28,7 +28,6 @@ func NewGetFlagParams() GetFlagParams { // // swagger:parameters getFlag type GetFlagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *GetFlagParams) bindFlagID(rawData []string, hasKey bool, formats strfmt return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *GetFlagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/flag/get_flag_snapshots.go b/swagger_gen/restapi/operations/flag/get_flag_snapshots.go index 1fb089c3..6ee9c3b4 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_snapshots.go +++ b/swagger_gen/restapi/operations/flag/get_flag_snapshots.go @@ -51,6 +51,7 @@ func (o *GetFlagSnapshots) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/get_flag_snapshots_parameters.go b/swagger_gen/restapi/operations/flag/get_flag_snapshots_parameters.go index b38bd182..1627b58e 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_snapshots_parameters.go +++ b/swagger_gen/restapi/operations/flag/get_flag_snapshots_parameters.go @@ -29,7 +29,6 @@ func NewGetFlagSnapshotsParams() GetFlagSnapshotsParams { // // swagger:parameters getFlagSnapshots type GetFlagSnapshotsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -39,14 +38,17 @@ type GetFlagSnapshotsParams struct { In: path */ FlagID int64 + /*the number of snapshots to return In: query */ Limit *int64 + /*return snapshots given the offset, it should usually set together with limit In: query */ Offset *int64 + /*sort order In: query */ @@ -61,7 +63,6 @@ func (o *GetFlagSnapshotsParams) BindRequest(r *http.Request, route *middleware. var res []error o.HTTPRequest = r - qs := runtime.Values(r.URL.Query()) rFlagID, rhkFlagID, _ := route.Params.GetOK("flagID") @@ -112,7 +113,7 @@ func (o *GetFlagSnapshotsParams) bindFlagID(rawData []string, hasKey bool, forma return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *GetFlagSnapshotsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -190,10 +191,10 @@ func (o *GetFlagSnapshotsParams) bindSort(rawData []string, hasKey bool, formats return nil } -// validateSort carries on validations for parameter Sort +// validateSort carries out validations for parameter Sort func (o *GetFlagSnapshotsParams) validateSort(formats strfmt.Registry) error { - if err := validate.EnumCase("sort", "query", *o.Sort, []interface{}{"ASC", "DESC"}, true); err != nil { + if err := validate.EnumCase("sort", "query", *o.Sort, []any{"ASC", "DESC"}, true); err != nil { return err } diff --git a/swagger_gen/restapi/operations/flag/get_flag_snapshots_urlbuilder.go b/swagger_gen/restapi/operations/flag/get_flag_snapshots_urlbuilder.go index 365acb75..6c6f6e4b 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_snapshots_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/get_flag_snapshots_urlbuilder.go @@ -50,7 +50,7 @@ func (o *GetFlagSnapshotsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on GetFlagSnapshotsURL") } diff --git a/swagger_gen/restapi/operations/flag/get_flag_urlbuilder.go b/swagger_gen/restapi/operations/flag/get_flag_urlbuilder.go index fc8f57f8..c468b03f 100644 --- a/swagger_gen/restapi/operations/flag/get_flag_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/get_flag_urlbuilder.go @@ -46,7 +46,7 @@ func (o *GetFlagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on GetFlagURL") } diff --git a/swagger_gen/restapi/operations/flag/put_flag.go b/swagger_gen/restapi/operations/flag/put_flag.go index e0fe1eeb..eaf709f5 100644 --- a/swagger_gen/restapi/operations/flag/put_flag.go +++ b/swagger_gen/restapi/operations/flag/put_flag.go @@ -51,6 +51,7 @@ func (o *PutFlag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/put_flag_parameters.go b/swagger_gen/restapi/operations/flag/put_flag_parameters.go index 977a9e41..25a787c3 100644 --- a/swagger_gen/restapi/operations/flag/put_flag_parameters.go +++ b/swagger_gen/restapi/operations/flag/put_flag_parameters.go @@ -6,6 +6,7 @@ package flag // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutFlagParams() PutFlagParams { // // swagger:parameters putFlag type PutFlagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type PutFlagParams struct { In: body */ Body *models.PutFlagRequest + /*numeric ID of the flag to get Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *PutFlagParams) BindRequest(r *http.Request, route *middleware.MatchedRo o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.PutFlagRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *PutFlagParams) bindFlagID(rawData []string, hasKey bool, formats strfmt return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutFlagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/flag/put_flag_urlbuilder.go b/swagger_gen/restapi/operations/flag/put_flag_urlbuilder.go index fe2fdc29..a9cb0578 100644 --- a/swagger_gen/restapi/operations/flag/put_flag_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/put_flag_urlbuilder.go @@ -46,7 +46,7 @@ func (o *PutFlagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutFlagURL") } diff --git a/swagger_gen/restapi/operations/flag/restore_flag.go b/swagger_gen/restapi/operations/flag/restore_flag.go index afee462a..79760f90 100644 --- a/swagger_gen/restapi/operations/flag/restore_flag.go +++ b/swagger_gen/restapi/operations/flag/restore_flag.go @@ -51,6 +51,7 @@ func (o *RestoreFlag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/restore_flag_parameters.go b/swagger_gen/restapi/operations/flag/restore_flag_parameters.go index 8a8911ca..bd3c94c2 100644 --- a/swagger_gen/restapi/operations/flag/restore_flag_parameters.go +++ b/swagger_gen/restapi/operations/flag/restore_flag_parameters.go @@ -28,7 +28,6 @@ func NewRestoreFlagParams() RestoreFlagParams { // // swagger:parameters restoreFlag type RestoreFlagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *RestoreFlagParams) bindFlagID(rawData []string, hasKey bool, formats st return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *RestoreFlagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/flag/restore_flag_urlbuilder.go b/swagger_gen/restapi/operations/flag/restore_flag_urlbuilder.go index 8c36565b..15aed7f7 100644 --- a/swagger_gen/restapi/operations/flag/restore_flag_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/restore_flag_urlbuilder.go @@ -46,7 +46,7 @@ func (o *RestoreFlagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on RestoreFlagURL") } diff --git a/swagger_gen/restapi/operations/flag/set_flag_enabled.go b/swagger_gen/restapi/operations/flag/set_flag_enabled.go index c6c81e6d..eb2c2593 100644 --- a/swagger_gen/restapi/operations/flag/set_flag_enabled.go +++ b/swagger_gen/restapi/operations/flag/set_flag_enabled.go @@ -51,6 +51,7 @@ func (o *SetFlagEnabled) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/flag/set_flag_enabled_parameters.go b/swagger_gen/restapi/operations/flag/set_flag_enabled_parameters.go index 1daf1167..99003824 100644 --- a/swagger_gen/restapi/operations/flag/set_flag_enabled_parameters.go +++ b/swagger_gen/restapi/operations/flag/set_flag_enabled_parameters.go @@ -6,6 +6,7 @@ package flag // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewSetFlagEnabledParams() SetFlagEnabledParams { // // swagger:parameters setFlagEnabled type SetFlagEnabledParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type SetFlagEnabledParams struct { In: body */ Body *models.SetFlagEnabledRequest + /*numeric ID of the flag to get Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *SetFlagEnabledParams) BindRequest(r *http.Request, route *middleware.Ma o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.SetFlagEnabledRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *SetFlagEnabledParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *SetFlagEnabledParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/flag/set_flag_enabled_urlbuilder.go b/swagger_gen/restapi/operations/flag/set_flag_enabled_urlbuilder.go index 2da92399..33db3bb7 100644 --- a/swagger_gen/restapi/operations/flag/set_flag_enabled_urlbuilder.go +++ b/swagger_gen/restapi/operations/flag/set_flag_enabled_urlbuilder.go @@ -46,7 +46,7 @@ func (o *SetFlagEnabledURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on SetFlagEnabledURL") } diff --git a/swagger_gen/restapi/operations/flagr_api.go b/swagger_gen/restapi/operations/flagr_api.go index 40457e65..7820ff1e 100644 --- a/swagger_gen/restapi/operations/flagr_api.go +++ b/swagger_gen/restapi/operations/flagr_api.go @@ -54,102 +54,200 @@ func NewFlagrAPI(spec *loads.Document) *FlagrAPI { JSONProducer: runtime.JSONProducer(), ConstraintCreateConstraintHandler: constraint.CreateConstraintHandlerFunc(func(params constraint.CreateConstraintParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation constraint.CreateConstraint has not yet been implemented") }), + FlagCreateFlagHandler: flag.CreateFlagHandlerFunc(func(params flag.CreateFlagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.CreateFlag has not yet been implemented") }), + SegmentCreateSegmentHandler: segment.CreateSegmentHandlerFunc(func(params segment.CreateSegmentParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation segment.CreateSegment has not yet been implemented") }), + TagCreateTagHandler: tag.CreateTagHandlerFunc(func(params tag.CreateTagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation tag.CreateTag has not yet been implemented") }), + VariantCreateVariantHandler: variant.CreateVariantHandlerFunc(func(params variant.CreateVariantParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation variant.CreateVariant has not yet been implemented") }), + ConstraintDeleteConstraintHandler: constraint.DeleteConstraintHandlerFunc(func(params constraint.DeleteConstraintParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation constraint.DeleteConstraint has not yet been implemented") }), + FlagDeleteFlagHandler: flag.DeleteFlagHandlerFunc(func(params flag.DeleteFlagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.DeleteFlag has not yet been implemented") }), + SegmentDeleteSegmentHandler: segment.DeleteSegmentHandlerFunc(func(params segment.DeleteSegmentParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation segment.DeleteSegment has not yet been implemented") }), + TagDeleteTagHandler: tag.DeleteTagHandlerFunc(func(params tag.DeleteTagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation tag.DeleteTag has not yet been implemented") }), + VariantDeleteVariantHandler: variant.DeleteVariantHandlerFunc(func(params variant.DeleteVariantParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation variant.DeleteVariant has not yet been implemented") }), + TagFindAllTagsHandler: tag.FindAllTagsHandlerFunc(func(params tag.FindAllTagsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation tag.FindAllTags has not yet been implemented") }), + ConstraintFindConstraintsHandler: constraint.FindConstraintsHandlerFunc(func(params constraint.FindConstraintsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation constraint.FindConstraints has not yet been implemented") }), + DistributionFindDistributionsHandler: distribution.FindDistributionsHandlerFunc(func(params distribution.FindDistributionsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation distribution.FindDistributions has not yet been implemented") }), + FlagFindFlagsHandler: flag.FindFlagsHandlerFunc(func(params flag.FindFlagsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.FindFlags has not yet been implemented") }), + SegmentFindSegmentsHandler: segment.FindSegmentsHandlerFunc(func(params segment.FindSegmentsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation segment.FindSegments has not yet been implemented") }), + TagFindTagsHandler: tag.FindTagsHandlerFunc(func(params tag.FindTagsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation tag.FindTags has not yet been implemented") }), + VariantFindVariantsHandler: variant.FindVariantsHandlerFunc(func(params variant.FindVariantsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation variant.FindVariants has not yet been implemented") }), + ExportGetExportEvalCacheJSONHandler: export.GetExportEvalCacheJSONHandlerFunc(func(params export.GetExportEvalCacheJSONParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation export.GetExportEvalCacheJSON has not yet been implemented") }), + ExportGetExportSqliteHandler: export.GetExportSqliteHandlerFunc(func(params export.GetExportSqliteParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation export.GetExportSqlite has not yet been implemented") }), + FlagGetFlagHandler: flag.GetFlagHandlerFunc(func(params flag.GetFlagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.GetFlag has not yet been implemented") }), + FlagGetFlagEntityTypesHandler: flag.GetFlagEntityTypesHandlerFunc(func(params flag.GetFlagEntityTypesParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.GetFlagEntityTypes has not yet been implemented") }), + FlagGetFlagSnapshotsHandler: flag.GetFlagSnapshotsHandlerFunc(func(params flag.GetFlagSnapshotsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.GetFlagSnapshots has not yet been implemented") }), + HealthGetHealthHandler: health.GetHealthHandlerFunc(func(params health.GetHealthParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation health.GetHealth has not yet been implemented") }), + EvaluationPostEvaluationHandler: evaluation.PostEvaluationHandlerFunc(func(params evaluation.PostEvaluationParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation evaluation.PostEvaluation has not yet been implemented") }), + EvaluationPostEvaluationBatchHandler: evaluation.PostEvaluationBatchHandlerFunc(func(params evaluation.PostEvaluationBatchParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation evaluation.PostEvaluationBatch has not yet been implemented") }), + ConstraintPutConstraintHandler: constraint.PutConstraintHandlerFunc(func(params constraint.PutConstraintParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation constraint.PutConstraint has not yet been implemented") }), + DistributionPutDistributionsHandler: distribution.PutDistributionsHandlerFunc(func(params distribution.PutDistributionsParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation distribution.PutDistributions has not yet been implemented") }), + FlagPutFlagHandler: flag.PutFlagHandlerFunc(func(params flag.PutFlagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.PutFlag has not yet been implemented") }), + SegmentPutSegmentHandler: segment.PutSegmentHandlerFunc(func(params segment.PutSegmentParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation segment.PutSegment has not yet been implemented") }), + SegmentPutSegmentsReorderHandler: segment.PutSegmentsReorderHandlerFunc(func(params segment.PutSegmentsReorderParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation segment.PutSegmentsReorder has not yet been implemented") }), + VariantPutVariantHandler: variant.PutVariantHandlerFunc(func(params variant.PutVariantParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation variant.PutVariant has not yet been implemented") }), + FlagRestoreFlagHandler: flag.RestoreFlagHandlerFunc(func(params flag.RestoreFlagParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.RestoreFlag has not yet been implemented") }), + FlagSetFlagEnabledHandler: flag.SetFlagEnabledHandlerFunc(func(params flag.SetFlagEnabledParams) middleware.Responder { + _ = params + return middleware.NotImplemented("operation flag.SetFlagEnabled has not yet been implemented") }), } @@ -275,7 +373,7 @@ type FlagrAPI struct { CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. - Logger func(string, ...interface{}) + Logger func(string, ...any) } // UseRedoc for documentation at /docs @@ -461,12 +559,12 @@ func (o *FlagrAPI) Authorizer() runtime.Authorizer { } // ConsumersFor gets the consumers for the specified media types. +// // MIME type parameters are ignored here. func (o *FlagrAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { result := make(map[string]runtime.Consumer, len(mediaTypes)) for _, mt := range mediaTypes { - switch mt { - case "application/json": + if mt == "application/json" { result["application/json"] = o.JSONConsumer } @@ -474,10 +572,12 @@ func (o *FlagrAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer result[mt] = c } } + return result } // ProducersFor gets the producers for the specified media types. +// // MIME type parameters are ignored here. func (o *FlagrAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer { result := make(map[string]runtime.Producer, len(mediaTypes)) @@ -493,6 +593,7 @@ func (o *FlagrAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer result[mt] = p } } + return result } diff --git a/swagger_gen/restapi/operations/health/get_health.go b/swagger_gen/restapi/operations/health/get_health.go index f64c966a..89d21e85 100644 --- a/swagger_gen/restapi/operations/health/get_health.go +++ b/swagger_gen/restapi/operations/health/get_health.go @@ -51,6 +51,7 @@ func (o *GetHealth) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/health/get_health_parameters.go b/swagger_gen/restapi/operations/health/get_health_parameters.go index 7194b943..67b92d1d 100644 --- a/swagger_gen/restapi/operations/health/get_health_parameters.go +++ b/swagger_gen/restapi/operations/health/get_health_parameters.go @@ -25,7 +25,6 @@ func NewGetHealthParams() GetHealthParams { // // swagger:parameters getHealth type GetHealthParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` } diff --git a/swagger_gen/restapi/operations/segment/create_segment.go b/swagger_gen/restapi/operations/segment/create_segment.go index 6db46eee..700141a0 100644 --- a/swagger_gen/restapi/operations/segment/create_segment.go +++ b/swagger_gen/restapi/operations/segment/create_segment.go @@ -51,6 +51,7 @@ func (o *CreateSegment) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/segment/create_segment_parameters.go b/swagger_gen/restapi/operations/segment/create_segment_parameters.go index deec173d..e9f7c01f 100644 --- a/swagger_gen/restapi/operations/segment/create_segment_parameters.go +++ b/swagger_gen/restapi/operations/segment/create_segment_parameters.go @@ -6,6 +6,7 @@ package segment // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewCreateSegmentParams() CreateSegmentParams { // // swagger:parameters createSegment type CreateSegmentParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type CreateSegmentParams struct { In: body */ Body *models.CreateSegmentRequest + /*numeric ID of the flag to get Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *CreateSegmentParams) BindRequest(r *http.Request, route *middleware.Mat o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateSegmentRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *CreateSegmentParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *CreateSegmentParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/segment/create_segment_urlbuilder.go b/swagger_gen/restapi/operations/segment/create_segment_urlbuilder.go index fd79e4ff..5923399b 100644 --- a/swagger_gen/restapi/operations/segment/create_segment_urlbuilder.go +++ b/swagger_gen/restapi/operations/segment/create_segment_urlbuilder.go @@ -46,7 +46,7 @@ func (o *CreateSegmentURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on CreateSegmentURL") } diff --git a/swagger_gen/restapi/operations/segment/delete_segment.go b/swagger_gen/restapi/operations/segment/delete_segment.go index 8d975f09..760eae98 100644 --- a/swagger_gen/restapi/operations/segment/delete_segment.go +++ b/swagger_gen/restapi/operations/segment/delete_segment.go @@ -51,6 +51,7 @@ func (o *DeleteSegment) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/segment/delete_segment_parameters.go b/swagger_gen/restapi/operations/segment/delete_segment_parameters.go index 3b521560..25f57398 100644 --- a/swagger_gen/restapi/operations/segment/delete_segment_parameters.go +++ b/swagger_gen/restapi/operations/segment/delete_segment_parameters.go @@ -28,7 +28,6 @@ func NewDeleteSegmentParams() DeleteSegmentParams { // // swagger:parameters deleteSegment type DeleteSegmentParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,6 +37,7 @@ type DeleteSegmentParams struct { In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -93,7 +93,7 @@ func (o *DeleteSegmentParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *DeleteSegmentParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -126,7 +126,7 @@ func (o *DeleteSegmentParams) bindSegmentID(rawData []string, hasKey bool, forma return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *DeleteSegmentParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/segment/delete_segment_responses.go b/swagger_gen/restapi/operations/segment/delete_segment_responses.go index bd9b8a21..ae591a85 100644 --- a/swagger_gen/restapi/operations/segment/delete_segment_responses.go +++ b/swagger_gen/restapi/operations/segment/delete_segment_responses.go @@ -33,7 +33,7 @@ func NewDeleteSegmentOK() *DeleteSegmentOK { // WriteResponse to the client func (o *DeleteSegmentOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/segment/delete_segment_urlbuilder.go b/swagger_gen/restapi/operations/segment/delete_segment_urlbuilder.go index acef6185..d248fa73 100644 --- a/swagger_gen/restapi/operations/segment/delete_segment_urlbuilder.go +++ b/swagger_gen/restapi/operations/segment/delete_segment_urlbuilder.go @@ -47,14 +47,14 @@ func (o *DeleteSegmentURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on DeleteSegmentURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on DeleteSegmentURL") } diff --git a/swagger_gen/restapi/operations/segment/find_segments.go b/swagger_gen/restapi/operations/segment/find_segments.go index 75b2d91b..c7f3a745 100644 --- a/swagger_gen/restapi/operations/segment/find_segments.go +++ b/swagger_gen/restapi/operations/segment/find_segments.go @@ -51,6 +51,7 @@ func (o *FindSegments) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/segment/find_segments_parameters.go b/swagger_gen/restapi/operations/segment/find_segments_parameters.go index ec464cb4..329e3727 100644 --- a/swagger_gen/restapi/operations/segment/find_segments_parameters.go +++ b/swagger_gen/restapi/operations/segment/find_segments_parameters.go @@ -28,7 +28,6 @@ func NewFindSegmentsParams() FindSegmentsParams { // // swagger:parameters findSegments type FindSegmentsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *FindSegmentsParams) bindFlagID(rawData []string, hasKey bool, formats s return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *FindSegmentsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/segment/find_segments_urlbuilder.go b/swagger_gen/restapi/operations/segment/find_segments_urlbuilder.go index c57c4787..1964821c 100644 --- a/swagger_gen/restapi/operations/segment/find_segments_urlbuilder.go +++ b/swagger_gen/restapi/operations/segment/find_segments_urlbuilder.go @@ -46,7 +46,7 @@ func (o *FindSegmentsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on FindSegmentsURL") } diff --git a/swagger_gen/restapi/operations/segment/put_segment.go b/swagger_gen/restapi/operations/segment/put_segment.go index ce302fa4..6cc578b8 100644 --- a/swagger_gen/restapi/operations/segment/put_segment.go +++ b/swagger_gen/restapi/operations/segment/put_segment.go @@ -51,6 +51,7 @@ func (o *PutSegment) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/segment/put_segment_parameters.go b/swagger_gen/restapi/operations/segment/put_segment_parameters.go index 283a9a80..7e74b9a1 100644 --- a/swagger_gen/restapi/operations/segment/put_segment_parameters.go +++ b/swagger_gen/restapi/operations/segment/put_segment_parameters.go @@ -6,6 +6,7 @@ package segment // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutSegmentParams() PutSegmentParams { // // swagger:parameters putSegment type PutSegmentParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,12 +41,14 @@ type PutSegmentParams struct { In: body */ Body *models.PutSegmentRequest + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the segment Required: true Minimum: 1 @@ -65,10 +67,12 @@ func (o *PutSegmentParams) BindRequest(r *http.Request, route *middleware.Matche o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.PutSegmentRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -130,7 +134,7 @@ func (o *PutSegmentParams) bindFlagID(rawData []string, hasKey bool, formats str return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutSegmentParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -163,7 +167,7 @@ func (o *PutSegmentParams) bindSegmentID(rawData []string, hasKey bool, formats return nil } -// validateSegmentID carries on validations for parameter SegmentID +// validateSegmentID carries out validations for parameter SegmentID func (o *PutSegmentParams) validateSegmentID(formats strfmt.Registry) error { if err := validate.MinimumInt("segmentID", "path", o.SegmentID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/segment/put_segment_urlbuilder.go b/swagger_gen/restapi/operations/segment/put_segment_urlbuilder.go index 379fc0cf..4281e093 100644 --- a/swagger_gen/restapi/operations/segment/put_segment_urlbuilder.go +++ b/swagger_gen/restapi/operations/segment/put_segment_urlbuilder.go @@ -47,14 +47,14 @@ func (o *PutSegmentURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutSegmentURL") } segmentID := swag.FormatInt64(o.SegmentID) if segmentID != "" { - _path = strings.Replace(_path, "{segmentID}", segmentID, -1) + _path = strings.ReplaceAll(_path, "{segmentID}", segmentID) } else { return nil, errors.New("segmentId is required on PutSegmentURL") } diff --git a/swagger_gen/restapi/operations/segment/put_segments_reorder.go b/swagger_gen/restapi/operations/segment/put_segments_reorder.go index 56fe78cd..b25f1f39 100644 --- a/swagger_gen/restapi/operations/segment/put_segments_reorder.go +++ b/swagger_gen/restapi/operations/segment/put_segments_reorder.go @@ -51,6 +51,7 @@ func (o *PutSegmentsReorder) ServeHTTP(rw http.ResponseWriter, r *http.Request) } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/segment/put_segments_reorder_parameters.go b/swagger_gen/restapi/operations/segment/put_segments_reorder_parameters.go index 2a341921..dd13a892 100644 --- a/swagger_gen/restapi/operations/segment/put_segments_reorder_parameters.go +++ b/swagger_gen/restapi/operations/segment/put_segments_reorder_parameters.go @@ -6,6 +6,7 @@ package segment // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutSegmentsReorderParams() PutSegmentsReorderParams { // // swagger:parameters putSegmentsReorder type PutSegmentsReorderParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type PutSegmentsReorderParams struct { In: body */ Body *models.PutSegmentReorderRequest + /*numeric ID of the flag Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *PutSegmentsReorderParams) BindRequest(r *http.Request, route *middlewar o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.PutSegmentReorderRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *PutSegmentsReorderParams) bindFlagID(rawData []string, hasKey bool, for return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutSegmentsReorderParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/segment/put_segments_reorder_responses.go b/swagger_gen/restapi/operations/segment/put_segments_reorder_responses.go index 4ff22ee8..469a9bb3 100644 --- a/swagger_gen/restapi/operations/segment/put_segments_reorder_responses.go +++ b/swagger_gen/restapi/operations/segment/put_segments_reorder_responses.go @@ -33,7 +33,7 @@ func NewPutSegmentsReorderOK() *PutSegmentsReorderOK { // WriteResponse to the client func (o *PutSegmentsReorderOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/segment/put_segments_reorder_urlbuilder.go b/swagger_gen/restapi/operations/segment/put_segments_reorder_urlbuilder.go index e34cb3a0..545c1e7a 100644 --- a/swagger_gen/restapi/operations/segment/put_segments_reorder_urlbuilder.go +++ b/swagger_gen/restapi/operations/segment/put_segments_reorder_urlbuilder.go @@ -46,7 +46,7 @@ func (o *PutSegmentsReorderURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutSegmentsReorderURL") } diff --git a/swagger_gen/restapi/operations/tag/create_tag.go b/swagger_gen/restapi/operations/tag/create_tag.go index d3368554..0bcbf736 100644 --- a/swagger_gen/restapi/operations/tag/create_tag.go +++ b/swagger_gen/restapi/operations/tag/create_tag.go @@ -51,6 +51,7 @@ func (o *CreateTag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/tag/create_tag_parameters.go b/swagger_gen/restapi/operations/tag/create_tag_parameters.go index fe53dc06..dd106e17 100644 --- a/swagger_gen/restapi/operations/tag/create_tag_parameters.go +++ b/swagger_gen/restapi/operations/tag/create_tag_parameters.go @@ -6,6 +6,7 @@ package tag // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewCreateTagParams() CreateTagParams { // // swagger:parameters createTag type CreateTagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type CreateTagParams struct { In: body */ Body *models.CreateTagRequest + /*numeric ID of the flag Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *CreateTagParams) BindRequest(r *http.Request, route *middleware.Matched o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateTagRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *CreateTagParams) bindFlagID(rawData []string, hasKey bool, formats strf return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *CreateTagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/tag/create_tag_urlbuilder.go b/swagger_gen/restapi/operations/tag/create_tag_urlbuilder.go index 66da2af2..8811d155 100644 --- a/swagger_gen/restapi/operations/tag/create_tag_urlbuilder.go +++ b/swagger_gen/restapi/operations/tag/create_tag_urlbuilder.go @@ -46,7 +46,7 @@ func (o *CreateTagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on CreateTagURL") } diff --git a/swagger_gen/restapi/operations/tag/delete_tag.go b/swagger_gen/restapi/operations/tag/delete_tag.go index 9bce5e70..b25e3207 100644 --- a/swagger_gen/restapi/operations/tag/delete_tag.go +++ b/swagger_gen/restapi/operations/tag/delete_tag.go @@ -51,6 +51,7 @@ func (o *DeleteTag) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/tag/delete_tag_parameters.go b/swagger_gen/restapi/operations/tag/delete_tag_parameters.go index 9cba4ea5..605b1e81 100644 --- a/swagger_gen/restapi/operations/tag/delete_tag_parameters.go +++ b/swagger_gen/restapi/operations/tag/delete_tag_parameters.go @@ -28,7 +28,6 @@ func NewDeleteTagParams() DeleteTagParams { // // swagger:parameters deleteTag type DeleteTagParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,6 +37,7 @@ type DeleteTagParams struct { In: path */ FlagID int64 + /*numeric ID of the tag Required: true Minimum: 1 @@ -93,7 +93,7 @@ func (o *DeleteTagParams) bindFlagID(rawData []string, hasKey bool, formats strf return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *DeleteTagParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -126,7 +126,7 @@ func (o *DeleteTagParams) bindTagID(rawData []string, hasKey bool, formats strfm return nil } -// validateTagID carries on validations for parameter TagID +// validateTagID carries out validations for parameter TagID func (o *DeleteTagParams) validateTagID(formats strfmt.Registry) error { if err := validate.MinimumInt("tagID", "path", o.TagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/tag/delete_tag_responses.go b/swagger_gen/restapi/operations/tag/delete_tag_responses.go index a1110e1d..20f15c60 100644 --- a/swagger_gen/restapi/operations/tag/delete_tag_responses.go +++ b/swagger_gen/restapi/operations/tag/delete_tag_responses.go @@ -33,7 +33,7 @@ func NewDeleteTagOK() *DeleteTagOK { // WriteResponse to the client func (o *DeleteTagOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/tag/delete_tag_urlbuilder.go b/swagger_gen/restapi/operations/tag/delete_tag_urlbuilder.go index c3fd5f84..890d98f2 100644 --- a/swagger_gen/restapi/operations/tag/delete_tag_urlbuilder.go +++ b/swagger_gen/restapi/operations/tag/delete_tag_urlbuilder.go @@ -47,14 +47,14 @@ func (o *DeleteTagURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on DeleteTagURL") } tagID := swag.FormatInt64(o.TagID) if tagID != "" { - _path = strings.Replace(_path, "{tagID}", tagID, -1) + _path = strings.ReplaceAll(_path, "{tagID}", tagID) } else { return nil, errors.New("tagId is required on DeleteTagURL") } diff --git a/swagger_gen/restapi/operations/tag/find_all_tags.go b/swagger_gen/restapi/operations/tag/find_all_tags.go index f8e4172c..a3703c76 100644 --- a/swagger_gen/restapi/operations/tag/find_all_tags.go +++ b/swagger_gen/restapi/operations/tag/find_all_tags.go @@ -51,6 +51,7 @@ func (o *FindAllTags) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/tag/find_all_tags_parameters.go b/swagger_gen/restapi/operations/tag/find_all_tags_parameters.go index 75b30c9c..50aaf427 100644 --- a/swagger_gen/restapi/operations/tag/find_all_tags_parameters.go +++ b/swagger_gen/restapi/operations/tag/find_all_tags_parameters.go @@ -28,7 +28,6 @@ func NewFindAllTagsParams() FindAllTagsParams { // // swagger:parameters findAllTags type FindAllTagsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -36,10 +35,12 @@ type FindAllTagsParams struct { In: query */ Limit *int64 + /*return tags given the offset, it should usually set together with limit In: query */ Offset *int64 + /*return tags partially matching given value In: query */ @@ -54,7 +55,6 @@ func (o *FindAllTagsParams) BindRequest(r *http.Request, route *middleware.Match var res []error o.HTTPRequest = r - qs := runtime.Values(r.URL.Query()) qLimit, qhkLimit, _ := qs.GetOK("limit") diff --git a/swagger_gen/restapi/operations/tag/find_tags.go b/swagger_gen/restapi/operations/tag/find_tags.go index c617d526..3c2df084 100644 --- a/swagger_gen/restapi/operations/tag/find_tags.go +++ b/swagger_gen/restapi/operations/tag/find_tags.go @@ -51,6 +51,7 @@ func (o *FindTags) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/tag/find_tags_parameters.go b/swagger_gen/restapi/operations/tag/find_tags_parameters.go index 8a8e2fb5..8ade4d8f 100644 --- a/swagger_gen/restapi/operations/tag/find_tags_parameters.go +++ b/swagger_gen/restapi/operations/tag/find_tags_parameters.go @@ -28,7 +28,6 @@ func NewFindTagsParams() FindTagsParams { // // swagger:parameters findTags type FindTagsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *FindTagsParams) bindFlagID(rawData []string, hasKey bool, formats strfm return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *FindTagsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/tag/find_tags_urlbuilder.go b/swagger_gen/restapi/operations/tag/find_tags_urlbuilder.go index 2cff92cc..bf365b37 100644 --- a/swagger_gen/restapi/operations/tag/find_tags_urlbuilder.go +++ b/swagger_gen/restapi/operations/tag/find_tags_urlbuilder.go @@ -46,7 +46,7 @@ func (o *FindTagsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on FindTagsURL") } diff --git a/swagger_gen/restapi/operations/variant/create_variant.go b/swagger_gen/restapi/operations/variant/create_variant.go index b853f745..60d609bf 100644 --- a/swagger_gen/restapi/operations/variant/create_variant.go +++ b/swagger_gen/restapi/operations/variant/create_variant.go @@ -51,6 +51,7 @@ func (o *CreateVariant) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/variant/create_variant_parameters.go b/swagger_gen/restapi/operations/variant/create_variant_parameters.go index d8ed52dd..1c50d334 100644 --- a/swagger_gen/restapi/operations/variant/create_variant_parameters.go +++ b/swagger_gen/restapi/operations/variant/create_variant_parameters.go @@ -6,6 +6,7 @@ package variant // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewCreateVariantParams() CreateVariantParams { // // swagger:parameters createVariant type CreateVariantParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,6 +41,7 @@ type CreateVariantParams struct { In: body */ Body *models.CreateVariantRequest + /*numeric ID of the flag Required: true Minimum: 1 @@ -59,10 +60,12 @@ func (o *CreateVariantParams) BindRequest(r *http.Request, route *middleware.Mat o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.CreateVariantRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -119,7 +122,7 @@ func (o *CreateVariantParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *CreateVariantParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/variant/create_variant_urlbuilder.go b/swagger_gen/restapi/operations/variant/create_variant_urlbuilder.go index 5b3063c8..7d5a5787 100644 --- a/swagger_gen/restapi/operations/variant/create_variant_urlbuilder.go +++ b/swagger_gen/restapi/operations/variant/create_variant_urlbuilder.go @@ -46,7 +46,7 @@ func (o *CreateVariantURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on CreateVariantURL") } diff --git a/swagger_gen/restapi/operations/variant/delete_variant.go b/swagger_gen/restapi/operations/variant/delete_variant.go index fafa3d1a..c949361e 100644 --- a/swagger_gen/restapi/operations/variant/delete_variant.go +++ b/swagger_gen/restapi/operations/variant/delete_variant.go @@ -51,6 +51,7 @@ func (o *DeleteVariant) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/variant/delete_variant_parameters.go b/swagger_gen/restapi/operations/variant/delete_variant_parameters.go index 836062ed..3838e0b1 100644 --- a/swagger_gen/restapi/operations/variant/delete_variant_parameters.go +++ b/swagger_gen/restapi/operations/variant/delete_variant_parameters.go @@ -28,7 +28,6 @@ func NewDeleteVariantParams() DeleteVariantParams { // // swagger:parameters deleteVariant type DeleteVariantParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -38,6 +37,7 @@ type DeleteVariantParams struct { In: path */ FlagID int64 + /*numeric ID of the variant Required: true Minimum: 1 @@ -93,7 +93,7 @@ func (o *DeleteVariantParams) bindFlagID(rawData []string, hasKey bool, formats return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *DeleteVariantParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -126,7 +126,7 @@ func (o *DeleteVariantParams) bindVariantID(rawData []string, hasKey bool, forma return nil } -// validateVariantID carries on validations for parameter VariantID +// validateVariantID carries out validations for parameter VariantID func (o *DeleteVariantParams) validateVariantID(formats strfmt.Registry) error { if err := validate.MinimumInt("variantID", "path", o.VariantID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/variant/delete_variant_responses.go b/swagger_gen/restapi/operations/variant/delete_variant_responses.go index 653ff150..5a7e5bd5 100644 --- a/swagger_gen/restapi/operations/variant/delete_variant_responses.go +++ b/swagger_gen/restapi/operations/variant/delete_variant_responses.go @@ -33,7 +33,7 @@ func NewDeleteVariantOK() *DeleteVariantOK { // WriteResponse to the client func (o *DeleteVariantOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + rw.Header().Del(runtime.HeaderContentType) // Remove Content-Type on empty responses rw.WriteHeader(200) } diff --git a/swagger_gen/restapi/operations/variant/delete_variant_urlbuilder.go b/swagger_gen/restapi/operations/variant/delete_variant_urlbuilder.go index 851c3f4e..95a85f7d 100644 --- a/swagger_gen/restapi/operations/variant/delete_variant_urlbuilder.go +++ b/swagger_gen/restapi/operations/variant/delete_variant_urlbuilder.go @@ -47,14 +47,14 @@ func (o *DeleteVariantURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on DeleteVariantURL") } variantID := swag.FormatInt64(o.VariantID) if variantID != "" { - _path = strings.Replace(_path, "{variantID}", variantID, -1) + _path = strings.ReplaceAll(_path, "{variantID}", variantID) } else { return nil, errors.New("variantId is required on DeleteVariantURL") } diff --git a/swagger_gen/restapi/operations/variant/find_variants.go b/swagger_gen/restapi/operations/variant/find_variants.go index 8c2824b4..1826fc21 100644 --- a/swagger_gen/restapi/operations/variant/find_variants.go +++ b/swagger_gen/restapi/operations/variant/find_variants.go @@ -51,6 +51,7 @@ func (o *FindVariants) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/variant/find_variants_parameters.go b/swagger_gen/restapi/operations/variant/find_variants_parameters.go index 6c2e40d5..7b0dbfed 100644 --- a/swagger_gen/restapi/operations/variant/find_variants_parameters.go +++ b/swagger_gen/restapi/operations/variant/find_variants_parameters.go @@ -28,7 +28,6 @@ func NewFindVariantsParams() FindVariantsParams { // // swagger:parameters findVariants type FindVariantsParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -82,7 +81,7 @@ func (o *FindVariantsParams) bindFlagID(rawData []string, hasKey bool, formats s return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *FindVariantsParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/variant/find_variants_urlbuilder.go b/swagger_gen/restapi/operations/variant/find_variants_urlbuilder.go index 600695a4..c91d0731 100644 --- a/swagger_gen/restapi/operations/variant/find_variants_urlbuilder.go +++ b/swagger_gen/restapi/operations/variant/find_variants_urlbuilder.go @@ -46,7 +46,7 @@ func (o *FindVariantsURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on FindVariantsURL") } diff --git a/swagger_gen/restapi/operations/variant/put_variant.go b/swagger_gen/restapi/operations/variant/put_variant.go index e7f38423..bfee454a 100644 --- a/swagger_gen/restapi/operations/variant/put_variant.go +++ b/swagger_gen/restapi/operations/variant/put_variant.go @@ -51,6 +51,7 @@ func (o *PutVariant) ServeHTTP(rw http.ResponseWriter, r *http.Request) { } res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) } diff --git a/swagger_gen/restapi/operations/variant/put_variant_parameters.go b/swagger_gen/restapi/operations/variant/put_variant_parameters.go index 85886b2f..f1d98b1a 100644 --- a/swagger_gen/restapi/operations/variant/put_variant_parameters.go +++ b/swagger_gen/restapi/operations/variant/put_variant_parameters.go @@ -6,6 +6,7 @@ package variant // Editing this file might prove futile when you re-run the swagger generate command import ( + stderrors "errors" "io" "net/http" @@ -32,7 +33,6 @@ func NewPutVariantParams() PutVariantParams { // // swagger:parameters putVariant type PutVariantParams struct { - // HTTP Request Object HTTPRequest *http.Request `json:"-"` @@ -41,12 +41,14 @@ type PutVariantParams struct { In: body */ Body *models.PutVariantRequest + /*numeric ID of the flag Required: true Minimum: 1 In: path */ FlagID int64 + /*numeric ID of the variant Required: true Minimum: 1 @@ -65,10 +67,12 @@ func (o *PutVariantParams) BindRequest(r *http.Request, route *middleware.Matche o.HTTPRequest = r if runtime.HasBody(r) { - defer r.Body.Close() + defer func() { + _ = r.Body.Close() + }() var body models.PutVariantRequest if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { + if stderrors.Is(err, io.EOF) { res = append(res, errors.Required("body", "body", "")) } else { res = append(res, errors.NewParseError("body", "body", "", err)) @@ -130,7 +134,7 @@ func (o *PutVariantParams) bindFlagID(rawData []string, hasKey bool, formats str return nil } -// validateFlagID carries on validations for parameter FlagID +// validateFlagID carries out validations for parameter FlagID func (o *PutVariantParams) validateFlagID(formats strfmt.Registry) error { if err := validate.MinimumInt("flagID", "path", o.FlagID, 1, false); err != nil { @@ -163,7 +167,7 @@ func (o *PutVariantParams) bindVariantID(rawData []string, hasKey bool, formats return nil } -// validateVariantID carries on validations for parameter VariantID +// validateVariantID carries out validations for parameter VariantID func (o *PutVariantParams) validateVariantID(formats strfmt.Registry) error { if err := validate.MinimumInt("variantID", "path", o.VariantID, 1, false); err != nil { diff --git a/swagger_gen/restapi/operations/variant/put_variant_urlbuilder.go b/swagger_gen/restapi/operations/variant/put_variant_urlbuilder.go index dc421cd1..25a7bd34 100644 --- a/swagger_gen/restapi/operations/variant/put_variant_urlbuilder.go +++ b/swagger_gen/restapi/operations/variant/put_variant_urlbuilder.go @@ -47,14 +47,14 @@ func (o *PutVariantURL) Build() (*url.URL, error) { flagID := swag.FormatInt64(o.FlagID) if flagID != "" { - _path = strings.Replace(_path, "{flagID}", flagID, -1) + _path = strings.ReplaceAll(_path, "{flagID}", flagID) } else { return nil, errors.New("flagId is required on PutVariantURL") } variantID := swag.FormatInt64(o.VariantID) if variantID != "" { - _path = strings.Replace(_path, "{variantID}", variantID, -1) + _path = strings.ReplaceAll(_path, "{variantID}", variantID) } else { return nil, errors.New("variantId is required on PutVariantURL") } diff --git a/swagger_gen/restapi/server.go b/swagger_gen/restapi/server.go index 2e85f270..59e86886 100644 --- a/swagger_gen/restapi/server.go +++ b/swagger_gen/restapi/server.go @@ -7,7 +7,6 @@ import ( "crypto/tls" "crypto/x509" "errors" - "fmt" "log" "net" "net/http" @@ -19,11 +18,12 @@ import ( "syscall" "time" - "github.com/go-openapi/runtime/flagext" - "github.com/go-openapi/swag" flags "github.com/jessevdk/go-flags" "golang.org/x/net/netutil" + "github.com/go-openapi/runtime/flagext" + "github.com/go-openapi/swag" + "github.com/openflagr/flagr/swagger_gen/restapi/operations" ) @@ -104,7 +104,7 @@ type Server struct { } // Logf logs message either via defined user logger or via system one if no user logger is defined. -func (s *Server) Logf(f string, args ...interface{}) { +func (s *Server) Logf(f string, args ...any) { if s.api != nil && s.api.Logger != nil { s.api.Logger(f, args...) } else { @@ -114,7 +114,7 @@ func (s *Server) Logf(f string, args ...interface{}) { // Fatalf logs message either via defined user logger or via system one if no user logger is defined. // Exits with non-zero status after printing -func (s *Server) Fatalf(f string, args ...interface{}) { +func (s *Server) Fatalf(f string, args ...any) { if s.api != nil && s.api.Logger != nil { s.api.Logger(f, args...) os.Exit(1) @@ -188,8 +188,8 @@ func (s *Server) Serve() (err error) { s.Logf("Serving flagr at unix://%s", s.SocketPath) go func(l net.Listener) { defer wg.Done() - if err := domainSocket.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) + if errServe := domainSocket.Serve(l); errServe != nil && !errors.Is(errServe, http.ErrServerClosed) { + s.Fatalf("%v", errServe) } s.Logf("Stopped serving flagr at unix://%s", s.SocketPath) }(s.domainSocketL) @@ -218,8 +218,8 @@ func (s *Server) Serve() (err error) { s.Logf("Serving flagr at http://%s", s.httpServerL.Addr()) go func(l net.Listener) { defer wg.Done() - if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) + if errServe := httpServer.Serve(l); errServe != nil && !errors.Is(errServe, http.ErrServerClosed) { + s.Fatalf("%v", errServe) } s.Logf("Stopped serving flagr at http://%s", l.Addr()) }(s.httpServerL) @@ -280,7 +280,7 @@ func (s *Server) Serve() (err error) { caCertPool := x509.NewCertPool() ok := caCertPool.AppendCertsFromPEM(caCert) if !ok { - return fmt.Errorf("cannot parse CA certificate") + return errors.New("cannot parse CA certificate") } httpsServer.TLSConfig.ClientCAs = caCertPool httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert @@ -311,8 +311,8 @@ func (s *Server) Serve() (err error) { s.Logf("Serving flagr at https://%s", s.httpsServerL.Addr()) go func(l net.Listener) { defer wg.Done() - if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) + if errServe := httpsServer.Serve(l); errServe != nil && !errors.Is(errServe, http.ErrServerClosed) { + s.Fatalf("%v", errServe) } s.Logf("Stopped serving flagr at https://%s", l.Addr()) }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig))