diff --git a/.gitignore b/.gitignore index 8c020dec3..0cc3b8aff 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,6 @@ cover.html # vendor/ # Go workspace file -go.work -go.work.sum # env file .env @@ -28,3 +26,4 @@ go.work.sum # dirs to ignore bin _output +operator-sdk/ diff --git a/Makefile b/Makefile index 252e81f7e..57749ff8c 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,9 @@ else GOBIN=$(shell go env GOBIN) endif +PACKAGE=github.com/openshift/external-secrets-operator +TOOLS_DIR=$(PROJECT_ROOT)/tools + # CONTAINER_TOOL defines the container tool to be used for building images. # Be aware that the target commands are only tested with Docker which is # scaffolded by default. However, you might want to replace it to use other @@ -166,14 +169,12 @@ generate: $(CONTROLLER_GEN) ## Generate code containing DeepCopy, DeepCopyInto, .PHONY: fmt fmt: ## Run go fmt against code. @echo "Running go formatter..." - @go fmt ./... + @GOWORK=off GOFLAGS="-mod=readonly" go fmt ./... .PHONY: vet vet: ## Run go vet against code. @echo "Running go vet..." - @go vet ./... - -##@ Testing + @GOWORK=off GOFLAGS="-mod=readonly" go vet ./... .PHONY: test test: $(ENVTEST) manifests generate fmt vet test-apis test-unit ## Run all tests. @@ -181,24 +182,23 @@ test: $(ENVTEST) manifests generate fmt vet test-apis test-unit ## Run all tests .PHONY: test-unit test-unit: vet ## Run unit tests. @echo "Running go unit tests..." - @go test $$(go list ./... | grep -vE 'test/(e2e|apis|utils)') -coverprofile cover.out + @GOWORK=off GOFLAGS="-mod=readonly" go test $$(go list ./... | grep -vE 'test/(e2e|apis|utils)') -coverprofile cover.out # E2E_TIMEOUT is the timeout for e2e tests. E2E_TIMEOUT ?= 1h # E2E_GINKGO_LABEL_FILTER is ginkgo label query for selecting tests. See # https://onsi.github.io/ginkgo/#spec-labels. The default is to run tests on the AWS platform. E2E_GINKGO_LABEL_FILTER ?= "Platform: isSubsetOf {AWS}" - .PHONY: test-e2e test-e2e: ## Run e2e tests against a cluster. @echo "Running go e2e tests..." - @go test -C ./test/e2e \ + @cd test && go test \ -timeout $(E2E_TIMEOUT) \ -count 1 \ -v \ -p 1 \ -tags e2e \ - . \ + ./e2e \ -ginkgo.v \ -ginkgo.show-node-events \ -ginkgo.label-filter=$(E2E_GINKGO_LABEL_FILTER) diff --git a/go.mod b/go.mod index a5de9b315..4f550fcbb 100644 --- a/go.mod +++ b/go.mod @@ -3,111 +3,34 @@ module github.com/openshift/external-secrets-operator go 1.25.3 require ( - github.com/aws/aws-sdk-go v1.55.8 github.com/cert-manager/cert-manager v1.18.2 - github.com/elastic/crd-ref-docs v0.1.0 - github.com/ghodss/yaml v1.0.0 - github.com/go-bindata/go-bindata v3.1.2+incompatible github.com/go-logr/logr v1.4.3 - github.com/golangci/golangci-lint/v2 v2.7.2 - github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0 - github.com/onsi/ginkgo/v2 v2.27.2 - github.com/onsi/gomega v1.38.2 - github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d - github.com/stretchr/testify v1.11.1 - github.com/vmware-archive/yaml-patch v0.0.11 go.uber.org/zap v1.27.0 - golang.org/x/vuln v1.1.4 - k8s.io/api v0.34.1 - k8s.io/apiextensions-apiserver v0.34.1 - k8s.io/apimachinery v0.34.1 - k8s.io/client-go v0.34.1 + k8s.io/api v0.34.3 + k8s.io/apiextensions-apiserver v0.34.3 + k8s.io/apimachinery v0.34.3 + k8s.io/client-go v0.34.3 k8s.io/klog/v2 v2.130.1 - k8s.io/kubernetes v1.34.1 + k8s.io/kubernetes v1.34.3 k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 - sigs.k8s.io/controller-runtime v0.22.3 - sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86 - sigs.k8s.io/controller-tools v0.19.0 - sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951 - sigs.k8s.io/kustomize/kustomize/v5 v5.7.1 + sigs.k8s.io/controller-runtime v0.22.5 ) require ( - 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect - 4d63.com/gochecknoglobals v0.2.2 // indirect cel.dev/expr v0.24.0 // indirect - codeberg.org/chavacava/garif v0.2.0 // indirect - dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect - dev.gaijin.team/go/golib v0.6.0 // indirect - github.com/4meepo/tagalign v1.4.3 // indirect - github.com/Abirdcfly/dupword v0.1.7 // indirect - github.com/AdminBenni/iota-mixing v1.0.0 // indirect - github.com/AlwxSin/noinlineerr v1.0.5 // indirect - github.com/Antonboom/errname v1.1.1 // indirect - github.com/Antonboom/nilnil v1.1.1 // indirect - github.com/Antonboom/testifylint v1.6.4 // indirect - github.com/BurntSushi/toml v1.5.0 // indirect - github.com/Djarvur/go-err113 v0.1.1 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/semver/v3 v3.4.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect - github.com/MirrexOne/unqueryvet v1.3.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect - github.com/alecthomas/chroma/v2 v2.20.0 // indirect - github.com/alecthomas/go-check-sumtype v0.3.1 // indirect - github.com/alexkohler/nakedret/v2 v2.0.6 // indirect - github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/alfatraining/structtag v1.0.0 // indirect - github.com/alingse/asasalint v0.0.11 // indirect - github.com/alingse/nilnesserr v0.2.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect - github.com/ashanbrown/makezero/v2 v2.1.0 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.3 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v4 v4.7.0 // indirect - github.com/bombsimon/wsl/v5 v5.3.0 // indirect - github.com/breml/bidichk v0.3.3 // indirect - github.com/breml/errchkjson v0.4.1 // indirect - github.com/butuzov/ireturn v0.4.0 // indirect - github.com/butuzov/mirror v1.3.0 // indirect - github.com/catenacyber/perfsprint v0.10.1 // indirect - github.com/ccojocar/zxcvbn-go v1.0.4 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/charithe/durationcheck v0.0.11 // indirect - github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect - github.com/charmbracelet/lipgloss v1.1.0 // indirect - github.com/charmbracelet/x/ansi v0.8.0 // indirect - github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect - github.com/charmbracelet/x/term v0.2.1 // indirect - github.com/ckaznocha/intrange v0.3.1 // indirect - github.com/curioswitch/go-reassign v0.3.0 // indirect - github.com/daixiang0/gci v0.13.7 // indirect - github.com/dave/dst v0.27.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect github.com/emicklei/go-restful/v3 v3.13.0 // indirect - github.com/ettle/strcase v0.2.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect - github.com/fatih/color v1.18.0 // indirect - github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/firefart/nonamedreturns v1.0.6 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.3.17 // indirect - github.com/go-critic/go-critic v0.14.2 // indirect - github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.22.0 // indirect github.com/go-openapi/jsonreference v0.21.1 // indirect github.com/go-openapi/swag v0.24.1 // indirect @@ -122,161 +45,33 @@ require ( github.com/go-openapi/swag/stringutils v0.24.0 // indirect github.com/go-openapi/swag/typeutils v0.24.0 // indirect github.com/go-openapi/swag/yamlutils v0.24.0 // indirect - github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/go-toolsmith/astcast v1.1.0 // indirect - github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.2.0 // indirect - github.com/go-toolsmith/astfmt v1.1.0 // indirect - github.com/go-toolsmith/astp v1.1.0 // indirect - github.com/go-toolsmith/strparse v1.1.0 // indirect - github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect - github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect - github.com/gobuffalo/flect v1.0.3 // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-yaml v1.18.0 // indirect - github.com/godoc-lint/godoc-lint v0.10.2 // indirect - github.com/gofrs/flock v0.13.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golangci/asciicheck v0.5.0 // indirect - github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect - github.com/golangci/go-printf-func-name v0.1.1 // indirect - github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect - github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect - github.com/golangci/misspell v0.7.0 // indirect - github.com/golangci/plugin-module-register v0.1.2 // indirect - github.com/golangci/revgrep v0.8.0 // indirect - github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect - github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.26.1 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/pprof v0.0.0-20250903194437-c28834ac2320 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gordonklaus/ineffassign v0.2.0 // indirect - github.com/gostaticanalysis/analysisutil v0.7.1 // indirect - github.com/gostaticanalysis/comment v1.5.0 // indirect - github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect - github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect - github.com/hashicorp/go-version v1.8.0 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/hashicorp/hcl v1.0.1-vault-7 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/huandu/xstrings v1.5.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jgautheron/goconst v1.8.2 // indirect - github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jjti/go-spancheck v0.6.5 // indirect - github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/julz/importas v0.2.0 // indirect - github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect - github.com/kisielk/errcheck v1.9.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.6 // indirect - github.com/krishicks/yaml-patch v0.0.10 // indirect - github.com/kulti/thelper v0.7.1 // indirect - github.com/kunwardeep/paralleltest v1.0.15 // indirect - github.com/lasiar/canonicalheader v1.1.2 // indirect - github.com/ldez/exptostd v0.4.5 // indirect - github.com/ldez/gomoddirectives v0.7.1 // indirect - github.com/ldez/grignotin v0.10.1 // indirect - github.com/ldez/tagliatelle v0.7.2 // indirect - github.com/ldez/usetesting v0.5.0 // indirect - github.com/leonklingele/grouper v1.1.2 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/macabu/inamedparam v0.2.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.9.0 // indirect - github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect - github.com/manuelarte/funcorder v0.5.0 // indirect - github.com/maratori/testableexamples v1.0.1 // indirect - github.com/maratori/testpackage v1.1.2 // indirect - github.com/matoous/godox v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.14 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/mgechev/revive v1.13.0 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect - github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect - github.com/moricho/tparallel v0.3.2 // indirect - github.com/muesli/termenv v0.16.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nishanths/exhaustive v0.12.0 // indirect - github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.21.2 // indirect - github.com/nxadm/tail v1.4.11 // indirect + github.com/onsi/ginkgo/v2 v2.27.2 // indirect + github.com/onsi/gomega v1.38.2 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/polyfloyd/go-errorlint v1.8.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.66.1 // indirect github.com/prometheus/procfs v0.17.0 // indirect - github.com/quasilyte/go-ruleguard v0.4.5 // indirect - github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect - github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect - github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/raeperd/recvcheck v0.2.0 // indirect - github.com/rivo/uniseg v0.4.7 // indirect - github.com/rogpeppe/go-internal v1.14.1 // indirect - github.com/ryancurrah/gomodguard v1.4.1 // indirect - github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect - github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect - github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect - github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect - github.com/securego/gosec/v2 v2.22.11-0.20251204091113-daccba6b93d7 // indirect - github.com/sergi/go-diff v1.4.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sonatard/noctx v0.4.0 // indirect - github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.15.0 // indirect - github.com/spf13/cast v1.10.0 // indirect github.com/spf13/cobra v1.10.2 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.10 // indirect - github.com/spf13/viper v1.12.0 // indirect - github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/tetafro/godot v1.5.4 // indirect - github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect - github.com/timonwong/loggercheck v0.11.0 // indirect - github.com/tomarrell/wrapcheck/v2 v2.12.0 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.2.0 // indirect - github.com/ultraware/whitespace v0.2.0 // indirect - github.com/uudashr/gocognit v1.2.0 // indirect - github.com/uudashr/iface v1.4.1 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/xen0n/gosmopolitan v1.3.0 // indirect - github.com/xlab/treeprint v1.2.0 // indirect - github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.3.0 // indirect - github.com/ykadowak/zerologlint v0.1.5 // indirect - gitlab.com/bosi/decorder v0.4.2 // indirect - go-simpler.org/musttag v0.14.0 // indirect - go-simpler.org/sloglint v0.11.1 // indirect - go.augendre.info/arangolint v0.3.1 // indirect - go.augendre.info/fatcontext v0.9.0 // indirect go.opentelemetry.io/auto/sdk v1.2.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect @@ -286,19 +81,14 @@ require ( go.opentelemetry.io/otel/sdk v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect go.opentelemetry.io/proto/otlp v1.8.0 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect - golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect - golang.org/x/mod v0.30.0 // indirect golang.org/x/net v0.47.0 // indirect golang.org/x/oauth2 v0.31.0 // indirect golang.org/x/sync v0.18.0 // indirect golang.org/x/sys v0.38.0 // indirect - golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect golang.org/x/term v0.37.0 // indirect golang.org/x/text v0.31.0 // indirect golang.org/x/time v0.13.0 // indirect @@ -310,26 +100,16 @@ require ( google.golang.org/protobuf v1.36.9 // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.6.1 // indirect - k8s.io/apiserver v0.34.1 // indirect - k8s.io/code-generator v0.34.1 // indirect - k8s.io/component-base v0.34.1 // indirect + k8s.io/apiserver v0.34.3 // indirect + k8s.io/component-base v0.34.3 // indirect k8s.io/component-helpers v0.32.1 // indirect k8s.io/controller-manager v0.32.1 // indirect - k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect k8s.io/kubelet v0.32.1 //indirect - mvdan.cc/gofumpt v0.9.2 // indirect - mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect - sigs.k8s.io/kustomize/api v0.20.1 // indirect - sigs.k8s.io/kustomize/cmd/config v0.20.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect @@ -338,3 +118,6 @@ require ( replace github.com/external-secrets/external-secrets => github.com/openshift/external-secrets v0.20.4 replace github.com/tdakkota/asciicheck => github.com/golangci/asciicheck v0.4.1 + +// Exclude old monolithic genproto to avoid ambiguous imports with modular versions +exclude google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd diff --git a/go.sum b/go.sum index 3be2751c4..ca62623bc 100644 --- a/go.sum +++ b/go.sum @@ -1,179 +1,38 @@ -4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A= -4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= -4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= -4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= -codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY= -codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ= -dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y= -dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= -dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo= -dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= -github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8= -github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= -github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ= -github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= -github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo= -github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= -github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= -github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= -github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= -github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= -github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= -github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= -github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= -github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= -github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= -github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= -github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/MirrexOne/unqueryvet v1.3.0 h1:5slWSomgqpYU4zFuZ3NNOfOUxVPlXFDBPAVasZOGlAY= -github.com/MirrexOne/unqueryvet v1.3.0/go.mod h1:IWwCwMQlSWjAIteW0t+28Q5vouyktfujzYznSIWiuOg= -github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= -github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.20.0 h1:sfIHpxPyR07/Oylvmcai3X/exDlE8+FA820NTz+9sGw= -github.com/alecthomas/chroma/v2 v2.20.0/go.mod h1:e7tViK0xh/Nf4BYHl00ycY6rV7b8iXBksI9E359yNmA= -github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= -github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= -github.com/alecthomas/repr v0.5.1 h1:E3G4t2QbHTSNpPKBgMTln5KLkZHLOcU7r37J4pXBuIg= -github.com/alecthomas/repr v0.5.1/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ= -github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q= -github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/alfatraining/structtag v1.0.0 h1:2qmcUqNcCoyVJ0up879K614L9PazjBSFruTB0GOFjCc= -github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus= -github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= -github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= -github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w= -github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/ashanbrown/forbidigo/v2 v2.3.0 h1:OZZDOchCgsX5gvToVtEBoV2UWbFfI6RKQTir2UZzSxo= -github.com/ashanbrown/forbidigo/v2 v2.3.0/go.mod h1:5p6VmsG5/1xx3E785W9fouMxIOkvY2rRV9nMdWadd6c= -github.com/ashanbrown/makezero/v2 v2.1.0 h1:snuKYMbqosNokUKm+R6/+vOPs8yVAi46La7Ck6QYSaE= -github.com/ashanbrown/makezero/v2 v2.1.0/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= -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/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= -github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= 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/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= -github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= -github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= -github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= -github.com/bombsimon/wsl/v5 v5.3.0 h1:nZWREJFL6U3vgW/B1lfDOigl+tEF6qgs6dGGbFeR0UM= -github.com/bombsimon/wsl/v5 v5.3.0/go.mod h1:Gp8lD04z27wm3FANIUPZycXp+8huVsn0oxc+n4qfV9I= -github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= -github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= -github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= -github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= -github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E= -github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70= -github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= -github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= -github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= -github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= -github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= -github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cert-manager/cert-manager v1.18.2 h1:H2P75ycGcTMauV3gvpkDqLdS3RSXonWF2S49QGA1PZE= github.com/cert-manager/cert-manager v1.18.2/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw= 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/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1DidBcABctk= -github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= -github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= -github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= -github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= -github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= -github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= -github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= -github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= -github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= -github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= -github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs= -github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= -github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= -github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ= -github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= -github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= -github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= -github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= -github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= -github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/elastic/crd-ref-docs v0.1.0 h1:Cr5kz89QB3Iuuj7dhAfLMApCrChEGAaIBTxGk/xuRKw= -github.com/elastic/crd-ref-docs v0.1.0/go.mod h1:X83mMBdJt05heJUYiS3T0yJ/JkCuliuhSUNav5Gjo/U= github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= -github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= -github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= -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.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= -github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghostiam/protogetter v0.3.17 h1:sjGPErP9o7i2Ym+z3LsQzBdLCNaqbYy2iJQPxGXg04Q= -github.com/ghostiam/protogetter v0.3.17/go.mod h1:AivIX1eKA/TcUmzZdzbl+Tb8tjIe8FcyG6JFyemQAH4= -github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= -github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= -github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= -github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= -github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= -github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= -github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= -github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= -github.com/go-critic/go-critic v0.14.2 h1:PMvP5f+LdR8p6B29npvChUXbD1vrNlKDf60NJtgMBOo= -github.com/go-critic/go-critic v0.14.2/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= 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= @@ -209,80 +68,18 @@ github.com/go-openapi/swag/typeutils v0.24.0 h1:d3szEGzGDf4L2y1gYOSSLeK6h46F+zib github.com/go-openapi/swag/typeutils v0.24.0/go.mod h1:q8C3Kmk/vh2VhpCLaoR2MVWOGP8y7Jc8l82qCTd1DYI= github.com/go-openapi/swag/yamlutils v0.24.0 h1:bhw4894A7Iw6ne+639hsBNRHg9iZg/ISrOVr+sJGp4c= github.com/go-openapi/swag/yamlutils v0.24.0/go.mod h1:DpKv5aYuaGm/sULePoeiG8uwMpZSfReo1HR3Ik0yaG8= -github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= -github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= -github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= -github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= -github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= -github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= -github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= -github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= -github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= -github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= -github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= -github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= -github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= -github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= -github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= -github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -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/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= -github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= -github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= -github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= -github.com/godoc-lint/godoc-lint v0.10.2 h1:dksNgK+zebnVlj4Fx83CRnCmPO0qRat/9xfFsir1nfg= -github.com/godoc-lint/godoc-lint v0.10.2/go.mod h1:KleLcHu/CGSvkjUH2RvZyoK1MBC7pDQg4NxMYLcBBsw= -github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= -github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4nUfo0= -github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= -github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= -github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= -github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= -github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= -github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= -github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= -github.com/golangci/golangci-lint/v2 v2.7.2 h1:AhBC+YeEueec4AGlIbvPym5C70Thx0JykIqXbdIXWx0= -github.com/golangci/golangci-lint/v2 v2.7.2/go.mod h1:pDijleoBu7e8sejMqyZ3L5n6geqe+cVvOAz2QImqqVc= -github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 h1:AkK+w9FZBXlU/xUmBtSJN1+tAI4FIvy5WtnUnY8e4p8= -github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95/go.mod h1:k9mmcyWKSTMcPPvQUCfRWWQ9VHJ1U9Dc0R7kaXAgtnQ= -github.com/golangci/misspell v0.7.0 h1:4GOHr/T1lTW0hhR4tgaaV1WS/lJ+ncvYCoFKmqJsj0c= -github.com/golangci/misspell v0.7.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg= -github.com/golangci/plugin-module-register v0.1.2 h1:e5WM6PO6NIAEcij3B053CohVp3HIYbzSuP53UAYgOpg= -github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw= -github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s= -github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= -github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e h1:ai0EfmVYE2bRA5htgAG9r7s3tHsfjIhN98WshBTJ9jM= -github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s= -github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM= -github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= -github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= -github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/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.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -290,198 +87,47 @@ 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-20250903194437-c28834ac2320 h1:c7ayAhbRP9HnEl/hg/WQOM9s0snWztfW6feWXZbGHw0= github.com/google/pprof v0.0.0-20250903194437-c28834ac2320/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 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/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= -github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= -github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8= -github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= -github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk= -github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= -github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU= -github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= -github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= -github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= -github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= -github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= -github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hashicorp/hcl v1.0.1-vault-7 h1:ag5OxFVy3QYTFTJODRzTKVZ6xvdfLLCA1cy/Y6xGI0I= -github.com/hashicorp/hcl v1.0.1-vault-7/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= -github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= -github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= -github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= -github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= -github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW34dhU4az1GN0pTPADwNmvoRSeoZ6PItiqnY= -github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/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/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= -github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= -github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= -github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0= -github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.9.0 h1:9xt1zI9EBfcYBvdU1nVrzMzzUPUtPKs9bVSIM3TAb3M= -github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= -github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= 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.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -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/krishicks/yaml-patch v0.0.10 h1:H4FcHpnNwVmw8u0MjPRjWyIXtco6zM2F78t+57oNM3E= -github.com/krishicks/yaml-patch v0.0.10/go.mod h1:Sm5TchwZS6sm7RJoyg87tzxm2ZcKzdRE4Q7TjNhPrME= -github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= -github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= -github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w= -github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk= 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/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= -github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= -github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ= -github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= -github.com/ldez/gomoddirectives v0.7.1 h1:FaULkvUIG36hj6chpwa+FdCNGZBsD7/fO+p7CCsM6pE= -github.com/ldez/gomoddirectives v0.7.1/go.mod h1:auDNtakWJR1rC+YX7ar+HmveqXATBAyEK1KYpsIRW/8= -github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= -github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= -github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk= -github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= -github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc= -github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= -github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= -github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE= -github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= -github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww= -github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= -github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8= -github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA= -github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8= -github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ= -github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs= -github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= -github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= -github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= -github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= -github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0 h1:aOeI7xAOVdK+R6xbVsZuU9HmCZYmQVmZgPf9xJUd2Sg= -github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0/go.mod h1:0hZWbtfeCYUQeAQdPLUzETiBhUSns7O6LDj9vH88xKA= -github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= -github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= -github.com/mgechev/revive v1.13.0 h1:yFbEVliCVKRXY8UgwEO7EOYNopvjb1BFbmYqm9hZjBM= -github.com/mgechev/revive v1.13.0/go.mod h1:efJfeBVCX2JUumNQ7dtOLDja+QKj9mYGgEZA7rt5u+0= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= -github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= -github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= -github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= 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/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= -github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= -github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= -github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.21.2 h1:khzWfm2/Br8ZemX8QM1pl72LwM+rMeW6VUbQ4rzh0Po= -github.com/nunnatsa/ginkgolinter v0.21.2/go.mod h1:GItSI5fw7mCGLPmkvGYrr1kEetZe7B593jcyOpyabsY= -github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= -github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d h1:iwdrJUzp+GsbCNL84aZtSYwKSjrtxUJJ0cnVH8OsIeU= -github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= -github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= -github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.8.0 h1:DL4RestQqRLr8U4LygLw8g2DX6RN1eBJOpa2mzsrl1Q= -github.com/polyfloyd/go-errorlint v1.8.0/go.mod h1:G2W0Q5roxbLCt0ZQbdoxQxXktTjwNyDbEaj3n7jvl4s= -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.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= @@ -490,70 +136,14 @@ github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9Z github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= -github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA= -github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= -github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY= -github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= -github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= -github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 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/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g= -github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= -github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= -github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= -github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= -github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= -github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= -github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= -github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= -github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= -github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= -github.com/securego/gosec/v2 v2.22.11-0.20251204091113-daccba6b93d7 h1:rZg6IGn0ySYZwCX8LHwZoYm03JhG/cVAJJ3O+u3Vclo= -github.com/securego/gosec/v2 v2.22.11-0.20251204091113-daccba6b93d7/go.mod h1:9sr22NZO5Kfh7unW/xZxkGYTmj2484/fCiE54gw7UTY= -github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= -github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= -github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sonatard/noctx v0.4.0 h1:7MC/5Gg4SQ4lhLYR6mvOP6mQVSxCrdyiExo7atBs27o= -github.com/sonatard/noctx v0.4.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas= -github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= -github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= -github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= -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/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= -github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= -github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g= -github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -561,82 +151,16 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= -github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= -github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= -github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= -github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk= -github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= -github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M= -github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= -github.com/tomarrell/wrapcheck/v2 v2.12.0 h1:H/qQ1aNWz/eeIhxKAFvkfIA+N7YDvq6TWVFL27Of9is= -github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo= -github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= -github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= -github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= -github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= -github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= -github.com/uudashr/gocognit v1.2.0 h1:3BU9aMr1xbhPlvJLSydKwdLN3tEUUrzPSSM8S4hDYRA= -github.com/uudashr/gocognit v1.2.0/go.mod h1:k/DdKPI6XBZO1q7HgoV2juESI2/Ofj9AcHPZhBBdrTU= -github.com/uudashr/iface v1.4.1 h1:J16Xl1wyNX9ofhpHmQ9h9gk5rnv2A6lX/2+APLTo0zU= -github.com/uudashr/iface v1.4.1/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= -github.com/vmware-archive/yaml-patch v0.0.11 h1:9o4FGgkpLD88A5O7BOOXs7UBeeymRT9atLsKmHJ2wWs= -github.com/vmware-archive/yaml-patch v0.0.11/go.mod h1:mHWEn1O1CU3yBnN6iPFeAwAqzUibF2X+9EltQ28w+Vs= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM= -github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= -github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= -github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= -github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= -github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= -github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= -github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= -gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= -go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= -go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= -go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= -go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= -go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ= -go.augendre.info/arangolint v0.3.1 h1:n2E6p8f+zfXSFLa2e2WqFPp4bfvcuRdd50y6cT65pSo= -go.augendre.info/arangolint v0.3.1/go.mod h1:6ZKzEzIZuBQwoSvlKT+qpUfIbBfFCE5gbAoTg0/117g= -go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE= -go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= go.opentelemetry.io/auto/sdk v1.2.0 h1:YpRtUFjvhSymycLS2T81lT6IGhcUP+LUPtv0iv1N8bM= go.opentelemetry.io/auto/sdk v1.2.0/go.mod h1:1deq2zL7rwjwC8mR7XgY2N+tlIl6pjmEUoLDENMEzwk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= @@ -657,8 +181,6 @@ go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJr go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE= go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -672,123 +194,44 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= -golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= -golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 h1:HDjDiATsGqvuqvkDvgJjD1IgPrVekcSXVVE21JwvzGE= -golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= -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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= 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= 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI= golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= -golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= -golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= -golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= -golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= -golang.org/x/vuln v1.1.4 h1:Ju8QsuyhX3Hk8ma3CesTbO8vfJD9EvUBgHvkxHBzj0I= -golang.org/x/vuln v1.1.4/go.mod h1:F+45wmU18ym/ca5PLTPLsSzr2KppzswxPP603ldA67s= 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= @@ -806,82 +249,49 @@ google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= -honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= -k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM= -k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= -k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI= -k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc= -k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= -k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA= -k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0= -k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY= -k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8= -k8s.io/code-generator v0.34.1 h1:WpphT26E+j7tEgIUfFr5WfbJrktCGzB3JoJH9149xYc= -k8s.io/code-generator v0.34.1/go.mod h1:DeWjekbDnJWRwpw3s0Jat87c+e0TgkxoR4ar608yqvg= -k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A= -k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0= +k8s.io/api v0.34.3 h1:D12sTP257/jSH2vHV2EDYrb16bS7ULlHpdNdNhEw2S4= +k8s.io/api v0.34.3/go.mod h1:PyVQBF886Q5RSQZOim7DybQjAbVs8g7gwJNhGtY5MBk= +k8s.io/apiextensions-apiserver v0.34.3 h1:p10fGlkDY09eWKOTeUSioxwLukJnm+KuDZdrW71y40g= +k8s.io/apiextensions-apiserver v0.34.3/go.mod h1:aujxvqGFRdb/cmXYfcRTeppN7S2XV/t7WMEc64zB5A0= +k8s.io/apimachinery v0.34.3 h1:/TB+SFEiQvN9HPldtlWOTp0hWbJ+fjU+wkxysf/aQnE= +k8s.io/apimachinery v0.34.3/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.3 h1:uGH1qpDvSiYG4HVFqc6A3L4CKiX+aBWDrrsxHYK0Bdo= +k8s.io/apiserver v0.34.3/go.mod h1:QPnnahMO5C2m3lm6fPW3+JmyQbvHZQ8uudAu/493P2w= +k8s.io/client-go v0.34.3 h1:wtYtpzy/OPNYf7WyNBTj3iUA0XaBHVqhv4Iv3tbrF5A= +k8s.io/client-go v0.34.3/go.mod h1:OxxeYagaP9Kdf78UrKLa3YZixMCfP6bgPwPwNBQBzpM= +k8s.io/component-base v0.34.3 h1:zsEgw6ELqK0XncCQomgO9DpUIzlrYuZYA0Cgo+JWpVk= +k8s.io/component-base v0.34.3/go.mod h1:5iIlD8wPfWE/xSHTRfbjuvUul2WZbI2nOUK65XL0E/c= k8s.io/component-helpers v0.32.1 h1:TwdsSM1vW9GjnfX18lkrZbwE5G9psCIS2/rhenTDXd8= k8s.io/component-helpers v0.32.1/go.mod h1:1JT1Ei3FD29yFQ18F3laj1WyvxYdHIhyxx6adKMFQXI= k8s.io/controller-manager v0.32.1 h1:z3oQp1O5l0cSzM/MKf8V4olhJ9TmnELoJRPcV/v1s+Y= k8s.io/controller-manager v0.32.1/go.mod h1:dVA1UZPbqHH4hEhrrnLvQ4d5qVQCklNB8GEzYV59v/4= -k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= -k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/kubelet v0.32.1 h1:bB91GvMsZb+LfzBxnjPEr1Fal/sdxZtYphlfwAaRJGw= k8s.io/kubelet v0.32.1/go.mod h1:4sAEZ6PlewD0GroV3zscY7llym6kmNNTVmUI/Qshm6w= -k8s.io/kubernetes v1.34.1 h1:F3p8dtpv+i8zQoebZeK5zBqM1g9x1aIdnA5vthvcuUk= -k8s.io/kubernetes v1.34.1/go.mod h1:iu+FhII+Oc/1gGWLJcer6wpyih441aNFHl7Pvm8yPto= +k8s.io/kubernetes v1.34.3 h1:0TfljWbhEF5DBks+WFMSrvKfxBLo4vnZuqORjLMiyT4= +k8s.io/kubernetes v1.34.3/go.mod h1:m6pZk6a179pRo2wsTiCPORJ86iOEQmfIzUvtyEF8BwA= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4= -mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= -mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI= -mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTijTq8Y= -sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86 h1:96TA+X7D58V3065duUfj+p+Pp17q8U02+cSCmE3IsaU= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86/go.mod h1:IaDsO8xSPRxRG1/rm9CP7+jPmj0nMNAuNi/yiHnLX8k= -sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk= -sigs.k8s.io/controller-tools v0.19.0/go.mod h1:y5HY/iNDFkmFla2CfQoVb2AQXMsBk4ad84iR1PLANB0= +sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE= +sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951 h1:pjOeiLsYwEPaSRYTiMtVfdn7gSoRilw7Peyjw6kyUu4= -sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951/go.mod h1:5mP60UakkCye+eOcZ5p98VnV2O49qreW1gq9TdsUf7Q= -sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= -sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= -sigs.k8s.io/kustomize/cmd/config v0.20.1 h1:4APUORmZe2BYrsqgGfEKdd/r7gM6i43egLrUzilpiFo= -sigs.k8s.io/kustomize/cmd/config v0.20.1/go.mod h1:R7rQ8kxknVlXWVUIbxWtMgu8DCCNVtl8V0KrmeVd/KE= -sigs.k8s.io/kustomize/kustomize/v5 v5.7.1 h1:sYJsarwy/SDJfjjLMUqwFDGPwzUtMOQ1i1Ed49+XSbw= -sigs.k8s.io/kustomize/kustomize/v5 v5.7.1/go.mod h1:+5/SrBcJ4agx1SJknGuR/c9thwRSKLxnKoI5BzXFaLU= -sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= -sigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/go.work b/go.work new file mode 100644 index 000000000..91e2c2b56 --- /dev/null +++ b/go.work @@ -0,0 +1,7 @@ +go 1.25.3 + +use ( + . + ./test + ./tools +) diff --git a/go.work.sum b/go.work.sum new file mode 100644 index 000000000..dc76f2147 --- /dev/null +++ b/go.work.sum @@ -0,0 +1,192 @@ +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= +cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/charmbracelet/colorprofile v0.3.1 h1:k8dTHMd7fgw4bnFd7jXTLZrSU/CQrKnL3m+AxCzDz40= +github.com/charmbracelet/colorprofile v0.3.1/go.mod h1:/GkGusxNs8VB/RSOh3fu0TJmQ4ICMMPApIIVn0KszZ0= +github.com/charmbracelet/x/ansi v0.9.2 h1:92AGsQmNTRMzuzHEYfCdjQeUzTrgE1vfO5/7fEVoXdY= +github.com/charmbracelet/x/ansi v0.9.2/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= +github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k= +github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/go-jose/go-jose/v4 v4.1.1/go.mod h1:BdsZGqgdO3b6tTc6LSE56wcDbMMLuPsw5d4ZD5f94kA= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= +github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= +github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/ginkgo/v2 v2.25.1/go.mod h1:ppTWQ1dh9KM/F1XgpeRqelR+zHVwV81DGRSDnFxK7Sk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +go.etcd.io/bbolt v1.4.2/go.mod h1:Is8rSHO/b4f3XigBC0lL0+4FwAQv3HXEEIgFMuKHceM= +go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk= +go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI= +go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo= +go.etcd.io/etcd/pkg/v3 v3.6.4/go.mod h1:kKcYWP8gHuBRcteyv6MXWSN0+bVMnfgqiHueIZnKMtE= +go.etcd.io/etcd/server/v3 v3.6.4/go.mod h1:aYCL/h43yiONOv0QIR82kH/2xZ7m+IWYjzRmyQfnCAg= +go.etcd.io/raft/v3 v3.6.0/go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c/go.mod h1:ea2MjsO70ssTfCjiwHgI0ZFqcw45Ksuk2ckf9G468GA= +google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250826171959-ef028d996bc1/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og= +google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= +k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8= +k8s.io/code-generator v0.34.1 h1:WpphT26E+j7tEgIUfFr5WfbJrktCGzB3JoJH9149xYc= +k8s.io/code-generator v0.34.1/go.mod h1:DeWjekbDnJWRwpw3s0Jat87c+e0TgkxoR4ar608yqvg= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/klog v0.2.0 h1:0ElL0OHzF3N+OhoJTL0uca20SxtYt4X4+bzHeqrB83c= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.34.1/go.mod h1:s1CFkLG7w9eaTYvctOxosx88fl4spqmixnNpys0JAtM= +k8s.io/kms v0.34.3/go.mod h1:s1CFkLG7w9eaTYvctOxosx88fl4spqmixnNpys0JAtM= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.2.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/test/go.mod b/test/go.mod new file mode 100644 index 000000000..9909bcd5d --- /dev/null +++ b/test/go.mod @@ -0,0 +1,96 @@ +module github.com/openshift/external-secrets-operator/test + +go 1.25.3 + +require ( + github.com/aws/aws-sdk-go v1.55.8 + github.com/cert-manager/cert-manager v1.18.2 + github.com/ghodss/yaml v1.0.0 + github.com/onsi/ginkgo/v2 v2.27.2 + github.com/onsi/gomega v1.38.2 + github.com/openshift/external-secrets-operator v0.0.0-00010101000000-000000000000 + github.com/stretchr/testify v1.11.1 + github.com/vmware-archive/yaml-patch v0.0.11 + k8s.io/api v0.34.3 + k8s.io/apiextensions-apiserver v0.34.3 + k8s.io/apimachinery v0.34.3 + k8s.io/client-go v0.34.3 + sigs.k8s.io/controller-runtime v0.22.5 +) + +require ( + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/zapr v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.22.0 // indirect + github.com/go-openapi/jsonreference v0.21.1 // indirect + github.com/go-openapi/swag v0.24.1 // indirect + github.com/go-openapi/swag/cmdutils v0.24.0 // indirect + github.com/go-openapi/swag/conv v0.24.0 // indirect + github.com/go-openapi/swag/fileutils v0.24.0 // indirect + github.com/go-openapi/swag/jsonname v0.24.0 // indirect + github.com/go-openapi/swag/jsonutils v0.24.0 // indirect + github.com/go-openapi/swag/loading v0.24.0 // indirect + github.com/go-openapi/swag/mangling v0.24.0 // indirect + github.com/go-openapi/swag/netutils v0.24.0 // indirect + github.com/go-openapi/swag/stringutils v0.24.0 // indirect + github.com/go-openapi/swag/typeutils v0.24.0 // indirect + github.com/go-openapi/swag/yamlutils v0.24.0 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/pprof v0.0.0-20250903194437-c28834ac2320 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/krishicks/yaml-patch v0.0.10 // indirect + github.com/mailru/easyjson v0.9.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.17.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/mod v0.30.0 // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/oauth2 v0.31.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/term v0.37.0 // indirect + golang.org/x/text v0.31.0 // indirect + golang.org/x/time v0.13.0 // indirect + golang.org/x/tools v0.39.0 // indirect + google.golang.org/protobuf v1.36.9 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect + sigs.k8s.io/gateway-api v1.1.0 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect +) + +replace github.com/openshift/external-secrets-operator => .. diff --git a/test/go.sum b/test/go.sum new file mode 100644 index 000000000..42bbf8691 --- /dev/null +++ b/test/go.sum @@ -0,0 +1,289 @@ +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +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/cert-manager/cert-manager v1.18.2 h1:H2P75ycGcTMauV3gvpkDqLdS3RSXonWF2S49QGA1PZE= +github.com/cert-manager/cert-manager v1.18.2/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw= +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/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= +github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= +github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= +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/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.22.0 h1:TmMhghgNef9YXxTu1tOopo+0BGEytxA+okbry0HjZsM= +github.com/go-openapi/jsonpointer v0.22.0/go.mod h1:xt3jV88UtExdIkkL7NloURjRQjbeUgcxFblMjq2iaiU= +github.com/go-openapi/jsonreference v0.21.1 h1:bSKrcl8819zKiOgxkbVNRUBIr6Wwj9KYrDbMjRs0cDA= +github.com/go-openapi/jsonreference v0.21.1/go.mod h1:PWs8rO4xxTUqKGu+lEvvCxD5k2X7QYkKAepJyCmSTT8= +github.com/go-openapi/swag v0.24.1 h1:DPdYTZKo6AQCRqzwr/kGkxJzHhpKxZ9i/oX0zag+MF8= +github.com/go-openapi/swag v0.24.1/go.mod h1:sm8I3lCPlspsBBwUm1t5oZeWZS0s7m/A+Psg0ooRU0A= +github.com/go-openapi/swag/cmdutils v0.24.0 h1:KlRCffHwXFI6E5MV9n8o8zBRElpY4uK4yWyAMWETo9I= +github.com/go-openapi/swag/cmdutils v0.24.0/go.mod h1:uxib2FAeQMByyHomTlsP8h1TtPd54Msu2ZDU/H5Vuf8= +github.com/go-openapi/swag/conv v0.24.0 h1:ejB9+7yogkWly6pnruRX45D1/6J+ZxRu92YFivx54ik= +github.com/go-openapi/swag/conv v0.24.0/go.mod h1:jbn140mZd7EW2g8a8Y5bwm8/Wy1slLySQQ0ND6DPc2c= +github.com/go-openapi/swag/fileutils v0.24.0 h1:U9pCpqp4RUytnD689Ek/N1d2N/a//XCeqoH508H5oak= +github.com/go-openapi/swag/fileutils v0.24.0/go.mod h1:3SCrCSBHyP1/N+3oErQ1gP+OX1GV2QYFSnrTbzwli90= +github.com/go-openapi/swag/jsonname v0.24.0 h1:2wKS9bgRV/xB8c62Qg16w4AUiIrqqiniJFtZGi3dg5k= +github.com/go-openapi/swag/jsonname v0.24.0/go.mod h1:GXqrPzGJe611P7LG4QB9JKPtUZ7flE4DOVechNaDd7Q= +github.com/go-openapi/swag/jsonutils v0.24.0 h1:F1vE1q4pg1xtO3HTyJYRmEuJ4jmIp2iZ30bzW5XgZts= +github.com/go-openapi/swag/jsonutils v0.24.0/go.mod h1:vBowZtF5Z4DDApIoxcIVfR8v0l9oq5PpYRUuteVu6f0= +github.com/go-openapi/swag/loading v0.24.0 h1:ln/fWTwJp2Zkj5DdaX4JPiddFC5CHQpvaBKycOlceYc= +github.com/go-openapi/swag/loading v0.24.0/go.mod h1:gShCN4woKZYIxPxbfbyHgjXAhO61m88tmjy0lp/LkJk= +github.com/go-openapi/swag/mangling v0.24.0 h1:PGOQpViCOUroIeak/Uj/sjGAq9LADS3mOyjznmHy2pk= +github.com/go-openapi/swag/mangling v0.24.0/go.mod h1:Jm5Go9LHkycsz0wfoaBDkdc4CkpuSnIEf62brzyCbhc= +github.com/go-openapi/swag/netutils v0.24.0 h1:Bz02HRjYv8046Ycg/w80q3g9QCWeIqTvlyOjQPDjD8w= +github.com/go-openapi/swag/netutils v0.24.0/go.mod h1:WRgiHcYTnx+IqfMCtu0hy9oOaPR0HnPbmArSRN1SkZM= +github.com/go-openapi/swag/stringutils v0.24.0 h1:i4Z/Jawf9EvXOLUbT97O0HbPUja18VdBxeadyAqS1FM= +github.com/go-openapi/swag/stringutils v0.24.0/go.mod h1:5nUXB4xA0kw2df5PRipZDslPJgJut+NjL7D25zPZ/4w= +github.com/go-openapi/swag/typeutils v0.24.0 h1:d3szEGzGDf4L2y1gYOSSLeK6h46F+zibnEas2Jm/wIw= +github.com/go-openapi/swag/typeutils v0.24.0/go.mod h1:q8C3Kmk/vh2VhpCLaoR2MVWOGP8y7Jc8l82qCTd1DYI= +github.com/go-openapi/swag/yamlutils v0.24.0 h1:bhw4894A7Iw6ne+639hsBNRHg9iZg/ISrOVr+sJGp4c= +github.com/go-openapi/swag/yamlutils v0.24.0/go.mod h1:DpKv5aYuaGm/sULePoeiG8uwMpZSfReo1HR3Ik0yaG8= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +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= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20250903194437-c28834ac2320 h1:c7ayAhbRP9HnEl/hg/WQOM9s0snWztfW6feWXZbGHw0= +github.com/google/pprof v0.0.0-20250903194437-c28834ac2320/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW34dhU4az1GN0pTPADwNmvoRSeoZ6PItiqnY= +github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/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/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/krishicks/yaml-patch v0.0.10 h1:H4FcHpnNwVmw8u0MjPRjWyIXtco6zM2F78t+57oNM3E= +github.com/krishicks/yaml-patch v0.0.10/go.mod h1:Sm5TchwZS6sm7RJoyg87tzxm2ZcKzdRE4Q7TjNhPrME= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +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.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= +github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= +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/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +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/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/vmware-archive/yaml-patch v0.0.11 h1:9o4FGgkpLD88A5O7BOOXs7UBeeymRT9atLsKmHJ2wWs= +github.com/vmware-archive/yaml-patch v0.0.11/go.mod h1:mHWEn1O1CU3yBnN6iPFeAwAqzUibF2X+9EltQ28w+Vs= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= +golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20190911185100-cd5d95a43a6e/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.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +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= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI= +golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= +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= +gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= +gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +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= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= +google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.34.3 h1:D12sTP257/jSH2vHV2EDYrb16bS7ULlHpdNdNhEw2S4= +k8s.io/api v0.34.3/go.mod h1:PyVQBF886Q5RSQZOim7DybQjAbVs8g7gwJNhGtY5MBk= +k8s.io/apiextensions-apiserver v0.34.3 h1:p10fGlkDY09eWKOTeUSioxwLukJnm+KuDZdrW71y40g= +k8s.io/apiextensions-apiserver v0.34.3/go.mod h1:aujxvqGFRdb/cmXYfcRTeppN7S2XV/t7WMEc64zB5A0= +k8s.io/apimachinery v0.34.3 h1:/TB+SFEiQvN9HPldtlWOTp0hWbJ+fjU+wkxysf/aQnE= +k8s.io/apimachinery v0.34.3/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.3 h1:wtYtpzy/OPNYf7WyNBTj3iUA0XaBHVqhv4Iv3tbrF5A= +k8s.io/client-go v0.34.3/go.mod h1:OxxeYagaP9Kdf78UrKLa3YZixMCfP6bgPwPwNBQBzpM= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE= +sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI= +sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= +sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/test/utils/external_secrets.go b/test/utils/external_secrets.go index 0613063be..bdaa66962 100644 --- a/test/utils/external_secrets.go +++ b/test/utils/external_secrets.go @@ -98,6 +98,8 @@ func GetProjectDir() (string, error) { if err != nil { return wd, err } + // Handle both old path (test/e2e) and new path (test) structures wd = strings.Replace(wd, "/test/e2e", "", -1) + wd = strings.Replace(wd, "/test", "", -1) return wd, nil } diff --git a/tools/go.mod b/tools/go.mod new file mode 100644 index 000000000..fe00b6275 --- /dev/null +++ b/tools/go.mod @@ -0,0 +1,285 @@ +module github.com/openshift/external-secrets-operator/tools + +go 1.25.3 + +require ( + github.com/elastic/crd-ref-docs v0.1.0 + github.com/go-bindata/go-bindata v3.1.2+incompatible + github.com/golangci/golangci-lint/v2 v2.8.0 + github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0 + github.com/onsi/ginkgo/v2 v2.27.2 + github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d + golang.org/x/vuln v1.1.4 + sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86 + sigs.k8s.io/controller-tools v0.19.0 + sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951 + sigs.k8s.io/kustomize/kustomize/v5 v5.7.1 +) + +require ( + 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect + 4d63.com/gochecknoglobals v0.2.2 // indirect + codeberg.org/chavacava/garif v0.2.0 // indirect + codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect + dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect + dev.gaijin.team/go/golib v0.6.0 // indirect + github.com/4meepo/tagalign v1.4.3 // indirect + github.com/Abirdcfly/dupword v0.1.7 // indirect + github.com/AdminBenni/iota-mixing v1.0.0 // indirect + github.com/AlwxSin/noinlineerr v1.0.5 // indirect + github.com/Antonboom/errname v1.1.1 // indirect + github.com/Antonboom/nilnil v1.1.1 // indirect + github.com/Antonboom/testifylint v1.6.4 // indirect + github.com/BurntSushi/toml v1.6.0 // indirect + github.com/Djarvur/go-err113 v0.1.1 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/MirrexOne/unqueryvet v1.4.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect + github.com/alecthomas/chroma/v2 v2.21.1 // indirect + github.com/alecthomas/go-check-sumtype v0.3.1 // indirect + github.com/alexkohler/nakedret/v2 v2.0.6 // indirect + github.com/alexkohler/prealloc v1.0.1 // indirect + github.com/alfatraining/structtag v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/alingse/nilnesserr v0.2.0 // indirect + github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect + github.com/ashanbrown/makezero/v2 v2.1.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v4 v4.7.0 // indirect + github.com/bombsimon/wsl/v5 v5.3.0 // indirect + github.com/breml/bidichk v0.3.3 // indirect + github.com/breml/errchkjson v0.4.1 // indirect + github.com/butuzov/ireturn v0.4.0 // indirect + github.com/butuzov/mirror v1.3.0 // indirect + github.com/catenacyber/perfsprint v0.10.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/charithe/durationcheck v0.0.11 // indirect + github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect + github.com/charmbracelet/lipgloss v1.1.0 // indirect + github.com/charmbracelet/x/ansi v0.8.0 // indirect + github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect + github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/ckaznocha/intrange v0.3.1 // indirect + github.com/curioswitch/go-reassign v0.3.0 // indirect + github.com/daixiang0/gci v0.13.7 // indirect + github.com/dave/dst v0.27.3 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/firefart/nonamedreturns v1.0.6 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/ghostiam/protogetter v0.3.18 // indirect + github.com/go-critic/go-critic v0.14.3 // indirect + github.com/go-errors/errors v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/zapr v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect + github.com/gobuffalo/flect v1.0.3 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/goccy/go-yaml v1.18.0 // indirect + github.com/godoc-lint/godoc-lint v0.11.1 // indirect + github.com/gofrs/flock v0.13.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golangci/asciicheck v0.5.0 // indirect + github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect + github.com/golangci/go-printf-func-name v0.1.1 // indirect + github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect + github.com/golangci/golines v0.14.0 // indirect + github.com/golangci/misspell v0.7.0 // indirect + github.com/golangci/plugin-module-register v0.1.2 // indirect + github.com/golangci/revgrep v0.8.0 // indirect + github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect + github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gordonklaus/ineffassign v0.2.0 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.5.0 // indirect + github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect + github.com/gostaticanalysis/nilerr v0.1.2 // indirect + github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect + github.com/hashicorp/go-version v1.8.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/huandu/xstrings v1.3.3 // indirect + github.com/imdario/mergo v0.3.11 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jgautheron/goconst v1.8.2 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jjti/go-spancheck v0.6.5 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/julz/importas v0.2.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect + github.com/kisielk/errcheck v1.9.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.6 // indirect + github.com/kulti/thelper v0.7.1 // indirect + github.com/kunwardeep/paralleltest v1.0.15 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/ldez/exptostd v0.4.5 // indirect + github.com/ldez/gomoddirectives v0.8.0 // indirect + github.com/ldez/grignotin v0.10.1 // indirect + github.com/ldez/structtags v0.6.1 // indirect + github.com/ldez/tagliatelle v0.7.2 // indirect + github.com/ldez/usetesting v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/macabu/inamedparam v0.2.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect + github.com/manuelarte/funcorder v0.5.0 // indirect + github.com/maratori/testableexamples v1.0.1 // indirect + github.com/maratori/testpackage v1.1.2 // indirect + github.com/matoous/godox v1.1.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mgechev/revive v1.13.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect + github.com/moricho/tparallel v0.3.2 // indirect + github.com/muesli/termenv v0.16.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.21.2 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/quasilyte/go-ruleguard v0.4.5 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/raeperd/recvcheck v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/ryancurrah/gomodguard v1.4.1 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect + github.com/securego/gosec/v2 v2.22.11 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sonatard/noctx v0.4.0 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/tetafro/godot v1.5.4 // indirect + github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect + github.com/timonwong/loggercheck v0.11.0 // indirect + github.com/tomarrell/wrapcheck/v2 v2.12.0 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/ultraware/funlen v0.2.0 // indirect + github.com/ultraware/whitespace v0.2.0 // indirect + github.com/uudashr/gocognit v1.2.0 // indirect + github.com/uudashr/iface v1.4.1 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/xen0n/gosmopolitan v1.3.0 // indirect + github.com/xlab/treeprint v1.2.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect + go-simpler.org/musttag v0.14.0 // indirect + go-simpler.org/sloglint v0.11.1 // indirect + go.augendre.info/arangolint v0.3.1 // indirect + go.augendre.info/fatcontext v0.9.0 // indirect + go.opentelemetry.io/otel/sdk v1.37.0 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect + golang.org/x/mod v0.31.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/tools v0.40.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.6.1 // indirect + k8s.io/api v0.34.3 // indirect + k8s.io/apiextensions-apiserver v0.34.3 // indirect + k8s.io/apimachinery v0.34.3 // indirect + k8s.io/code-generator v0.34.3 // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect + mvdan.cc/gofumpt v0.9.2 // indirect + mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/kustomize/api v0.20.1 // indirect + sigs.k8s.io/kustomize/cmd/config v0.20.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect +) + +// Exclude old monolithic genproto to avoid ambiguous imports with modular versions +exclude google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd diff --git a/tools/go.sum b/tools/go.sum new file mode 100644 index 000000000..14b317161 --- /dev/null +++ b/tools/go.sum @@ -0,0 +1,820 @@ +4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A= +4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= +4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= +4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY= +codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ= +codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI= +codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= +dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo= +dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= +github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8= +github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= +github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ= +github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= +github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo= +github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= +github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= +github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= +github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= +github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= +github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= +github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= +github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= +github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= +github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/MirrexOne/unqueryvet v1.4.0 h1:6KAkqqW2KUnkl9Z0VuTphC3IXRPoFqEkJEtyxxHj5eQ= +github.com/MirrexOne/unqueryvet v1.4.0/go.mod h1:IWwCwMQlSWjAIteW0t+28Q5vouyktfujzYznSIWiuOg= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/chroma/v2 v2.21.1 h1:FaSDrp6N+3pphkNKU6HPCiYLgm8dbe5UXIXcoBhZSWA= +github.com/alecthomas/chroma/v2 v2.21.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= +github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= +github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= +github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= +github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ= +github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q= +github.com/alexkohler/prealloc v1.0.1 h1:A9P1haqowqUxWvU9nk6tQ7YktXIHf+LQM9wPRhuteEE= +github.com/alexkohler/prealloc v1.0.1/go.mod h1:fT39Jge3bQrfA7nPMDngUfvUbQGQeJyGQnR+913SCig= +github.com/alfatraining/structtag v1.0.0 h1:2qmcUqNcCoyVJ0up879K614L9PazjBSFruTB0GOFjCc= +github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w= +github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/ashanbrown/forbidigo/v2 v2.3.0 h1:OZZDOchCgsX5gvToVtEBoV2UWbFfI6RKQTir2UZzSxo= +github.com/ashanbrown/forbidigo/v2 v2.3.0/go.mod h1:5p6VmsG5/1xx3E785W9fouMxIOkvY2rRV9nMdWadd6c= +github.com/ashanbrown/makezero/v2 v2.1.0 h1:snuKYMbqosNokUKm+R6/+vOPs8yVAi46La7Ck6QYSaE= +github.com/ashanbrown/makezero/v2 v2.1.0/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +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/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= +github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= +github.com/bombsimon/wsl/v5 v5.3.0 h1:nZWREJFL6U3vgW/B1lfDOigl+tEF6qgs6dGGbFeR0UM= +github.com/bombsimon/wsl/v5 v5.3.0/go.mod h1:Gp8lD04z27wm3FANIUPZycXp+8huVsn0oxc+n4qfV9I= +github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= +github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= +github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= +github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= +github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E= +github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70= +github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= +github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= +github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= +github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= +github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= +github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +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/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1DidBcABctk= +github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= +github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= +github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= +github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= +github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= +github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs= +github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= +github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= +github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ= +github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= +github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= +github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= +github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= +github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/elastic/crd-ref-docs v0.1.0 h1:Cr5kz89QB3Iuuj7dhAfLMApCrChEGAaIBTxGk/xuRKw= +github.com/elastic/crd-ref-docs v0.1.0/go.mod h1:X83mMBdJt05heJUYiS3T0yJ/JkCuliuhSUNav5Gjo/U= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= +github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghostiam/protogetter v0.3.18 h1:yEpghRGtP9PjKvVXtEzGpYfQj1Wl/ZehAfU6fr62Lfo= +github.com/ghostiam/protogetter v0.3.18/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= +github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= +github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= +github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= +github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog= +github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +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-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +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.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +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-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +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/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= +github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4= +github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/godoc-lint/godoc-lint v0.11.1 h1:z9as8Qjiy6miRIa3VRymTa+Gt2RLnGICVikcvlUVOaA= +github.com/godoc-lint/godoc-lint v0.11.1/go.mod h1:BAqayheFSuZrEAqCRxgw9MyvsM+S/hZwJbU1s/ejRj8= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4nUfo0= +github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= +github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= +github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= +github.com/golangci/golangci-lint/v2 v2.8.0 h1:wJnr3hJWY3eVzOUcfwbDc2qbi2RDEpvLmQeNFaPSNYA= +github.com/golangci/golangci-lint/v2 v2.8.0/go.mod h1:xl+HafQ9xoP8rzw0z5AwnO5kynxtb80e8u02Ej/47RI= +github.com/golangci/golines v0.14.0 h1:xt9d3RKBjhasA3qpoXs99J2xN2t6eBlpLHt0TrgyyXc= +github.com/golangci/golines v0.14.0/go.mod h1:gf555vPG2Ia7mmy2mzmhVQbVjuK8Orw0maR1G4vVAAQ= +github.com/golangci/misspell v0.7.0 h1:4GOHr/T1lTW0hhR4tgaaV1WS/lJ+ncvYCoFKmqJsj0c= +github.com/golangci/misspell v0.7.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg= +github.com/golangci/plugin-module-register v0.1.2 h1:e5WM6PO6NIAEcij3B053CohVp3HIYbzSuP53UAYgOpg= +github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw= +github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s= +github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e h1:ai0EfmVYE2bRA5htgAG9r7s3tHsfjIhN98WshBTJ9jM= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786 h1:rcv+Ippz6RAtvaGgKxc+8FQIpxHgsF+HBzPyYL2cyVU= +github.com/google/go-cmdtest v0.4.1-0.20220921163831-55ab3332a786/go.mod h1:apVn/GCasLZUVpAJ6oWAuyP7Ne7CEsQbTnc0plM3m+o= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/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.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY= +github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +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/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= +github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8= +github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= +github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk= +github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= +github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU= +github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= +github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= +github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= +github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= +github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= +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/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= +github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= +github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0= +github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.9.0 h1:9xt1zI9EBfcYBvdU1nVrzMzzUPUtPKs9bVSIM3TAb3M= +github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= +github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= +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.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +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/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= +github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= +github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w= +github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= +github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ= +github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= +github.com/ldez/gomoddirectives v0.8.0 h1:JqIuTtgvFC2RdH1s357vrE23WJF2cpDCPFgA/TWDGpk= +github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q= +github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= +github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= +github.com/ldez/structtags v0.6.1 h1:bUooFLbXx41tW8SvkfwfFkkjPYvFFs59AAMgVg6DUBk= +github.com/ldez/structtags v0.6.1/go.mod h1:YDxVSgDy/MON6ariaxLF2X09bh19qL7MtGBN5MrvbdY= +github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk= +github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= +github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc= +github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE= +github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= +github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8= +github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA= +github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8= +github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ= +github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs= +github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= +github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= +github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0 h1:aOeI7xAOVdK+R6xbVsZuU9HmCZYmQVmZgPf9xJUd2Sg= +github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0/go.mod h1:0hZWbtfeCYUQeAQdPLUzETiBhUSns7O6LDj9vH88xKA= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= +github.com/mgechev/revive v1.13.0 h1:yFbEVliCVKRXY8UgwEO7EOYNopvjb1BFbmYqm9hZjBM= +github.com/mgechev/revive v1.13.0/go.mod h1:efJfeBVCX2JUumNQ7dtOLDja+QKj9mYGgEZA7rt5u+0= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= +github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= +github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= +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/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.21.2 h1:khzWfm2/Br8ZemX8QM1pl72LwM+rMeW6VUbQ4rzh0Po= +github.com/nunnatsa/ginkgolinter v0.21.2/go.mod h1:GItSI5fw7mCGLPmkvGYrr1kEetZe7B593jcyOpyabsY= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d h1:iwdrJUzp+GsbCNL84aZtSYwKSjrtxUJJ0cnVH8OsIeU= +github.com/openshift/build-machinery-go v0.0.0-20250806130835-622c0378eb0d/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/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.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +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/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA= +github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= +github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY= +github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= +github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +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/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g= +github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= +github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= +github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= +github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= +github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= +github.com/securego/gosec/v2 v2.22.11 h1:tW+weM/hCM/GX3iaCV91d5I6hqaRT2TPsFM1+USPXwg= +github.com/securego/gosec/v2 v2.22.11/go.mod h1:KE4MW/eH0GLWztkbt4/7XpyH0zJBBnu7sYB4l6Wn7Mw= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sonatard/noctx v0.4.0 h1:7MC/5Gg4SQ4lhLYR6mvOP6mQVSxCrdyiExo7atBs27o= +github.com/sonatard/noctx v0.4.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g= +github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +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= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= +github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= +github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M= +github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= +github.com/tomarrell/wrapcheck/v2 v2.12.0 h1:H/qQ1aNWz/eeIhxKAFvkfIA+N7YDvq6TWVFL27Of9is= +github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= +github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= +github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= +github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= +github.com/uudashr/gocognit v1.2.0 h1:3BU9aMr1xbhPlvJLSydKwdLN3tEUUrzPSSM8S4hDYRA= +github.com/uudashr/gocognit v1.2.0/go.mod h1:k/DdKPI6XBZO1q7HgoV2juESI2/Ofj9AcHPZhBBdrTU= +github.com/uudashr/iface v1.4.1 h1:J16Xl1wyNX9ofhpHmQ9h9gk5rnv2A6lX/2+APLTo0zU= +github.com/uudashr/iface v1.4.1/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM= +github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= +go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= +go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= +go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ= +go.augendre.info/arangolint v0.3.1 h1:n2E6p8f+zfXSFLa2e2WqFPp4bfvcuRdd50y6cT65pSo= +go.augendre.info/arangolint v0.3.1/go.mod h1:6ZKzEzIZuBQwoSvlKT+qpUfIbBfFCE5gbAoTg0/117g= +go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE= +go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +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.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +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= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 h1:HDjDiATsGqvuqvkDvgJjD1IgPrVekcSXVVE21JwvzGE= +golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc h1:bH6xUXay0AIFMElXG2rQ4uiE+7ncwtiOdPfYK1NK2XA= +golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= +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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +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= +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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= +golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= +golang.org/x/vuln v1.1.4 h1:Ju8QsuyhX3Hk8ma3CesTbO8vfJD9EvUBgHvkxHBzj0I= +golang.org/x/vuln v1.1.4/go.mod h1:F+45wmU18ym/ca5PLTPLsSzr2KppzswxPP603ldA67s= +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= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= +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.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= +honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= +k8s.io/api v0.34.3 h1:D12sTP257/jSH2vHV2EDYrb16bS7ULlHpdNdNhEw2S4= +k8s.io/api v0.34.3/go.mod h1:PyVQBF886Q5RSQZOim7DybQjAbVs8g7gwJNhGtY5MBk= +k8s.io/apiextensions-apiserver v0.34.3 h1:p10fGlkDY09eWKOTeUSioxwLukJnm+KuDZdrW71y40g= +k8s.io/apiextensions-apiserver v0.34.3/go.mod h1:aujxvqGFRdb/cmXYfcRTeppN7S2XV/t7WMEc64zB5A0= +k8s.io/apimachinery v0.34.3 h1:/TB+SFEiQvN9HPldtlWOTp0hWbJ+fjU+wkxysf/aQnE= +k8s.io/apimachinery v0.34.3/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.3 h1:uGH1qpDvSiYG4HVFqc6A3L4CKiX+aBWDrrsxHYK0Bdo= +k8s.io/apiserver v0.34.3/go.mod h1:QPnnahMO5C2m3lm6fPW3+JmyQbvHZQ8uudAu/493P2w= +k8s.io/client-go v0.34.3 h1:wtYtpzy/OPNYf7WyNBTj3iUA0XaBHVqhv4Iv3tbrF5A= +k8s.io/client-go v0.34.3/go.mod h1:OxxeYagaP9Kdf78UrKLa3YZixMCfP6bgPwPwNBQBzpM= +k8s.io/code-generator v0.34.3 h1:6ipJKsJZZ9q21BO8I2jEj4OLN3y8/1n4aihKN0xKmQk= +k8s.io/code-generator v0.34.3/go.mod h1:oW73UPYpGLsbRN8Ozkhd6ZzkF8hzFCiYmvEuWZDroI4= +k8s.io/component-base v0.34.3 h1:zsEgw6ELqK0XncCQomgO9DpUIzlrYuZYA0Cgo+JWpVk= +k8s.io/component-base v0.34.3/go.mod h1:5iIlD8wPfWE/xSHTRfbjuvUul2WZbI2nOUK65XL0E/c= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4= +mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86 h1:96TA+X7D58V3065duUfj+p+Pp17q8U02+cSCmE3IsaU= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86/go.mod h1:IaDsO8xSPRxRG1/rm9CP7+jPmj0nMNAuNi/yiHnLX8k= +sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk= +sigs.k8s.io/controller-tools v0.19.0/go.mod h1:y5HY/iNDFkmFla2CfQoVb2AQXMsBk4ad84iR1PLANB0= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951 h1:pjOeiLsYwEPaSRYTiMtVfdn7gSoRilw7Peyjw6kyUu4= +sigs.k8s.io/kube-api-linter v0.0.0-20251208100930-d3015c953951/go.mod h1:5mP60UakkCye+eOcZ5p98VnV2O49qreW1gq9TdsUf7Q= +sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= +sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= +sigs.k8s.io/kustomize/cmd/config v0.20.1 h1:4APUORmZe2BYrsqgGfEKdd/r7gM6i43egLrUzilpiFo= +sigs.k8s.io/kustomize/cmd/config v0.20.1/go.mod h1:R7rQ8kxknVlXWVUIbxWtMgu8DCCNVtl8V0KrmeVd/KE= +sigs.k8s.io/kustomize/kustomize/v5 v5.7.1 h1:sYJsarwy/SDJfjjLMUqwFDGPwzUtMOQ1i1Ed49+XSbw= +sigs.k8s.io/kustomize/kustomize/v5 v5.7.1/go.mod h1:+5/SrBcJ4agx1SJknGuR/c9thwRSKLxnKoI5BzXFaLU= +sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= +sigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/vendor/github.com/polyfloyd/go-errorlint/LICENSE b/vendor/codeberg.org/polyfloyd/go-errorlint/LICENSE similarity index 100% rename from vendor/github.com/polyfloyd/go-errorlint/LICENSE rename to vendor/codeberg.org/polyfloyd/go-errorlint/LICENSE diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/allowed.go similarity index 100% rename from vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go rename to vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/allowed.go diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/analysis.go b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/analysis.go similarity index 100% rename from vendor/github.com/polyfloyd/go-errorlint/errorlint/analysis.go rename to vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/analysis.go diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/lint.go similarity index 87% rename from vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go rename to vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/lint.go index 9ef6d585a..b7d3cbd5f 100644 --- a/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go +++ b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/lint.go @@ -269,86 +269,88 @@ func LintErrorComparisons(info *TypesInfoExt) []analysis.Diagnostic { continue } - if switchComparesNonNil(switchStmt) { - diagnostic := analysis.Diagnostic{ - Message: "switch on an error will fail on wrapped errors. Use errors.Is to check for specific errors", - Pos: problematicCaseClause.Pos(), - } + if !switchComparesNonNil(switchStmt) { + continue + } - // Create a simpler version of the fix for switch statements - // We'll transform: switch err { case ErrX: ... } - // To: switch { case errors.Is(err, ErrX): ... } + diagnostic := analysis.Diagnostic{ + Message: "switch on an error will fail on wrapped errors. Use errors.Is to check for specific errors", + Pos: problematicCaseClause.Pos(), + } - // Create a new switch statement with an empty tag - newSwitchStmt := &ast.SwitchStmt{ - Init: switchStmt.Init, - Tag: nil, // Empty tag for the switch. - Body: &ast.BlockStmt{ - List: make([]ast.Stmt, len(switchStmt.Body.List)), - }, - } + // Create a simpler version of the fix for switch statements + // We'll transform: switch err { case ErrX: ... } + // To: switch { case errors.Is(err, ErrX): ... } - // Convert each case to use errors.Is. - switchTagExpr := switchStmt.Tag // The error variable being checked. - for i, stmt := range switchStmt.Body.List { - origCaseClause := stmt.(*ast.CaseClause) + // Create a new switch statement with an empty tag + newSwitchStmt := &ast.SwitchStmt{ + Init: switchStmt.Init, + Tag: nil, // Empty tag for the switch. + Body: &ast.BlockStmt{ + List: make([]ast.Stmt, len(switchStmt.Body.List)), + }, + } - // Create a new case clause. - newCaseClause := &ast.CaseClause{ - Body: origCaseClause.Body, - } + // Convert each case to use errors.Is. + switchTagExpr := switchStmt.Tag // The error variable being checked. + for i, stmt := range switchStmt.Body.List { + origCaseClause := stmt.(*ast.CaseClause) - // If this is a default case (no expressions), keep it as-is. - if len(origCaseClause.List) == 0 { - newCaseClause.List = nil // Default case. - newSwitchStmt.Body.List[i] = newCaseClause - continue - } + // Create a new case clause. + newCaseClause := &ast.CaseClause{ + Body: origCaseClause.Body, + } - newCaseClause.List = make([]ast.Expr, 0, len(origCaseClause.List)) - - // Convert each case expression. - for _, caseExpr := range origCaseClause.List { - if isNil(caseExpr) { - // Keep nil checks as is: case err == nil: - newCaseClause.List = append(newCaseClause.List, - &ast.BinaryExpr{ - X: switchTagExpr, - Op: token.EQL, - Y: caseExpr, - }) - continue - } - // Replace err == ErrX with errors.Is(err, ErrX). + // If this is a default case (no expressions), keep it as-is. + if len(origCaseClause.List) == 0 { + newCaseClause.List = nil // Default case. + newSwitchStmt.Body.List[i] = newCaseClause + continue + } + + newCaseClause.List = make([]ast.Expr, 0, len(origCaseClause.List)) + + // Convert each case expression. + for _, caseExpr := range origCaseClause.List { + if isNil(caseExpr) { + // Keep nil checks as is: case err == nil: newCaseClause.List = append(newCaseClause.List, - &ast.CallExpr{ - Fun: &ast.SelectorExpr{ - X: ast.NewIdent("errors"), - Sel: ast.NewIdent("Is"), - }, - Args: []ast.Expr{switchTagExpr, caseExpr}, + &ast.BinaryExpr{ + X: switchTagExpr, + Op: token.EQL, + Y: caseExpr, }) + continue } - - newSwitchStmt.Body.List[i] = newCaseClause + // Replace err == ErrX with errors.Is(err, ErrX). + newCaseClause.List = append(newCaseClause.List, + &ast.CallExpr{ + Fun: &ast.SelectorExpr{ + X: ast.NewIdent("errors"), + Sel: ast.NewIdent("Is"), + }, + Args: []ast.Expr{switchTagExpr, caseExpr}, + }) } - // Print the modified AST to get the fix text. - var buf bytes.Buffer - printer.Fprint(&buf, token.NewFileSet(), newSwitchStmt) - fixText := buf.String() + newSwitchStmt.Body.List[i] = newCaseClause + } - diagnostic.SuggestedFixes = []analysis.SuggestedFix{{ - Message: "Convert to errors.Is() for error comparisons", - TextEdits: []analysis.TextEdit{{ - Pos: switchStmt.Pos(), - End: switchStmt.End(), - NewText: []byte(fixText), - }}, - }} + // Print the modified AST to get the fix text. + var buf bytes.Buffer + printer.Fprint(&buf, token.NewFileSet(), newSwitchStmt) + fixText := buf.String() - lints = append(lints, diagnostic) - } + diagnostic.SuggestedFixes = []analysis.SuggestedFix{{ + Message: "Convert to errors.Is() for error comparisons", + TextEdits: []analysis.TextEdit{{ + Pos: switchStmt.Pos(), + End: switchStmt.End(), + NewText: []byte(fixText), + }}, + }} + + lints = append(lints, diagnostic) } return lints @@ -646,6 +648,9 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis // Get the error variable being type-switched on errExpr := typeAssert.X + // a flag to know if we can fix the issue with a [analysis.SuggestedFix] + canFix := true + // Determine if this is a type switch with assignment (switch e := err.(type)) var assignIdent *ast.Ident var useShadowVar bool @@ -653,8 +658,18 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis // This is a type switch with assignment like: switch e := err.(type) if len(assignStmt.Lhs) == 1 { if id, ok := assignStmt.Lhs[0].(*ast.Ident); ok { - assignIdent = id - useShadowVar = true + if exprToString(errExpr) == id.Name { + // the switch with assignment is like switch err := err.(type) + // we cannot reuse err, otherwise it would lead to errors(err, &err) + canFix = false + + // TODO - suggest a fix with a new variable name instead? + // the issue is with the fact each branch should have a new variable name + } else { + // the variable names are different, we can reuse the assigned variable + assignIdent = id + useShadowVar = true + } } } } @@ -670,8 +685,8 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis for _, stmt := range typeSwitch.Body.List { caseClause := stmt.(*ast.CaseClause) for _, typeExpr := range caseClause.List { - // Skip default case (empty list) - if typeExpr != nil { + // Skip default case (empty list) and nil comparisons. + if typeExpr != nil && !isNil(typeExpr) { caseTypes = append(caseTypes, typeExpr) } } @@ -755,6 +770,16 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis newCaseClause.List = make([]ast.Expr, len(caseClause.List)) for j, typeExpr := range caseClause.List { + // Nil cases should become err == nil. + if isNil(typeExpr) { + newCaseClause.List[j] = &ast.BinaryExpr{ + X: errExpr, + Op: token.EQL, + Y: typeExpr, + } + continue + } + // Get the previously declared variable for this type. varName := typeToVar[typeExpr] @@ -802,20 +827,21 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis newSwitchStmt.Body.List[i] = newCaseClause } - // Print the resulting block to get the fix text. - var buf bytes.Buffer - printer.Fprint(&buf, token.NewFileSet(), blockStmt) - fixText := buf.String() - - diagnostic.SuggestedFixes = []analysis.SuggestedFix{{ - Message: "Convert type switch to use errors.As", - TextEdits: []analysis.TextEdit{{ - Pos: typeSwitch.Pos(), - End: typeSwitch.End(), - NewText: []byte(fixText), - }}, - }} + if canFix { + // Print the resulting block to get the fix text. + var buf bytes.Buffer + printer.Fprint(&buf, token.NewFileSet(), blockStmt) + fixText := buf.String() + diagnostic.SuggestedFixes = []analysis.SuggestedFix{{ + Message: "Convert type switch to use errors.As", + TextEdits: []analysis.TextEdit{{ + Pos: typeSwitch.Pos(), + End: typeSwitch.End(), + NewText: []byte(fixText), + }}, + }} + } lints = append(lints, diagnostic) } diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/options.go b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/options.go similarity index 56% rename from vendor/github.com/polyfloyd/go-errorlint/errorlint/options.go rename to vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/options.go index 4d7c742d8..64d4352f4 100644 --- a/vendor/github.com/polyfloyd/go-errorlint/errorlint/options.go +++ b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/options.go @@ -13,3 +13,15 @@ func WithAllowedWildcard(ap []AllowPair) Option { allowedWildcardAppend(ap) } } + +func WithComparison(enabled bool) Option { + return func() { + checkComparison = enabled + } +} + +func WithAsserts(enabled bool) Option { + return func() { + checkAsserts = enabled + } +} diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go b/vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/printf.go similarity index 100% rename from vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go rename to vendor/codeberg.org/polyfloyd/go-errorlint/errorlint/printf.go diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md index 235496eeb..1101d206d 100644 --- a/vendor/github.com/BurntSushi/toml/README.md +++ b/vendor/github.com/BurntSushi/toml/README.md @@ -1,7 +1,7 @@ TOML stands for Tom's Obvious, Minimal Language. This Go package provides a reflection interface similar to Go's standard library `json` and `xml` packages. -Compatible with TOML version [v1.0.0](https://toml.io/en/v1.0.0). +Compatible with TOML version [v1.1.0](https://toml.io/en/v1.1.0). Documentation: https://pkg.go.dev/github.com/BurntSushi/toml diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go index 3fa516caa..ed884840f 100644 --- a/vendor/github.com/BurntSushi/toml/decode.go +++ b/vendor/github.com/BurntSushi/toml/decode.go @@ -206,6 +206,13 @@ func markDecodedRecursive(md *MetaData, tmap map[string]any) { markDecodedRecursive(md, tmap) md.context = md.context[0 : len(md.context)-1] } + if tarr, ok := tmap[key].([]map[string]any); ok { + for _, elm := range tarr { + md.context = append(md.context, key) + markDecodedRecursive(md, elm) + md.context = md.context[0 : len(md.context)-1] + } + } } } @@ -423,7 +430,7 @@ func (md *MetaData) unifyString(data any, rv reflect.Value) error { if i, ok := data.(int64); ok { rv.SetString(strconv.FormatInt(i, 10)) } else if f, ok := data.(float64); ok { - rv.SetString(strconv.FormatFloat(f, 'f', -1, 64)) + rv.SetString(strconv.FormatFloat(f, 'g', -1, 64)) } else { return md.badtype("string", data) } diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go index ac196e7df..bd7aa1865 100644 --- a/vendor/github.com/BurntSushi/toml/encode.go +++ b/vendor/github.com/BurntSushi/toml/encode.go @@ -228,9 +228,9 @@ func (enc *Encoder) eElement(rv reflect.Value) { } switch v.Location() { default: - enc.wf(v.Format(format)) + enc.write(v.Format(format)) case internal.LocalDatetime, internal.LocalDate, internal.LocalTime: - enc.wf(v.In(time.UTC).Format(format)) + enc.write(v.In(time.UTC).Format(format)) } return case Marshaler: @@ -279,40 +279,40 @@ func (enc *Encoder) eElement(rv reflect.Value) { case reflect.String: enc.writeQuoted(rv.String()) case reflect.Bool: - enc.wf(strconv.FormatBool(rv.Bool())) + enc.write(strconv.FormatBool(rv.Bool())) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - enc.wf(strconv.FormatInt(rv.Int(), 10)) + enc.write(strconv.FormatInt(rv.Int(), 10)) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - enc.wf(strconv.FormatUint(rv.Uint(), 10)) + enc.write(strconv.FormatUint(rv.Uint(), 10)) case reflect.Float32: f := rv.Float() if math.IsNaN(f) { if math.Signbit(f) { - enc.wf("-") + enc.write("-") } - enc.wf("nan") + enc.write("nan") } else if math.IsInf(f, 0) { if math.Signbit(f) { - enc.wf("-") + enc.write("-") } - enc.wf("inf") + enc.write("inf") } else { - enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 32))) + enc.write(floatAddDecimal(strconv.FormatFloat(f, 'g', -1, 32))) } case reflect.Float64: f := rv.Float() if math.IsNaN(f) { if math.Signbit(f) { - enc.wf("-") + enc.write("-") } - enc.wf("nan") + enc.write("nan") } else if math.IsInf(f, 0) { if math.Signbit(f) { - enc.wf("-") + enc.write("-") } - enc.wf("inf") + enc.write("inf") } else { - enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 64))) + enc.write(floatAddDecimal(strconv.FormatFloat(f, 'g', -1, 64))) } case reflect.Array, reflect.Slice: enc.eArrayOrSliceElement(rv) @@ -330,27 +330,32 @@ func (enc *Encoder) eElement(rv reflect.Value) { // By the TOML spec, all floats must have a decimal with at least one number on // either side. func floatAddDecimal(fstr string) string { - if !strings.Contains(fstr, ".") { - return fstr + ".0" + for _, c := range fstr { + if c == 'e' { // Exponent syntax + return fstr + } + if c == '.' { + return fstr + } } - return fstr + return fstr + ".0" } func (enc *Encoder) writeQuoted(s string) { - enc.wf("\"%s\"", dblQuotedReplacer.Replace(s)) + enc.write(`"` + dblQuotedReplacer.Replace(s) + `"`) } func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { length := rv.Len() - enc.wf("[") + enc.write("[") for i := 0; i < length; i++ { elem := eindirect(rv.Index(i)) enc.eElement(elem) if i != length-1 { - enc.wf(", ") + enc.write(", ") } } - enc.wf("]") + enc.write("]") } func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { @@ -363,7 +368,7 @@ func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { continue } enc.newline() - enc.wf("%s[[%s]]", enc.indentStr(key), key) + enc.writef("%s[[%s]]", enc.indentStr(key), key) enc.newline() enc.eMapOrStruct(key, trv, false) } @@ -376,7 +381,7 @@ func (enc *Encoder) eTable(key Key, rv reflect.Value) { enc.newline() } if len(key) > 0 { - enc.wf("%s[%s]", enc.indentStr(key), key) + enc.writef("%s[%s]", enc.indentStr(key), key) enc.newline() } enc.eMapOrStruct(key, rv, false) @@ -422,7 +427,7 @@ func (enc *Encoder) eMap(key Key, rv reflect.Value, inline bool) { if inline { enc.writeKeyValue(Key{mapKey.String()}, val, true) if trailC || i != len(mapKeys)-1 { - enc.wf(", ") + enc.write(", ") } } else { enc.encode(key.add(mapKey.String()), val) @@ -431,12 +436,12 @@ func (enc *Encoder) eMap(key Key, rv reflect.Value, inline bool) { } if inline { - enc.wf("{") + enc.write("{") } writeMapKeys(mapKeysDirect, len(mapKeysSub) > 0) writeMapKeys(mapKeysSub, false) if inline { - enc.wf("}") + enc.write("}") } } @@ -534,7 +539,7 @@ func (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) { if inline { enc.writeKeyValue(Key{keyName}, fieldVal, true) if fieldIndex[0] != totalFields-1 { - enc.wf(", ") + enc.write(", ") } } else { enc.encode(key.add(keyName), fieldVal) @@ -543,14 +548,14 @@ func (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) { } if inline { - enc.wf("{") + enc.write("{") } l := len(fieldsDirect) + len(fieldsSub) writeFields(fieldsDirect, l) writeFields(fieldsSub, l) if inline { - enc.wf("}") + enc.write("}") } } @@ -700,7 +705,7 @@ func isEmpty(rv reflect.Value) bool { func (enc *Encoder) newline() { if enc.hasWritten { - enc.wf("\n") + enc.write("\n") } } @@ -722,14 +727,22 @@ func (enc *Encoder) writeKeyValue(key Key, val reflect.Value, inline bool) { enc.eElement(val) return } - enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) + enc.writef("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) enc.eElement(val) if !inline { enc.newline() } } -func (enc *Encoder) wf(format string, v ...any) { +func (enc *Encoder) write(s string) { + _, err := enc.w.WriteString(s) + if err != nil { + encPanic(err) + } + enc.hasWritten = true +} + +func (enc *Encoder) writef(format string, v ...any) { _, err := fmt.Fprintf(enc.w, format, v...) if err != nil { encPanic(err) diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go index 1c3b47702..9f4396a0f 100644 --- a/vendor/github.com/BurntSushi/toml/lex.go +++ b/vendor/github.com/BurntSushi/toml/lex.go @@ -13,7 +13,6 @@ type itemType int const ( itemError itemType = iota - itemNIL // used in the parser to indicate no type itemEOF itemText itemString @@ -47,14 +46,13 @@ func (p Position) String() string { } type lexer struct { - input string - start int - pos int - line int - state stateFn - items chan item - tomlNext bool - esc bool + input string + start int + pos int + line int + state stateFn + items chan item + esc bool // Allow for backing up up to 4 runes. This is necessary because TOML // contains 3-rune tokens (""" and '''). @@ -90,14 +88,13 @@ func (lx *lexer) nextItem() item { } } -func lex(input string, tomlNext bool) *lexer { +func lex(input string) *lexer { lx := &lexer{ - input: input, - state: lexTop, - items: make(chan item, 10), - stack: make([]stateFn, 0, 10), - line: 1, - tomlNext: tomlNext, + input: input, + state: lexTop, + items: make(chan item, 10), + stack: make([]stateFn, 0, 10), + line: 1, } return lx } @@ -108,7 +105,7 @@ func (lx *lexer) push(state stateFn) { func (lx *lexer) pop() stateFn { if len(lx.stack) == 0 { - return lx.errorf("BUG in lexer: no states to pop") + panic("BUG in lexer: no states to pop") } last := lx.stack[len(lx.stack)-1] lx.stack = lx.stack[0 : len(lx.stack)-1] @@ -305,6 +302,8 @@ func lexTop(lx *lexer) stateFn { return lexTableStart case eof: if lx.pos > lx.start { + // TODO: never reached? I think this can only occur on a bug in the + // lexer(?) return lx.errorf("unexpected EOF") } lx.emit(itemEOF) @@ -392,8 +391,6 @@ func lexTableNameStart(lx *lexer) stateFn { func lexTableNameEnd(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.next(); { - case isWhitespace(r): - return lexTableNameEnd case r == '.': lx.ignore() return lexTableNameStart @@ -412,7 +409,7 @@ func lexTableNameEnd(lx *lexer) stateFn { // Lexes only one part, e.g. only 'a' inside 'a.b'. func lexBareName(lx *lexer) stateFn { r := lx.next() - if isBareKeyChar(r, lx.tomlNext) { + if isBareKeyChar(r) { return lexBareName } lx.backup() @@ -420,23 +417,23 @@ func lexBareName(lx *lexer) stateFn { return lx.pop() } -// lexBareName lexes one part of a key or table. -// -// It assumes that at least one valid character for the table has already been -// read. +// lexQuotedName lexes one part of a quoted key or table name. It assumes that +// it starts lexing at the quote itself (" or '). // // Lexes only one part, e.g. only '"a"' inside '"a".b'. func lexQuotedName(lx *lexer) stateFn { r := lx.next() switch { - case isWhitespace(r): - return lexSkip(lx, lexValue) case r == '"': lx.ignore() // ignore the '"' return lexString case r == '\'': lx.ignore() // ignore the "'" return lexRawString + + // TODO: I don't think any of the below conditions can ever be reached? + case isWhitespace(r): + return lexSkip(lx, lexValue) case r == eof: return lx.errorf("unexpected EOF; expected value") default: @@ -464,17 +461,19 @@ func lexKeyStart(lx *lexer) stateFn { func lexKeyNameStart(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.peek(); { - case r == '=' || r == eof: - return lx.errorf("unexpected '='") - case r == '.': - return lx.errorf("unexpected '.'") + default: + lx.push(lexKeyEnd) + return lexBareName case r == '"' || r == '\'': lx.ignore() lx.push(lexKeyEnd) return lexQuotedName - default: - lx.push(lexKeyEnd) - return lexBareName + + // TODO: I think these can never be reached? + case r == '=' || r == eof: + return lx.errorf("unexpected '='") + case r == '.': + return lx.errorf("unexpected '.'") } } @@ -485,7 +484,7 @@ func lexKeyEnd(lx *lexer) stateFn { switch r := lx.next(); { case isWhitespace(r): return lexSkip(lx, lexKeyEnd) - case r == eof: + case r == eof: // TODO: never reached return lx.errorf("unexpected EOF; expected key separator '='") case r == '.': lx.ignore() @@ -628,10 +627,7 @@ func lexInlineTableValue(lx *lexer) stateFn { case isWhitespace(r): return lexSkip(lx, lexInlineTableValue) case isNL(r): - if lx.tomlNext { - return lexSkip(lx, lexInlineTableValue) - } - return lx.errorPrevLine(errLexInlineTableNL{}) + return lexSkip(lx, lexInlineTableValue) case r == '#': lx.push(lexInlineTableValue) return lexCommentStart @@ -653,10 +649,7 @@ func lexInlineTableValueEnd(lx *lexer) stateFn { case isWhitespace(r): return lexSkip(lx, lexInlineTableValueEnd) case isNL(r): - if lx.tomlNext { - return lexSkip(lx, lexInlineTableValueEnd) - } - return lx.errorPrevLine(errLexInlineTableNL{}) + return lexSkip(lx, lexInlineTableValueEnd) case r == '#': lx.push(lexInlineTableValueEnd) return lexCommentStart @@ -664,10 +657,7 @@ func lexInlineTableValueEnd(lx *lexer) stateFn { lx.ignore() lx.skip(isWhitespace) if lx.peek() == '}' { - if lx.tomlNext { - return lexInlineTableValueEnd - } - return lx.errorf("trailing comma not allowed in inline tables") + return lexInlineTableValueEnd } return lexInlineTableValue case r == '}': @@ -855,9 +845,6 @@ func lexStringEscape(lx *lexer) stateFn { r := lx.next() switch r { case 'e': - if !lx.tomlNext { - return lx.error(errLexEscape{r}) - } fallthrough case 'b': fallthrough @@ -878,9 +865,6 @@ func lexStringEscape(lx *lexer) stateFn { case '\\': return lx.pop() case 'x': - if !lx.tomlNext { - return lx.error(errLexEscape{r}) - } return lexHexEscape case 'u': return lexShortUnicodeEscape @@ -928,19 +912,9 @@ func lexLongUnicodeEscape(lx *lexer) stateFn { // lexBaseNumberOrDate can differentiate base prefixed integers from other // types. func lexNumberOrDateStart(lx *lexer) stateFn { - r := lx.next() - switch r { - case '0': + if lx.next() == '0' { return lexBaseNumberOrDate } - - if !isDigit(r) { - // The only way to reach this state is if the value starts - // with a digit, so specifically treat anything else as an - // error. - return lx.errorf("expected a digit but got %q", r) - } - return lexNumberOrDate } @@ -1196,13 +1170,13 @@ func lexSkip(lx *lexer, nextState stateFn) stateFn { } func (s stateFn) String() string { + if s == nil { + return "" + } name := runtime.FuncForPC(reflect.ValueOf(s).Pointer()).Name() if i := strings.LastIndexByte(name, '.'); i > -1 { name = name[i+1:] } - if s == nil { - name = "" - } return name + "()" } @@ -1210,8 +1184,6 @@ func (itype itemType) String() string { switch itype { case itemError: return "Error" - case itemNIL: - return "NIL" case itemEOF: return "EOF" case itemText: @@ -1226,18 +1198,22 @@ func (itype itemType) String() string { return "Float" case itemDatetime: return "DateTime" + case itemArray: + return "Array" + case itemArrayEnd: + return "ArrayEnd" case itemTableStart: return "TableStart" case itemTableEnd: return "TableEnd" + case itemArrayTableStart: + return "ArrayTableStart" + case itemArrayTableEnd: + return "ArrayTableEnd" case itemKeyStart: return "KeyStart" case itemKeyEnd: return "KeyEnd" - case itemArray: - return "Array" - case itemArrayEnd: - return "ArrayEnd" case itemCommentStart: return "CommentStart" case itemInlineTableStart: @@ -1266,7 +1242,7 @@ func isDigit(r rune) bool { return r >= '0' && r <= '9' } func isBinary(r rune) bool { return r == '0' || r == '1' } func isOctal(r rune) bool { return r >= '0' && r <= '7' } func isHex(r rune) bool { return (r >= '0' && r <= '9') || (r|0x20 >= 'a' && r|0x20 <= 'f') } -func isBareKeyChar(r rune, tomlNext bool) bool { +func isBareKeyChar(r rune) bool { return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r == '-' } diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go index e3ea8a9a2..b474247ae 100644 --- a/vendor/github.com/BurntSushi/toml/parse.go +++ b/vendor/github.com/BurntSushi/toml/parse.go @@ -3,7 +3,6 @@ package toml import ( "fmt" "math" - "os" "strconv" "strings" "time" @@ -17,7 +16,6 @@ type parser struct { context Key // Full key for the current hash in scope. currentKey string // Base key name for everything except hashes. pos Position // Current position in the TOML file. - tomlNext bool ordered []Key // List of keys in the order that they appear in the TOML data. @@ -32,8 +30,6 @@ type keyInfo struct { } func parse(data string) (p *parser, err error) { - _, tomlNext := os.LookupEnv("BURNTSUSHI_TOML_110") - defer func() { if r := recover(); r != nil { if pErr, ok := r.(ParseError); ok { @@ -73,10 +69,9 @@ func parse(data string) (p *parser, err error) { p = &parser{ keyInfo: make(map[string]keyInfo), mapping: make(map[string]any), - lx: lex(data, tomlNext), + lx: lex(data), ordered: make([]Key, 0), implicits: make(map[string]struct{}), - tomlNext: tomlNext, } for { item := p.next() @@ -350,17 +345,14 @@ func (p *parser) valueFloat(it item) (any, tomlType) { var dtTypes = []struct { fmt string zone *time.Location - next bool }{ - {time.RFC3339Nano, time.Local, false}, - {"2006-01-02T15:04:05.999999999", internal.LocalDatetime, false}, - {"2006-01-02", internal.LocalDate, false}, - {"15:04:05.999999999", internal.LocalTime, false}, - - // tomlNext - {"2006-01-02T15:04Z07:00", time.Local, true}, - {"2006-01-02T15:04", internal.LocalDatetime, true}, - {"15:04", internal.LocalTime, true}, + {time.RFC3339Nano, time.Local}, + {"2006-01-02T15:04:05.999999999", internal.LocalDatetime}, + {"2006-01-02", internal.LocalDate}, + {"15:04:05.999999999", internal.LocalTime}, + {"2006-01-02T15:04Z07:00", time.Local}, + {"2006-01-02T15:04", internal.LocalDatetime}, + {"15:04", internal.LocalTime}, } func (p *parser) valueDatetime(it item) (any, tomlType) { @@ -371,9 +363,6 @@ func (p *parser) valueDatetime(it item) (any, tomlType) { err error ) for _, dt := range dtTypes { - if dt.next && !p.tomlNext { - continue - } t, err = time.ParseInLocation(dt.fmt, it.val, dt.zone) if err == nil { if missingLeadingZero(it.val, dt.fmt) { @@ -644,6 +633,11 @@ func (p *parser) setValue(key string, value any) { // Note that since it has already been defined (as a hash), we don't // want to overwrite it. So our business is done. if p.isArray(keyContext) { + if !p.isImplicit(keyContext) { + if _, ok := hash[key]; ok { + p.panicf("Key '%s' has already been defined.", keyContext) + } + } p.removeImplicit(keyContext) hash[key] = value return @@ -802,10 +796,8 @@ func (p *parser) replaceEscapes(it item, str string) string { b.WriteByte(0x0d) skip = 1 case 'e': - if p.tomlNext { - b.WriteByte(0x1b) - skip = 1 - } + b.WriteByte(0x1b) + skip = 1 case '"': b.WriteByte(0x22) skip = 1 @@ -815,11 +807,9 @@ func (p *parser) replaceEscapes(it item, str string) string { // The lexer guarantees the correct number of characters are present; // don't need to check here. case 'x': - if p.tomlNext { - escaped := p.asciiEscapeToUnicode(it, str[i+2:i+4]) - b.WriteRune(escaped) - skip = 3 - } + escaped := p.asciiEscapeToUnicode(it, str[i+2:i+4]) + b.WriteRune(escaped) + skip = 3 case 'u': escaped := p.asciiEscapeToUnicode(it, str[i+2:i+6]) b.WriteRune(escaped) diff --git a/vendor/github.com/MirrexOne/unqueryvet/README.md b/vendor/github.com/MirrexOne/unqueryvet/README.md index 407f9d289..a5b2a3aed 100644 --- a/vendor/github.com/MirrexOne/unqueryvet/README.md +++ b/vendor/github.com/MirrexOne/unqueryvet/README.md @@ -10,7 +10,14 @@ unqueryvet is a Go static analysis tool (linter) that detects `SELECT *` usage i - **Detects `SELECT *` in string literals** - Finds problematic queries in your Go code - **Constants and variables support** - Detects `SELECT *` in const and var declarations -- **SQL Builder support** - Works with popular SQL builders like Squirrel, GORM, etc. +- **String concatenation analysis** - Detects `SELECT *` in concatenated strings like `"SELECT * " + "FROM users"` +- **Format string analysis** - Detects `SELECT *` in `fmt.Sprintf`, `log.Printf`, and other format functions +- **Aliased wildcard detection** - Catches `SELECT t.*`, `SELECT alias.*` patterns +- **Subquery detection** - Finds `SELECT *` inside subqueries and nested queries +- **SQL Builder support** - Works with 8 popular SQL builders: Squirrel, GORM, SQLx, Ent, PGX, Bun, SQLBoiler, Jet +- **Auto-fix suggestions** - Provides suggested fixes for detected violations +- **File and function filtering** - Ignore specific files or functions using glob patterns +- **Configurable severity** - Set diagnostic severity to "error" or "warning" - **Highly configurable** - Extensive configuration options for different use cases - **Supports `//nolint:unqueryvet`** - Standard Go linting suppression - **golangci-lint integration** - Works seamlessly with golangci-lint @@ -33,6 +40,22 @@ Unqueryvet provides context-specific messages that explain WHY you should avoid query := "SELECT * FROM users" // avoid SELECT * - explicitly specify needed columns for better performance, maintainability and stability +// Aliased wildcards +query := "SELECT t.* FROM users t" +// avoid SELECT alias.* - explicitly specify columns like t.id, t.name for better maintainability + +// String concatenation +query := "SELECT * " + "FROM users" +// avoid SELECT * in concatenated string - explicitly specify needed columns + +// Format strings +query := fmt.Sprintf("SELECT * FROM %s", tableName) +// avoid SELECT * in format string - explicitly specify needed columns + +// Subqueries +query := "SELECT id FROM (SELECT * FROM users)" +// avoid SELECT * in subquery - explicitly specify needed columns + // SQL Builders query := squirrel.Select("*").From("users") // avoid SELECT * in SQL builder - explicitly specify columns to prevent unnecessary data transfer and schema change issues @@ -89,6 +112,20 @@ var QueryOrders = "SELECT * FROM orders" query := "SELECT * FROM users" rows, err := db.Query("SELECT * FROM orders WHERE status = ?", "active") +// Aliased wildcards +query := "SELECT t.* FROM users t" +query := "SELECT u.*, o.* FROM users u JOIN orders o ON u.id = o.user_id" + +// String concatenation +query := "SELECT * " + "FROM users " + "WHERE id = ?" + +// Format strings +query := fmt.Sprintf("SELECT * FROM %s WHERE id = %d", table, id) + +// Subqueries +query := "SELECT id FROM (SELECT * FROM users)" +query := "SELECT * FROM users WHERE id IN (SELECT * FROM orders)" + // SQL builders with SELECT * query := squirrel.Select("*").From("products") query := builder.Select().Columns("*").From("inventory") @@ -136,26 +173,94 @@ version: "2" linters: settings: - unqueryvet: - # Enable/disable SQL builder checking (default: true) - check-sql-builders: true - - # Default allowed patterns (automatically included): - # - COUNT(*), MAX(*), MIN(*) functions - # - information_schema, pg_catalog, sys schema queries - # You can add more patterns if needed: - # allowed-patterns: - # - "SELECT \\* FROM temp_.*" + unqueryvet: + # Enable/disable SQL builder checking (default: true) + check-sql-builders: true + + # Enable/disable aliased wildcard detection like SELECT t.* (default: true) + check-aliased-wildcard: true + + # Enable/disable string concatenation analysis (default: true) + check-string-concat: true + + # Enable/disable format string analysis like fmt.Sprintf (default: true) + check-format-strings: true + + # Enable/disable strings.Builder analysis (default: true) + check-string-builder: true + + # Enable/disable subquery analysis (default: true) + check-subqueries: true + + # Diagnostic severity: "error" or "warning" (default: "warning") + severity: warning + + # SQL builder libraries to check (all enabled by default) + sql-builders: + squirrel: true + gorm: true + sqlx: true + ent: true + pgx: true + bun: true + sqlboiler: true + jet: true + + # Patterns for files to ignore (glob patterns) + # ignored-files: + # - "*_test.go" + # - "testdata/**" + # - "mock_*.go" + + # Functions to ignore (regex patterns) + # ignored-functions: + # - "debug\\..*" + # - "test.*" + + # Default allowed patterns (automatically included): + # - COUNT(*), MAX(*), MIN(*) functions + # - information_schema, pg_catalog, sys schema queries + # You can add more patterns if needed: + # allowed-patterns: + # - "SELECT \\* FROM temp_.*" ``` ## Supported SQL Builders -Unqueryvet supports popular SQL builders out of the box: +Unqueryvet supports 8 popular SQL builders out of the box: + +| Library | Package | Detection | +|---------|---------|-----------| +| **Squirrel** | `github.com/Masterminds/squirrel` | `Select("*")`, `Columns("*")` | +| **GORM** | `gorm.io/gorm` | `Select("*")`, raw queries | +| **SQLx** | `github.com/jmoiron/sqlx` | `Select()`, raw queries | +| **Ent** | `entgo.io/ent` | Query builder patterns | +| **PGX** | `github.com/jackc/pgx` | `Query()`, `QueryRow()` | +| **Bun** | `github.com/uptrace/bun` | `NewSelect()`, raw queries | +| **SQLBoiler** | `github.com/volatiletech/sqlboiler` | Generated query methods | +| **Jet** | `github.com/go-jet/jet` | `SELECT()`, `STAR` | + +Each checker can be individually enabled/disabled via configuration. + +## Auto-Fix Suggestions + +Unqueryvet provides automatic fix suggestions for detected violations. When used with editors that support LSP or with `golangci-lint --fix`, you can quickly fix issues: + +```go +// Before (violation detected) +query := "SELECT * FROM users" + +// After auto-fix (with TODO placeholder) +query := "SELECT id, /* TODO: specify columns */ FROM users" + +// SQL builder before +squirrel.Select("*").From("users") + +// SQL builder after auto-fix +squirrel.Select("id", /* TODO: specify columns */).From("users") +``` -- **Squirrel** - `squirrel.Select("*")`, `Select().Columns("*")` -- **GORM** - Custom query methods -- **SQLBoiler** - Generated query methods -- **Custom builders** - Any builder using `Select()` patterns +The auto-fix adds `/* TODO: specify columns */` as a reminder to manually specify the columns you actually need. ## Integration Examples diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go index ce9b9874c..023aa358c 100644 --- a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go @@ -12,6 +12,7 @@ import ( "golang.org/x/tools/go/analysis/passes/inspect" "golang.org/x/tools/go/ast/inspector" + "github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders" "github.com/MirrexOne/unqueryvet/pkg/config" ) @@ -26,6 +27,15 @@ const ( defaultWarningMessage = "avoid SELECT * - explicitly specify needed columns for better performance, maintainability and stability" ) +// Precompiled regex patterns for performance +var ( + // aliasedWildcardPattern matches SELECT alias.* patterns like "SELECT t.*", "SELECT u.*, o.*" + aliasedWildcardPattern = regexp.MustCompile(`(?i)SELECT\s+(?:[A-Za-z_][A-Za-z0-9_]*\s*\.\s*\*\s*,?\s*)+`) + + // subquerySelectStarPattern matches SELECT * in subqueries like "(SELECT * FROM ...)" + subquerySelectStarPattern = regexp.MustCompile(`(?i)\(\s*SELECT\s+\*`) +) + // NewAnalyzer creates the Unqueryvet analyzer with enhanced logic for production use func NewAnalyzer() *analysis.Analyzer { return &analysis.Analyzer{ @@ -59,12 +69,34 @@ func RunWithConfig(pass *analysis.Pass, cfg *config.UnqueryvetSettings) (any, er cfg = &defaultSettings } + // Create filter context for efficient filtering + filter, err := NewFilterContext(cfg) + if err != nil { + // If filter creation fails, continue without filtering + filter = nil + } + + // Check if current file should be ignored + if filter != nil && len(pass.Files) > 0 { + fileName := pass.Fset.File(pass.Files[0].Pos()).Name() + if filter.IsIgnoredFile(fileName) { + return nil, nil + } + } + + // Create SQL builder registry for checking SQL builder patterns + var builderRegistry *sqlbuilders.Registry + if cfg.CheckSQLBuilders { + builderRegistry = sqlbuilders.NewRegistry(&cfg.SQLBuilders) + } + // Define AST node types we're interested in nodeFilter := []ast.Node{ (*ast.CallExpr)(nil), // Function/method calls (*ast.File)(nil), // Files (for SQL builder analysis) (*ast.AssignStmt)(nil), // Assignment statements for standalone literals (*ast.GenDecl)(nil), // General declarations (const, var, type) + (*ast.BinaryExpr)(nil), // Binary expressions for string concatenation } // Walk through all AST nodes and analyze them @@ -82,8 +114,46 @@ func RunWithConfig(pass *analysis.Pass, cfg *config.UnqueryvetSettings) (any, er // Check constant and variable declarations checkGenDecl(pass, node, cfg) case *ast.CallExpr: + // Check if function should be ignored + if filter != nil && filter.IsIgnoredFunction(node) { + return + } + + // Check format functions (fmt.Sprintf, etc.) + if cfg.CheckFormatStrings && CheckFormatFunction(pass, node, cfg) { + pass.Report(analysis.Diagnostic{ + Pos: node.Pos(), + Message: getDetailedWarningMessage("format_string"), + }) + return + } + + // Check SQL builder patterns + if builderRegistry != nil && builderRegistry.HasCheckers() { + violations := builderRegistry.Check(node) + for _, v := range violations { + pass.Report(analysis.Diagnostic{ + Pos: v.Pos, + End: v.End, + Message: v.Message, + }) + } + if len(violations) > 0 { + return + } + } + // Analyze function calls for SQL with SELECT * usage checkCallExpr(pass, node, cfg) + + case *ast.BinaryExpr: + // Check string concatenation for SELECT * + if cfg.CheckStringConcat && CheckConcatenation(pass, node, cfg) { + pass.Report(analysis.Diagnostic{ + Pos: node.Pos(), + Message: getDetailedWarningMessage("concat"), + }) + } } }) @@ -277,8 +347,9 @@ func isSelectStarQuery(query string, cfg *config.UnqueryvetSettings) bool { } } - // Check for SELECT * in query (case-insensitive) upperQuery := strings.ToUpper(query) + + // Check for SELECT * in query (case-insensitive) if strings.Contains(upperQuery, "SELECT *") { //nolint:unqueryvet // Ensure this is actually an SQL query by checking for SQL keywords sqlKeywords := []string{"FROM", "WHERE", "JOIN", "GROUP", "ORDER", "HAVING", "UNION", "LIMIT"} @@ -294,9 +365,30 @@ func isSelectStarQuery(query string, cfg *config.UnqueryvetSettings) bool { return true } } + + // Check for SELECT alias.* patterns (e.g., SELECT t.*, SELECT u.*, o.*) + if cfg.CheckAliasedWildcard && isSelectAliasStarQuery(query) { + return true + } + + // Check for SELECT * in subqueries (e.g., (SELECT * FROM ...)) + if cfg.CheckSubqueries && isSelectStarInSubquery(query) { + return true + } + return false } +// isSelectAliasStarQuery detects SELECT alias.* patterns like "SELECT t.*", "SELECT u.*, o.*" +func isSelectAliasStarQuery(query string) bool { + return aliasedWildcardPattern.MatchString(query) +} + +// isSelectStarInSubquery detects SELECT * in subqueries like "(SELECT * FROM ...)" +func isSelectStarInSubquery(query string) bool { + return subquerySelectStarPattern.MatchString(query) +} + // getWarningMessage returns informative warning message func getWarningMessage() string { return defaultWarningMessage @@ -311,6 +403,14 @@ func getDetailedWarningMessage(context string) string { return "avoid SELECT * in subquery - can cause performance issues and unexpected results when schema changes" case "empty_select": return "SQL builder Select() without columns defaults to SELECT * - add specific columns with .Columns() method" + case "aliased_wildcard": + return "avoid SELECT alias.* - explicitly specify columns like alias.id, alias.name for better maintainability" + case "subquery": + return "avoid SELECT * in subquery - specify columns explicitly to prevent issues when schema changes" + case "concat": + return "avoid SELECT * in concatenated query - explicitly specify needed columns" + case "format_string": + return "avoid SELECT * in format string - explicitly specify needed columns" default: return defaultWarningMessage } diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/concat.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/concat.go new file mode 100644 index 000000000..c4635ec84 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/concat.go @@ -0,0 +1,100 @@ +// Package analyzer provides the SQL static analysis implementation for detecting SELECT * usage. +package analyzer + +import ( + "go/ast" + "go/token" + "strings" + + "golang.org/x/tools/go/analysis" + + "github.com/MirrexOne/unqueryvet/pkg/config" +) + +// StringConcatAnalyzer analyzes string concatenation expressions for SELECT * patterns. +// It traverses binary expressions to combine string parts and check for SELECT * usage. +type StringConcatAnalyzer struct { + pass *analysis.Pass + cfg *config.UnqueryvetSettings +} + +// NewStringConcatAnalyzer creates a new StringConcatAnalyzer. +func NewStringConcatAnalyzer(pass *analysis.Pass, cfg *config.UnqueryvetSettings) *StringConcatAnalyzer { + return &StringConcatAnalyzer{ + pass: pass, + cfg: cfg, + } +} + +// AnalyzeBinaryExpr analyzes a binary expression for string concatenation with SELECT *. +// Returns true if SELECT * was detected in the concatenated string. +func (sca *StringConcatAnalyzer) AnalyzeBinaryExpr(expr *ast.BinaryExpr) bool { + // Only analyze string concatenation (+ operator) + if expr.Op != token.ADD { + return false + } + + // Extract all string parts from the concatenation chain + parts := sca.extractStringParts(expr) + if len(parts) == 0 { + return false + } + + // Combine parts and check for SELECT * + combined := strings.Join(parts, "") + if combined == "" { + return false + } + + // Normalize and check for SELECT * + normalized := normalizeSQLQuery("\"" + combined + "\"") + return isSelectStarQuery(normalized, sca.cfg) +} + +// extractStringParts recursively extracts all string literal parts from a concatenation chain. +// For expressions like: "SELECT * " + "FROM " + tableName + " WHERE id = 1" +// It extracts: ["SELECT * ", "FROM ", " WHERE id = 1"] +func (sca *StringConcatAnalyzer) extractStringParts(expr ast.Expr) []string { + var parts []string + + switch e := expr.(type) { + case *ast.BasicLit: + // String literal + if e.Kind == token.STRING { + // Remove quotes from the string + value := strings.Trim(e.Value, "`\"") + parts = append(parts, value) + } + case *ast.BinaryExpr: + // Concatenation - recurse into both sides + if e.Op == token.ADD { + parts = append(parts, sca.extractStringParts(e.X)...) + parts = append(parts, sca.extractStringParts(e.Y)...) + } + case *ast.Ident: + // Variable reference - we can't know the value at compile time + // but we can check if it's a constant + if e.Obj != nil && e.Obj.Kind == ast.Con { + if valueSpec, ok := e.Obj.Decl.(*ast.ValueSpec); ok { + for _, value := range valueSpec.Values { + if lit, ok := value.(*ast.BasicLit); ok && lit.Kind == token.STRING { + strValue := strings.Trim(lit.Value, "`\"") + parts = append(parts, strValue) + } + } + } + } + case *ast.ParenExpr: + // Parenthesized expression - unwrap + parts = append(parts, sca.extractStringParts(e.X)...) + } + + return parts +} + +// CheckConcatenation is a convenience function to check a binary expression for SELECT *. +// It creates an analyzer and performs the check in one call. +func CheckConcatenation(pass *analysis.Pass, expr *ast.BinaryExpr, cfg *config.UnqueryvetSettings) bool { + analyzer := NewStringConcatAnalyzer(pass, cfg) + return analyzer.AnalyzeBinaryExpr(expr) +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/filter.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/filter.go new file mode 100644 index 000000000..5ad13b62f --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/filter.go @@ -0,0 +1,176 @@ +// Package analyzer provides the SQL static analysis implementation for detecting SELECT * usage. +package analyzer + +import ( + "go/ast" + "path/filepath" + "regexp" + "strings" + + "github.com/MirrexOne/unqueryvet/pkg/config" +) + +// FilterContext holds precompiled patterns for filtering files, functions, and queries. +// It provides efficient filtering by compiling regex patterns once during initialization. +type FilterContext struct { + ignoredFuncPatterns []*regexp.Regexp + ignoredFilePatterns []string + allowedPatterns []*regexp.Regexp +} + +// NewFilterContext creates a new FilterContext from settings. +// It precompiles all regex patterns for efficient filtering. +// Returns an error if any pattern is invalid. +func NewFilterContext(cfg *config.UnqueryvetSettings) (*FilterContext, error) { + fc := &FilterContext{ + ignoredFilePatterns: cfg.IgnoredFiles, + } + + // Compile ignored function patterns + for _, pattern := range cfg.IgnoredFunctions { + re, err := regexp.Compile(pattern) + if err != nil { + return nil, err + } + fc.ignoredFuncPatterns = append(fc.ignoredFuncPatterns, re) + } + + // Compile allowed query patterns + for _, pattern := range cfg.AllowedPatterns { + re, err := regexp.Compile(pattern) + if err != nil { + return nil, err + } + fc.allowedPatterns = append(fc.allowedPatterns, re) + } + + return fc, nil +} + +// IsIgnoredFunction checks if a function call should be ignored based on configured patterns. +// It extracts the full function name (package.function or receiver.method) and matches against patterns. +func (fc *FilterContext) IsIgnoredFunction(call *ast.CallExpr) bool { + if len(fc.ignoredFuncPatterns) == 0 { + return false + } + + funcName := extractFunctionName(call) + if funcName == "" { + return false + } + + for _, pattern := range fc.ignoredFuncPatterns { + if pattern.MatchString(funcName) { + return true + } + } + + return false +} + +// IsIgnoredFile checks if a file path matches any of the ignored file patterns. +// Supports glob patterns like "*_test.go", "testdata/**", "mock_*.go". +func (fc *FilterContext) IsIgnoredFile(filePath string) bool { + if len(fc.ignoredFilePatterns) == 0 { + return false + } + + // Normalize path separators for cross-platform support + normalizedPath := filepath.ToSlash(filePath) + baseName := filepath.Base(filePath) + + for _, pattern := range fc.ignoredFilePatterns { + // Try matching against full path + if matched, _ := filepath.Match(pattern, normalizedPath); matched { + return true + } + // Try matching against base name only + if matched, _ := filepath.Match(pattern, baseName); matched { + return true + } + // Handle ** patterns (recursive matching) + if strings.Contains(pattern, "**") { + if matchDoubleStarPattern(pattern, normalizedPath) { + return true + } + } + } + + return false +} + +// IsAllowedPattern checks if a query matches any of the allowed patterns. +// Returns true if the query should be allowed (not reported as a violation). +func (fc *FilterContext) IsAllowedPattern(query string) bool { + for _, pattern := range fc.allowedPatterns { + if pattern.MatchString(query) { + return true + } + } + return false +} + +// extractFunctionName extracts the full function name from a call expression. +// Returns formats like "pkg.Function", "receiver.Method", or just "Function". +func extractFunctionName(call *ast.CallExpr) string { + switch fun := call.Fun.(type) { + case *ast.SelectorExpr: + // Method call: obj.Method() or pkg.Function() + switch x := fun.X.(type) { + case *ast.Ident: + // pkg.Function() or receiver.Method() + return x.Name + "." + fun.Sel.Name + case *ast.SelectorExpr: + // Nested: pkg.subpkg.Function() + if ident, ok := x.X.(*ast.Ident); ok { + return ident.Name + "." + x.Sel.Name + "." + fun.Sel.Name + } + case *ast.CallExpr: + // Chained call: obj.Method1().Method2() + return fun.Sel.Name + } + return fun.Sel.Name + case *ast.Ident: + // Direct function call: Function() + return fun.Name + } + return "" +} + +// matchDoubleStarPattern handles glob patterns with ** (recursive matching). +// Example: "testdata/**" matches "testdata/foo/bar.go" +func matchDoubleStarPattern(pattern, path string) bool { + // Split pattern by ** + parts := strings.Split(pattern, "**") + if len(parts) != 2 { + return false + } + + prefix := strings.TrimSuffix(parts[0], "/") + suffix := strings.TrimPrefix(parts[1], "/") + + // Check if path starts with prefix + if prefix != "" && !strings.HasPrefix(path, prefix) { + return false + } + + // Check if path ends with suffix (if suffix exists) + if suffix != "" { + // Get the part after prefix + remainingPath := strings.TrimPrefix(path, prefix) + remainingPath = strings.TrimPrefix(remainingPath, "/") + + // Match suffix at the end or as a pattern + if matched, _ := filepath.Match(suffix, filepath.Base(path)); matched { + return true + } + if strings.HasSuffix(remainingPath, suffix) { + return true + } + } else { + // No suffix, just check prefix + return strings.HasPrefix(path, prefix) + } + + return false +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/fixes.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/fixes.go new file mode 100644 index 000000000..f059f063e --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/fixes.go @@ -0,0 +1,126 @@ +// Package analyzer provides the SQL static analysis implementation for detecting SELECT * usage. +package analyzer + +import ( + "go/token" + "regexp" + "strings" + + "golang.org/x/tools/go/analysis" +) + +// SuggestedFixGenerator generates auto-fix suggestions for SELECT * violations. +type SuggestedFixGenerator struct { + fset *token.FileSet +} + +// NewSuggestedFixGenerator creates a new SuggestedFixGenerator. +func NewSuggestedFixGenerator(fset *token.FileSet) *SuggestedFixGenerator { + return &SuggestedFixGenerator{ + fset: fset, + } +} + +// selectStarPattern matches SELECT * patterns for replacement +var selectStarFixPattern = regexp.MustCompile(`(?i)(SELECT\s+)\*(\s+FROM)`) + +// aliasedStarPattern matches SELECT alias.* patterns for replacement +var aliasedStarFixPattern = regexp.MustCompile(`(?i)(SELECT\s+)([A-Za-z_][A-Za-z0-9_]*)\s*\.\s*\*`) + +// GenerateFix creates a SuggestedFix for a SELECT * violation. +func (sfg *SuggestedFixGenerator) GenerateFix( + pos token.Pos, + end token.Pos, + originalText string, + violationType string, +) *analysis.SuggestedFix { + var newText string + var message string + + switch violationType { + case "select_star": + // Replace SELECT * with placeholder columns + newText = selectStarFixPattern.ReplaceAllString(originalText, "${1}id, /* TODO: specify columns */ ${2}") + message = "Replace SELECT * with explicit columns" + + case "aliased_wildcard": + // Replace SELECT t.* with placeholder + newText = aliasedStarFixPattern.ReplaceAllStringFunc(originalText, func(match string) string { + // Extract the alias + parts := aliasedStarFixPattern.FindStringSubmatch(match) + if len(parts) >= 3 { + alias := parts[2] + return parts[1] + alias + ".id, " + alias + "./* TODO: specify columns */" + } + return match + }) + message = "Replace SELECT alias.* with explicit columns" + + case "sql_builder_star": + // For SQL builder Select("*") -> Select("id", /* TODO */) + newText = strings.Replace(originalText, `"*"`, `"id", /* TODO: specify columns */`, 1) + message = "Replace \"*\" with explicit column names" + + case "empty_select": + // For empty Select() -> Select("id", /* TODO */) + newText = strings.Replace(originalText, "Select()", `Select("id", /* TODO: specify columns */)`, 1) + message = "Add column names to Select()" + + default: + // Generic replacement + newText = selectStarFixPattern.ReplaceAllString(originalText, "${1}id, /* TODO: specify columns */ ${2}") + message = "Replace SELECT * with explicit columns" + } + + // If no change was made, don't suggest a fix + if newText == originalText { + return nil + } + + return &analysis.SuggestedFix{ + Message: message, + TextEdits: []analysis.TextEdit{ + { + Pos: pos, + End: end, + NewText: []byte(newText), + }, + }, + } +} + +// GenerateColumnPlaceholder returns a placeholder string for explicit columns. +func (sfg *SuggestedFixGenerator) GenerateColumnPlaceholder() string { + return "id, /* TODO: specify columns */" +} + +// GenerateAliasedColumnPlaceholder returns a placeholder with table alias. +func (sfg *SuggestedFixGenerator) GenerateAliasedColumnPlaceholder(alias string) string { + return alias + ".id, " + alias + "./* TODO: specify columns */" +} + +// CreateDiagnosticWithFix creates a Diagnostic with an optional SuggestedFix. +func CreateDiagnosticWithFix( + pos token.Pos, + end token.Pos, + message string, + originalText string, + violationType string, + fset *token.FileSet, +) analysis.Diagnostic { + diagnostic := analysis.Diagnostic{ + Pos: pos, + End: end, + Message: message, + } + + // Generate fix if we have enough information + if originalText != "" && fset != nil { + generator := NewSuggestedFixGenerator(fset) + if fix := generator.GenerateFix(pos, end, originalText, violationType); fix != nil { + diagnostic.SuggestedFixes = []analysis.SuggestedFix{*fix} + } + } + + return diagnostic +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go new file mode 100644 index 000000000..5fc827ed8 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go @@ -0,0 +1,217 @@ +// Package analyzer provides the SQL static analysis implementation for detecting SELECT * usage. +package analyzer + +import ( + "go/ast" + "go/token" + "strings" + + "golang.org/x/tools/go/analysis" + + "github.com/MirrexOne/unqueryvet/pkg/config" +) + +// formatFunctions maps package.function names to the index of the format string argument. +// Index -1 means the format string is the last argument (for variadic functions). +var formatFunctions = map[string]int{ + // fmt package + "fmt.Sprintf": 0, + "fmt.Printf": 0, + "fmt.Fprintf": 1, // first arg is io.Writer + "fmt.Errorf": 0, + "fmt.Fscanf": 1, + "fmt.Sscanf": 1, + "Sprintf": 0, // direct call after import + "Printf": 0, + "Errorf": 0, + + // log package + "log.Printf": 0, + "log.Fatalf": 0, + "log.Panicf": 0, + "log.Logf": 1, // first arg is log level + "Logger.Printf": 0, + "Logger.Fatalf": 0, + "Logger.Panicf": 0, + + // testing package + "testing.T.Logf": 0, + "testing.T.Errorf": 0, + "testing.T.Fatalf": 0, + "testing.T.Skipf": 0, + "testing.B.Logf": 0, + "testing.B.Errorf": 0, + "testing.B.Fatalf": 0, + "T.Logf": 0, + "T.Errorf": 0, + "T.Fatalf": 0, + "B.Logf": 0, + "B.Errorf": 0, + "B.Fatalf": 0, + + // errors package + "errors.Errorf": 0, + "errors.Wrapf": 1, // first arg is error + + // pkg/errors + "errors.WithMessagef": 1, + + // logrus + "logrus.Infof": 0, + "logrus.Warnf": 0, + "logrus.Errorf": 0, + "logrus.Debugf": 0, + "logrus.Fatalf": 0, + "logrus.Panicf": 0, + "logrus.Tracef": 0, + "logrus.Printf": 0, + "Entry.Infof": 0, + "Entry.Warnf": 0, + "Entry.Errorf": 0, + "Entry.Debugf": 0, + + // zap + "zap.S.Infof": 0, + "zap.S.Warnf": 0, + "zap.S.Errorf": 0, + "zap.S.Debugf": 0, + "zap.S.Fatalf": 0, + "zap.S.Panicf": 0, + "SugaredLogger.Infof": 0, + "SugaredLogger.Warnf": 0, + "SugaredLogger.Errorf": 0, + "SugaredLogger.Debugf": 0, +} + +// FormatStringAnalyzer analyzes format functions like fmt.Sprintf for SELECT * patterns. +type FormatStringAnalyzer struct { + pass *analysis.Pass + cfg *config.UnqueryvetSettings +} + +// NewFormatStringAnalyzer creates a new FormatStringAnalyzer. +func NewFormatStringAnalyzer(pass *analysis.Pass, cfg *config.UnqueryvetSettings) *FormatStringAnalyzer { + return &FormatStringAnalyzer{ + pass: pass, + cfg: cfg, + } +} + +// AnalyzeFormatCall analyzes a function call for format string patterns with SELECT *. +// Returns true if SELECT * was detected in the format string. +func (fsa *FormatStringAnalyzer) AnalyzeFormatCall(call *ast.CallExpr) bool { + // Get the function name + funcName := fsa.getFunctionName(call) + if funcName == "" { + return false + } + + // Check if this is a known format function + argIndex, ok := formatFunctions[funcName] + if !ok { + return false + } + + // Extract the format string + formatStr, ok := fsa.extractFormatString(call, argIndex) + if !ok { + return false + } + + // Check if the format string contains SELECT * + normalized := normalizeSQLQuery("\"" + formatStr + "\"") + return isSelectStarQuery(normalized, fsa.cfg) +} + +// getFunctionName extracts the function name from a call expression. +// Returns formats like "fmt.Sprintf", "log.Printf", or just "Sprintf". +func (fsa *FormatStringAnalyzer) getFunctionName(call *ast.CallExpr) string { + switch fun := call.Fun.(type) { + case *ast.SelectorExpr: + // Method call: pkg.Func() or obj.Method() + switch x := fun.X.(type) { + case *ast.Ident: + // pkg.Func() like fmt.Sprintf + return x.Name + "." + fun.Sel.Name + case *ast.SelectorExpr: + // Nested: pkg.subpkg.Func() or receiver.Type.Method() + if ident, ok := x.X.(*ast.Ident); ok { + return ident.Name + "." + x.Sel.Name + "." + fun.Sel.Name + } + // obj.Field.Method() + return x.Sel.Name + "." + fun.Sel.Name + case *ast.CallExpr: + // Chained: something().Method() + return fun.Sel.Name + } + return fun.Sel.Name + case *ast.Ident: + // Direct function call: Sprintf() (after import . "fmt") + return fun.Name + } + return "" +} + +// extractFormatString extracts the format string from a function call. +// argIndex specifies which argument contains the format string. +func (fsa *FormatStringAnalyzer) extractFormatString(call *ast.CallExpr, argIndex int) (string, bool) { + if argIndex < 0 || argIndex >= len(call.Args) { + return "", false + } + + arg := call.Args[argIndex] + + // Direct string literal + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + return strings.Trim(lit.Value, "`\""), true + } + + // Identifier (constant or variable) + if ident, ok := arg.(*ast.Ident); ok { + if ident.Obj != nil && ident.Obj.Kind == ast.Con { + // It's a constant - try to get its value + if valueSpec, ok := ident.Obj.Decl.(*ast.ValueSpec); ok { + for _, value := range valueSpec.Values { + if lit, ok := value.(*ast.BasicLit); ok && lit.Kind == token.STRING { + return strings.Trim(lit.Value, "`\""), true + } + } + } + } + } + + return "", false +} + +// CheckFormatFunction is a convenience function to check a call expression for SELECT *. +// It creates an analyzer and performs the check in one call. +func CheckFormatFunction(pass *analysis.Pass, call *ast.CallExpr, cfg *config.UnqueryvetSettings) bool { + analyzer := NewFormatStringAnalyzer(pass, cfg) + return analyzer.AnalyzeFormatCall(call) +} + +// IsFormatFunction checks if a call expression is a known format function. +func IsFormatFunction(call *ast.CallExpr) bool { + var funcName string + + switch fun := call.Fun.(type) { + case *ast.SelectorExpr: + switch x := fun.X.(type) { + case *ast.Ident: + funcName = x.Name + "." + fun.Sel.Name + case *ast.SelectorExpr: + if ident, ok := x.X.(*ast.Ident); ok { + funcName = ident.Name + "." + x.Sel.Name + "." + fun.Sel.Name + } else { + funcName = x.Sel.Name + "." + fun.Sel.Name + } + default: + funcName = fun.Sel.Name + } + case *ast.Ident: + funcName = fun.Name + } + + _, ok := formatFunctions[funcName] + return ok +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/bun.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/bun.go new file mode 100644 index 000000000..62bd63bde --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/bun.go @@ -0,0 +1,156 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// BunChecker checks github.com/uptrace/bun for SELECT * patterns. +type BunChecker struct{} + +// NewBunChecker creates a new BunChecker. +func NewBunChecker() *BunChecker { + return &BunChecker{} +} + +// Name returns the name of this checker. +func (c *BunChecker) Name() string { + return "bun" +} + +// IsApplicable checks if the call might be from bun. +func (c *BunChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // bun methods to check + bunMethods := []string{ + "NewSelect", "NewInsert", "NewUpdate", "NewDelete", + "Column", "ColumnExpr", "ExcludeColumn", + "Model", "Scan", "Exec", + "NewRaw", "Raw", + } + + for _, method := range bunMethods { + if sel.Sel.Name == method { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in bun calls. +func (c *BunChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Check ColumnExpr("*") + if methodName == "ColumnExpr" || methodName == "Column" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "bun " + methodName + "(\"*\") - explicitly specify columns", + Builder: "bun", + Context: "explicit_star", + } + } + } + } + } + + // Check NewRaw or Raw with SELECT * + if methodName == "NewRaw" || methodName == "Raw" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "bun Raw() with SELECT * - specify columns explicitly", + Builder: "bun", + Context: "raw_select_star", + } + } + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *BunChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Track chain state + hasNewSelect := false + hasColumn := false + var selectCall *ast.CallExpr + + // Traverse the call chain + current := call + for current != nil { + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + switch sel.Sel.Name { + case "NewSelect": + hasNewSelect = true + selectCall = current + case "Column", "ColumnExpr": + hasColumn = true + // Check for "*" argument + for _, arg := range current.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + violations = append(violations, &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "bun Column(\"*\") in chain - specify columns explicitly", + Builder: "bun", + Context: "chained_star", + }) + } + } + } + case "Scan", "Exec": + // Terminal methods - check if we have NewSelect without Column + if hasNewSelect && !hasColumn && selectCall != nil { + violations = append(violations, &SelectStarViolation{ + Pos: selectCall.Pos(), + End: current.End(), + Message: "bun NewSelect() with Scan/Exec without Column() defaults to SELECT *", + Builder: "bun", + Context: "implicit_star", + }) + } + } + + // Move to the next call in the chain + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + current = innerCall + } else { + break + } + } + + return violations +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/ent.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/ent.go new file mode 100644 index 000000000..f514bbb1c --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/ent.go @@ -0,0 +1,95 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" +) + +// EntChecker checks entgo.io/ent for SELECT * patterns. +type EntChecker struct{} + +// NewEntChecker creates a new EntChecker. +func NewEntChecker() *EntChecker { + return &EntChecker{} +} + +// Name returns the name of this checker. +func (c *EntChecker) Name() string { + return "ent" +} + +// IsApplicable checks if the call might be from ent. +func (c *EntChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // ent methods that could result in SELECT * + entMethods := []string{ + "Query", "All", "Only", "OnlyX", "First", "FirstX", + "QueryContext", "Select", + } + + for _, method := range entMethods { + if sel.Sel.Name == method { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in ent calls. +func (c *EntChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + // ent typically doesn't have explicit SELECT * patterns + // The implicit SELECT * happens when Query().All() is called without Select() + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *EntChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Track chain state + hasQuery := false + hasSelect := false + var queryCall *ast.CallExpr + + // Traverse the call chain + current := call + for current != nil { + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + switch sel.Sel.Name { + case "Query": + hasQuery = true + queryCall = current + case "Select": + hasSelect = true + case "All", "Only", "OnlyX", "First", "FirstX": + // Terminal methods - check if we have Query without Select + if hasQuery && !hasSelect && queryCall != nil { + violations = append(violations, &SelectStarViolation{ + Pos: queryCall.Pos(), + End: current.End(), + Message: "ent Query() with All/Only without Select() fetches all columns - use Select() to specify columns", + Builder: "ent", + Context: "implicit_star", + }) + } + } + + // Move to the next call in the chain + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + current = innerCall + } else { + break + } + } + + return violations +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go new file mode 100644 index 000000000..1946ad252 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go @@ -0,0 +1,201 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// GORMChecker checks gorm.io/gorm for SELECT * patterns. +type GORMChecker struct{} + +// NewGORMChecker creates a new GORMChecker. +func NewGORMChecker() *GORMChecker { + return &GORMChecker{} +} + +// Name returns the name of this checker. +func (c *GORMChecker) Name() string { + return "gorm" +} + +// IsApplicable checks if the call might be from GORM. +func (c *GORMChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // GORM methods to check + gormMethods := []string{ + "Select", "Find", "First", "Last", "Take", "Scan", + "Model", "Table", "Raw", "Exec", "Pluck", + "Preload", "Joins", "Where", "Or", "Not", + } + + for _, method := range gormMethods { + if sel.Sel.Name == method { + return true + } + } + + // Check for gorm package or DB type + if ident, ok := sel.X.(*ast.Ident); ok { + lowerName := strings.ToLower(ident.Name) + if lowerName == "gorm" || lowerName == "db" { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in GORM calls. +func (c *GORMChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Check db.Select("*") + if methodName == "Select" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Select(\"*\") - explicitly specify columns", + Builder: "gorm", + Context: "explicit_star", + } + } + // Check for SELECT * in raw SQL inside Select + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Select() contains SELECT * - specify columns explicitly", + Builder: "gorm", + Context: "raw_select_star", + } + } + } + } + } + + // Check db.Raw("SELECT * FROM ...") + if methodName == "Raw" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Raw() with SELECT * - specify columns explicitly", + Builder: "gorm", + Context: "raw_select_star", + } + } + } + } + } + + // Check db.Exec("SELECT * FROM ...") + if methodName == "Exec" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Exec() with SELECT * - specify columns explicitly", + Builder: "gorm", + Context: "raw_select_star", + } + } + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *GORMChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Track chain state + hasModel := false + hasSelect := false + var modelCall *ast.CallExpr + + // Traverse the call chain + current := call + for current != nil { + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + switch sel.Sel.Name { + case "Model", "Table": + hasModel = true + modelCall = current + case "Select": + hasSelect = true + // Check for "*" argument + for _, arg := range current.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + violations = append(violations, &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "GORM Select(\"*\") in chain - specify columns explicitly", + Builder: "gorm", + Context: "chained_star", + }) + } + } + } + case "Find", "First", "Last", "Take", "Scan": + // Terminal methods - check if we have Model without Select + if hasModel && !hasSelect && modelCall != nil { + violations = append(violations, &SelectStarViolation{ + Pos: modelCall.Pos(), + End: current.End(), + Message: "GORM Model() with Find/First without Select() defaults to SELECT *", + Builder: "gorm", + Context: "implicit_star", + }) + } + case "Preload": + // Preload often uses SELECT * for eager loading - this is common but worth flagging + if len(current.Args) > 0 { + // Only flag if there's no second argument (no custom SQL) + if len(current.Args) == 1 { + // Could add a warning about Preload SELECT * + } + } + } + + // Move to the next call in the chain + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + current = innerCall + } else { + break + } + } + + return violations +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go new file mode 100644 index 000000000..ba7646fb4 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go @@ -0,0 +1,107 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + + "github.com/MirrexOne/unqueryvet/pkg/config" +) + +// SelectStarViolation represents a detected SELECT * usage in SQL builder code. +type SelectStarViolation struct { + // Pos is the position in source code where the violation was detected + Pos token.Pos + // End is the end position of the violation + End token.Pos + // Message is the human-readable description of the violation + Message string + // Builder is the name of the SQL builder library + Builder string + // Context provides additional context about the violation type + Context string +} + +// SQLBuilderChecker is the interface for SQL builder library-specific checkers. +// Each SQL builder library (GORM, sqlx, etc.) implements this interface. +type SQLBuilderChecker interface { + // Name returns the name of the SQL builder library + Name() string + + // IsApplicable checks if the call expression might be from this SQL builder + IsApplicable(call *ast.CallExpr) bool + + // CheckSelectStar checks a single call expression for SELECT * usage + CheckSelectStar(call *ast.CallExpr) *SelectStarViolation + + // CheckChainedCalls analyzes method chains for SELECT * patterns + CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation +} + +// Registry holds all registered SQL builder checkers and provides a unified interface. +type Registry struct { + checkers []SQLBuilderChecker +} + +// NewRegistry creates a new Registry with checkers based on the configuration. +func NewRegistry(cfg *config.SQLBuildersConfig) *Registry { + r := &Registry{ + checkers: make([]SQLBuilderChecker, 0), + } + + // Register enabled checkers + if cfg.Squirrel { + r.checkers = append(r.checkers, NewSquirrelChecker()) + } + if cfg.GORM { + r.checkers = append(r.checkers, NewGORMChecker()) + } + if cfg.SQLx { + r.checkers = append(r.checkers, NewSQLxChecker()) + } + if cfg.Ent { + r.checkers = append(r.checkers, NewEntChecker()) + } + if cfg.PGX { + r.checkers = append(r.checkers, NewPGXChecker()) + } + if cfg.Bun { + r.checkers = append(r.checkers, NewBunChecker()) + } + if cfg.SQLBoiler { + r.checkers = append(r.checkers, NewSQLBoilerChecker()) + } + if cfg.Jet { + r.checkers = append(r.checkers, NewJetChecker()) + } + + return r +} + +// Check analyzes a call expression against all registered checkers. +// Returns all violations found across all applicable checkers. +func (r *Registry) Check(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + for _, checker := range r.checkers { + if !checker.IsApplicable(call) { + continue + } + + // Check for direct SELECT * usage + if v := checker.CheckSelectStar(call); v != nil { + violations = append(violations, v) + } + + // Check for SELECT * in method chains + chainViolations := checker.CheckChainedCalls(call) + violations = append(violations, chainViolations...) + } + + return violations +} + +// HasCheckers returns true if at least one checker is registered. +func (r *Registry) HasCheckers() bool { + return len(r.checkers) > 0 +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go new file mode 100644 index 000000000..ff5f123de --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go @@ -0,0 +1,192 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// JetChecker checks github.com/go-jet/jet for SELECT * patterns. +type JetChecker struct{} + +// NewJetChecker creates a new JetChecker. +func NewJetChecker() *JetChecker { + return &JetChecker{} +} + +// Name returns the name of this checker. +func (c *JetChecker) Name() string { + return "jet" +} + +// IsApplicable checks if the call might be from jet. +func (c *JetChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + // Check for direct SELECT call + if ident, ok := call.Fun.(*ast.Ident); ok { + return ident.Name == "SELECT" || ident.Name == "RawStatement" + } + return false + } + + // jet methods to check + jetMethods := []string{ + "SELECT", "FROM", "WHERE", + "AllColumns", "Star", + "RawStatement", "Raw", + } + + for _, method := range jetMethods { + if sel.Sel.Name == method { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in jet calls. +func (c *JetChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + // Check for direct SELECT function call + if ident, ok := call.Fun.(*ast.Ident); ok { + if ident.Name == "SELECT" { + // Check arguments for AllColumns or STAR + for _, arg := range call.Args { + if c.isAllColumnsOrStar(arg) { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet SELECT with AllColumns/STAR - specify columns explicitly", + Builder: "jet", + Context: "explicit_star", + } + } + } + } + + if ident.Name == "RawStatement" { + // Check for SELECT * in raw statement + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet RawStatement with SELECT * - specify columns explicitly", + Builder: "jet", + Context: "raw_select_star", + } + } + } + } + } + } + + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Check for table.AllColumns + if methodName == "AllColumns" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet AllColumns fetches all columns (SELECT *) - specify columns explicitly", + Builder: "jet", + Context: "all_columns", + } + } + + // Check for STAR constant usage + if methodName == "Star" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet Star() - avoid SELECT * and specify columns explicitly", + Builder: "jet", + Context: "explicit_star", + } + } + + // Check RawStatement + if methodName == "RawStatement" || methodName == "Raw" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet Raw/RawStatement with SELECT * - specify columns explicitly", + Builder: "jet", + Context: "raw_select_star", + } + } + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *JetChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Traverse the call chain looking for SELECT with AllColumns + current := call + for current != nil { + // Check arguments for AllColumns + for _, arg := range current.Args { + if c.isAllColumnsOrStar(arg) { + violations = append(violations, &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "Jet SELECT chain contains AllColumns/STAR - specify columns explicitly", + Builder: "jet", + Context: "chained_star", + }) + } + } + + // Move to the next call in the chain + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + current = innerCall + } else { + break + } + } + + return violations +} + +// isAllColumnsOrStar checks if an expression represents AllColumns or STAR. +func (c *JetChecker) isAllColumnsOrStar(expr ast.Expr) bool { + switch e := expr.(type) { + case *ast.SelectorExpr: + // table.AllColumns or package.STAR + return e.Sel.Name == "AllColumns" || e.Sel.Name == "STAR" + case *ast.CallExpr: + // Check if it's a call to AllColumns() or Star() + if sel, ok := e.Fun.(*ast.SelectorExpr); ok { + return sel.Sel.Name == "AllColumns" || sel.Sel.Name == "Star" + } + case *ast.Ident: + // Direct STAR identifier + return e.Name == "STAR" || e.Name == "AllColumns" + } + return false +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go new file mode 100644 index 000000000..9b44fc156 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go @@ -0,0 +1,94 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// PGXChecker checks github.com/jackc/pgx for SELECT * patterns. +type PGXChecker struct{} + +// NewPGXChecker creates a new PGXChecker. +func NewPGXChecker() *PGXChecker { + return &PGXChecker{} +} + +// Name returns the name of this checker. +func (c *PGXChecker) Name() string { + return "pgx" +} + +// IsApplicable checks if the call might be from pgx. +func (c *PGXChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // pgx methods that take SQL queries + pgxMethods := []string{ + "Query", "QueryRow", "QueryFunc", + "Exec", "SendBatch", + "Prepare", "CopyFrom", + } + + for _, method := range pgxMethods { + if sel.Sel.Name == method { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in pgx calls. +func (c *PGXChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // pgx methods where the SQL query is typically the second argument (after context) + queryArgIndex := 1 + switch methodName { + case "Query", "QueryRow", "Exec", "Prepare": + // conn.Query(ctx, sql, args...) + queryArgIndex = 1 + case "QueryFunc": + // conn.QueryFunc(ctx, sql, args, func...) + queryArgIndex = 1 + default: + return nil + } + + if queryArgIndex >= len(call.Args) { + return nil + } + + arg := call.Args[queryArgIndex] + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "pgx " + methodName + "() with SELECT * - specify columns explicitly", + Builder: "pgx", + Context: "raw_select_star", + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *PGXChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + // pgx doesn't have significant chaining patterns + return nil +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlboiler.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlboiler.go new file mode 100644 index 000000000..f4394c602 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlboiler.go @@ -0,0 +1,144 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// SQLBoilerChecker checks github.com/volatiletech/sqlboiler for SELECT * patterns. +type SQLBoilerChecker struct{} + +// NewSQLBoilerChecker creates a new SQLBoilerChecker. +func NewSQLBoilerChecker() *SQLBoilerChecker { + return &SQLBoilerChecker{} +} + +// Name returns the name of this checker. +func (c *SQLBoilerChecker) Name() string { + return "sqlboiler" +} + +// IsApplicable checks if the call might be from sqlboiler. +func (c *SQLBoilerChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // SQLBoiler methods + sqlboilerMethods := []string{ + "All", "One", "Count", "Exists", + "Select", "Load", "Reload", + } + + for _, method := range sqlboilerMethods { + if sel.Sel.Name == method { + return true + } + } + + // Check for qm (query mods) package + if ident, ok := sel.X.(*ast.Ident); ok { + if ident.Name == "qm" { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in sqlboiler calls. +func (c *SQLBoilerChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Check qm.Select("*") + if methodName == "Select" { + // Check if caller is qm package + if ident, ok := sel.X.(*ast.Ident); ok && ident.Name == "qm" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQLBoiler qm.Select(\"*\") - explicitly specify columns", + Builder: "sqlboiler", + Context: "explicit_star", + } + } + } + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *SQLBoilerChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // SQLBoiler uses query mods passed to model methods + // Example: models.Users(qm.Select("*")).All(ctx, db) + + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return violations + } + + // Check terminal methods + if sel.Sel.Name == "All" || sel.Sel.Name == "One" { + // Look for the model call that might have query mods + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + // Check query mod arguments for Select("*") + hasSelect := false + for _, arg := range innerCall.Args { + // Check if this is a qm.Select call + if callExpr, ok := arg.(*ast.CallExpr); ok { + if innerSel, ok := callExpr.Fun.(*ast.SelectorExpr); ok { + if innerSel.Sel.Name == "Select" { + hasSelect = true + // Check for "*" + for _, selectArg := range callExpr.Args { + if lit, ok := selectArg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + violations = append(violations, &SelectStarViolation{ + Pos: callExpr.Pos(), + End: callExpr.End(), + Message: "SQLBoiler qm.Select(\"*\") - specify columns explicitly", + Builder: "sqlboiler", + Context: "explicit_star", + }) + } + } + } + } + } + } + } + + // If no Select query mod, it defaults to SELECT * + if !hasSelect && len(innerCall.Args) == 0 { + // Model().All() without query mods = SELECT * + violations = append(violations, &SelectStarViolation{ + Pos: innerCall.Pos(), + End: call.End(), + Message: "SQLBoiler model().All() without qm.Select() defaults to SELECT *", + Builder: "sqlboiler", + Context: "implicit_star", + }) + } + } + } + + return violations +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlx.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlx.go new file mode 100644 index 000000000..21e7ba804 --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlx.go @@ -0,0 +1,100 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// SQLxChecker checks github.com/jmoiron/sqlx for SELECT * patterns. +type SQLxChecker struct{} + +// NewSQLxChecker creates a new SQLxChecker. +func NewSQLxChecker() *SQLxChecker { + return &SQLxChecker{} +} + +// Name returns the name of this checker. +func (c *SQLxChecker) Name() string { + return "sqlx" +} + +// IsApplicable checks if the call might be from sqlx. +func (c *SQLxChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // sqlx methods that take SQL queries + sqlxMethods := []string{ + "Select", "Get", "Queryx", "QueryRowx", + "NamedQuery", "NamedExec", "MustExec", + "Preparex", "PreparexContext", "PrepareNamed", + "Rebind", "In", + } + + for _, method := range sqlxMethods { + if sel.Sel.Name == method { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in sqlx calls. +func (c *SQLxChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Methods where the SQL query is typically the first or second argument + queryArgIndex := 0 + switch methodName { + case "Select", "Get": + // db.Select(&dest, query, args...) + // db.Get(&dest, query, args...) + queryArgIndex = 1 + case "Queryx", "QueryRowx", "MustExec", "NamedExec": + // db.Queryx(query, args...) + queryArgIndex = 0 + case "NamedQuery": + // db.NamedQuery(query, arg) + queryArgIndex = 0 + default: + return nil + } + + if queryArgIndex >= len(call.Args) { + return nil + } + + arg := call.Args[queryArgIndex] + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + upperValue := strings.ToUpper(value) + if strings.Contains(upperValue, "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "sqlx " + methodName + "() with SELECT * - specify columns explicitly", + Builder: "sqlx", + Context: "raw_select_star", + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *SQLxChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + // sqlx doesn't have significant chaining patterns like GORM + // Most queries are single method calls + return nil +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go new file mode 100644 index 000000000..cb2e4ccaf --- /dev/null +++ b/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go @@ -0,0 +1,190 @@ +// Package sqlbuilders provides SQL builder library-specific checkers for SELECT * detection. +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// SquirrelChecker checks github.com/Masterminds/squirrel for SELECT * patterns. +type SquirrelChecker struct{} + +// NewSquirrelChecker creates a new SquirrelChecker. +func NewSquirrelChecker() *SquirrelChecker { + return &SquirrelChecker{} +} + +// Name returns the name of this checker. +func (c *SquirrelChecker) Name() string { + return "squirrel" +} + +// IsApplicable checks if the call might be from Squirrel. +func (c *SquirrelChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // Squirrel methods to check + squirrelMethods := []string{ + "Select", "Columns", "Column", + "SelectBuilder", "InsertBuilder", "UpdateBuilder", "DeleteBuilder", + } + + for _, method := range squirrelMethods { + if sel.Sel.Name == method { + return true + } + } + + // Check for squirrel package prefix + if ident, ok := sel.X.(*ast.Ident); ok { + if ident.Name == "squirrel" || ident.Name == "sq" { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in Squirrel calls. +func (c *SquirrelChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // Check squirrel.Select("*") or builder.Select("*") + if methodName == "Select" { + // Empty Select() means SELECT * + if len(call.Args) == 0 { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Squirrel Select() without columns defaults to SELECT * - add specific columns", + Builder: "squirrel", + Context: "empty_select", + } + } + + // Check for "*" in arguments + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" || value == "" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Squirrel Select(\"*\") - explicitly specify columns", + Builder: "squirrel", + Context: "explicit_star", + } + } + } + } + } + + // Check Columns("*") or Column("*") + if methodName == "Columns" || methodName == "Column" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Squirrel Columns(\"*\") - explicitly specify columns", + Builder: "squirrel", + Context: "explicit_star", + } + } + } + } + } + + return nil +} + +// CheckChainedCalls checks method chains for SELECT * patterns. +func (c *SquirrelChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Traverse the call chain + current := call + hasSelect := false + hasColumns := false + var selectCall *ast.CallExpr + + for current != nil { + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + switch sel.Sel.Name { + case "Select": + hasSelect = true + selectCall = current + // Check if Select has arguments + if len(current.Args) > 0 { + hasColumns = true + // Check for "*" argument + for _, arg := range current.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + violations = append(violations, &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "Squirrel Select(\"*\") in chain - specify columns explicitly", + Builder: "squirrel", + Context: "chained_star", + }) + } + } + } + } + case "Columns", "Column": + hasColumns = true + // Check for "*" in Columns/Column + for _, arg := range current.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + violations = append(violations, &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "Squirrel Columns(\"*\") in chain - specify columns explicitly", + Builder: "squirrel", + Context: "chained_star", + }) + } + } + } + case "From", "Where", "Join", "LeftJoin", "RightJoin", "InnerJoin": + // Terminal methods - check if we have Select without columns + if hasSelect && !hasColumns && selectCall != nil && len(selectCall.Args) == 0 { + violations = append(violations, &SelectStarViolation{ + Pos: selectCall.Pos(), + End: selectCall.End(), + Message: "Squirrel Select() without columns in chain defaults to SELECT *", + Builder: "squirrel", + Context: "empty_select_chain", + }) + } + } + + // Move to the next call in the chain + if innerCall, ok := sel.X.(*ast.CallExpr); ok { + current = innerCall + } else { + break + } + } + + return violations +} diff --git a/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go b/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go index 034c324d1..1f201b526 100644 --- a/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go +++ b/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go @@ -9,12 +9,89 @@ type UnqueryvetSettings struct { // AllowedPatterns is a list of regex patterns that are allowed to use SELECT * // Example: ["SELECT \\* FROM temp_.*", "SELECT \\* FROM .*_backup"] AllowedPatterns []string `mapstructure:"allowed-patterns" json:"allowed-patterns" yaml:"allowed-patterns"` + + // IgnoredFunctions is a list of function name patterns to ignore + // Example: ["debug.Query", "test.*", "mock.*"] + IgnoredFunctions []string `mapstructure:"ignored-functions" json:"ignored-functions" yaml:"ignored-functions"` + + // IgnoredFiles is a list of glob patterns for files to ignore + // Example: ["*_test.go", "testdata/**", "mock_*.go"] + IgnoredFiles []string `mapstructure:"ignored-files" json:"ignored-files" yaml:"ignored-files"` + + // Severity defines the diagnostic severity: "error" or "warning" (default: "warning") + Severity string `mapstructure:"severity" json:"severity" yaml:"severity"` + + // CheckAliasedWildcard enables detection of SELECT alias.* patterns (e.g., SELECT t.* FROM users t) + CheckAliasedWildcard bool `mapstructure:"check-aliased-wildcard" json:"check-aliased-wildcard" yaml:"check-aliased-wildcard"` + + // CheckStringConcat enables detection of SELECT * in string concatenation (e.g., "SELECT * " + "FROM users") + CheckStringConcat bool `mapstructure:"check-string-concat" json:"check-string-concat" yaml:"check-string-concat"` + + // CheckFormatStrings enables detection of SELECT * in format functions (e.g., fmt.Sprintf) + CheckFormatStrings bool `mapstructure:"check-format-strings" json:"check-format-strings" yaml:"check-format-strings"` + + // CheckStringBuilder enables detection of SELECT * in strings.Builder usage + CheckStringBuilder bool `mapstructure:"check-string-builder" json:"check-string-builder" yaml:"check-string-builder"` + + // CheckSubqueries enables detection of SELECT * in subqueries (e.g., SELECT * FROM (SELECT * FROM ...)) + CheckSubqueries bool `mapstructure:"check-subqueries" json:"check-subqueries" yaml:"check-subqueries"` + + // SQLBuilders defines which SQL builder libraries to check + SQLBuilders SQLBuildersConfig `mapstructure:"sql-builders" json:"sql-builders" yaml:"sql-builders"` +} + +// SQLBuildersConfig defines which SQL builder libraries to analyze. +type SQLBuildersConfig struct { + // Squirrel enables checking github.com/Masterminds/squirrel + Squirrel bool `mapstructure:"squirrel" json:"squirrel" yaml:"squirrel"` + + // GORM enables checking gorm.io/gorm + GORM bool `mapstructure:"gorm" json:"gorm" yaml:"gorm"` + + // SQLx enables checking github.com/jmoiron/sqlx + SQLx bool `mapstructure:"sqlx" json:"sqlx" yaml:"sqlx"` + + // Ent enables checking entgo.io/ent + Ent bool `mapstructure:"ent" json:"ent" yaml:"ent"` + + // PGX enables checking github.com/jackc/pgx + PGX bool `mapstructure:"pgx" json:"pgx" yaml:"pgx"` + + // Bun enables checking github.com/uptrace/bun + Bun bool `mapstructure:"bun" json:"bun" yaml:"bun"` + + // SQLBoiler enables checking github.com/volatiletech/sqlboiler + SQLBoiler bool `mapstructure:"sqlboiler" json:"sqlboiler" yaml:"sqlboiler"` + + // Jet enables checking github.com/go-jet/jet + Jet bool `mapstructure:"jet" json:"jet" yaml:"jet"` +} + +// DefaultSQLBuildersConfig returns the default SQL builders configuration with all checkers enabled. +func DefaultSQLBuildersConfig() SQLBuildersConfig { + return SQLBuildersConfig{ + Squirrel: true, + GORM: true, + SQLx: true, + Ent: true, + PGX: true, + Bun: true, + SQLBoiler: true, + Jet: true, + } } -// DefaultSettings returns the default configuration for unqueryvet +// DefaultSettings returns the default configuration for unqueryvet. +// By default, all detection features are enabled for maximum coverage. func DefaultSettings() UnqueryvetSettings { return UnqueryvetSettings{ - CheckSQLBuilders: true, + CheckSQLBuilders: true, + CheckAliasedWildcard: true, + CheckStringConcat: true, + CheckFormatStrings: true, + CheckStringBuilder: true, + CheckSubqueries: true, + Severity: "warning", AllowedPatterns: []string{ `(?i)COUNT\(\s*\*\s*\)`, `(?i)MAX\(\s*\*\s*\)`, @@ -23,5 +100,8 @@ func DefaultSettings() UnqueryvetSettings { `(?i)SELECT \* FROM pg_catalog\..*`, `(?i)SELECT \* FROM sys\..*`, }, + IgnoredFunctions: []string{}, + IgnoredFiles: []string{}, + SQLBuilders: DefaultSQLBuildersConfig(), } } diff --git a/vendor/github.com/alecthomas/chroma/v2/Dockerfile b/vendor/github.com/alecthomas/chroma/v2/Dockerfile index e2a153133..bd55da067 100644 --- a/vendor/github.com/alecthomas/chroma/v2/Dockerfile +++ b/vendor/github.com/alecthomas/chroma/v2/Dockerfile @@ -29,7 +29,7 @@ ENV GOARCH=amd64 RUN make build/chromad # Runtime stage -FROM alpine:3.22 AS runtime +FROM alpine:3.23 AS runtime # Install ca-certificates for HTTPS requests RUN apk --no-cache add ca-certificates curl diff --git a/vendor/github.com/alecthomas/chroma/v2/README.md b/vendor/github.com/alecthomas/chroma/v2/README.md index b65c32523..0cfa07f41 100644 --- a/vendor/github.com/alecthomas/chroma/v2/README.md +++ b/vendor/github.com/alecthomas/chroma/v2/README.md @@ -35,10 +35,10 @@ translators for Pygments lexers and styles. ## Supported languages | Prefix | Language -| :----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| :----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, Agda, AL, Alloy, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, ArmAsm, ATL, AutoHotkey, AutoIt, Awk | B | Ballerina, Bash, Bash Session, Batchfile, Beef, BibTeX, Bicep, BlitzBasic, BNF, BQN, Brainfuck -| C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Core, Crystal, CSS, CSV, CUE, Cython +| C | C, C#, C++, C3, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Core, Crystal, CSS, CSV, CUE, Cython | D | D, Dart, Dax, Desktop file, Diff, Django/Jinja, dns, Docker, DTD, Dylan | E | EBNF, Elixir, Elm, EmacsLisp, Erlang | F | Factor, Fennel, Fish, Forth, Fortran, FortranFixed, FSharp @@ -46,19 +46,19 @@ translators for Pygments lexers and styles. | H | Handlebars, Hare, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HolyC, HTML, HTTP, Hy | I | Idris, Igor, INI, Io, ISCdhcpd | J | J, Janet, Java, JavaScript, JSON, JSONata, Jsonnet, Julia, Jungle -| K | Kotlin +| K | Kakoune, Kotlin | L | Lean4, Lighttpd configuration file, LLVM, lox, Lua -| M | Makefile, Mako, markdown, Mason, Materialize SQL dialect, Mathematica, Matlab, MCFunction, Meson, Metal, MiniZinc, MLIR, Modula-2, Mojo, MonkeyC, MoonScript, MorrowindScript, Myghty, MySQL +| M | Makefile, Mako, markdown, Mason, Materialize SQL dialect, Mathematica, Matlab, MCFunction, Meson, Metal, MiniZinc, MLIR, Modelica, Modula-2, Mojo, MonkeyC, MoonScript, MorrowindScript, Myghty, MySQL | N | NASM, Natural, NDISASM, Newspeak, Nginx configuration file, Nim, Nix, NSIS, Nu | O | Objective-C, ObjectPascal, OCaml, Octave, Odin, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode -| P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, Promela, PromQL, properties, Protocol Buffer, PRQL, PSL, Puppet, Python, Python 2 +| P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, Promela, PromQL, properties, Protocol Buffer, Protocol Buffer Text Format, PRQL, PSL, Puppet, Python, Python 2 | Q | QBasic, QML -| R | R, Racket, Ragel, Raku, react, ReasonML, reg, Rego, reStructuredText, Rexx, RPGLE, RPMSpec, Ruby, Rust +| R | R, Racket, Ragel, Raku, react, ReasonML, reg, Rego, reStructuredText, Rexx, RGBDS Assembly, Ring, RPGLE, RPMSpec, Ruby, Rust | S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Sieve, Smali, Smalltalk, Smarty, SNBT, Snobol, Solidity, SourcePawn, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog | T | TableGen, Tal, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, Typst | U | ucode | V | V, V shell, Vala, VB.net, verilog, VHDL, VHS, VimL, vue -| W | WDTE, WebGPU Shading Language, WebVTT, Whiley +| W | WDTE, WebAssembly Text Format, WebGPU Shading Language, WebVTT, Whiley | X | XML, Xorg | Y | YAML, YANG | Z | Z80 Assembly, Zed, Zig @@ -209,7 +209,7 @@ using the included Python 3 script `pygments2chroma_xml.py`. I use something lik the following: ```sh -python3 _tools/pygments2chroma_xml.py \ +uv run --script _tools/pygments2chroma_xml.py \ pygments.lexers.jvm.KotlinLexer \ > lexers/embedded/kotlin.xml ``` @@ -272,7 +272,7 @@ for that setup the `chroma` executable can be just symlinked to `~/.lessfilter`. ## Projects using Chroma -* [`moar`](https://github.com/walles/moar) is a full-blown pager that colorizes +* [`moor`](https://github.com/walles/moor) is a full-blown pager that colorizes its input using Chroma * [Hugo](https://gohugo.io/) is a static site generator that [uses Chroma for syntax highlighting code examples](https://gohugo.io/content-management/syntax-highlighting/) diff --git a/vendor/github.com/alecthomas/chroma/v2/iterator.go b/vendor/github.com/alecthomas/chroma/v2/iterator.go index b1e0b57b6..cf39bb577 100644 --- a/vendor/github.com/alecthomas/chroma/v2/iterator.go +++ b/vendor/github.com/alecthomas/chroma/v2/iterator.go @@ -58,6 +58,7 @@ func Literator(tokens ...Token) Iterator { // SplitTokensIntoLines splits tokens containing newlines in two. func SplitTokensIntoLines(tokens []Token) (out [][]Token) { var line []Token // nolint: prealloc +tokenLoop: for _, token := range tokens { for strings.Contains(token.Value, "\n") { parts := strings.SplitAfterN(token.Value, "\n", 2) @@ -70,6 +71,11 @@ func SplitTokensIntoLines(tokens []Token) (out [][]Token) { line = append(line, clone) out = append(out, line) line = nil + + // If the tail token is empty, don't emit it. + if len(token.Value) == 0 { + continue tokenLoop + } } line = append(line, token) } @@ -83,5 +89,5 @@ func SplitTokensIntoLines(tokens []Token) (out [][]Token) { out = out[:len(out)-1] } } - return + return out } diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c3.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c3.xml new file mode 100644 index 000000000..8094ce4b8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/c3.xml @@ -0,0 +1,374 @@ + + + C3 + c3 + *.c3 + *.c3i + *.c3t + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/core.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/core.xml index c5aa432c9..f0a9d2905 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/core.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/core.xml @@ -13,13 +13,13 @@ - + - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/css.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/css.xml index 5491fe464..adc13c75a 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/css.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/css.xml @@ -191,7 +191,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/d.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/d.xml index 3c030e227..19c85e2c8 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/d.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/d.xml @@ -15,10 +15,10 @@ - + - + @@ -130,4 +130,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/devicetree.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/devicetree.xml new file mode 100644 index 000000000..2db54ddc5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/devicetree.xml @@ -0,0 +1,251 @@ + + + Devicetree + devicetree + dts + *.dts + *.dtsi + text/x-devicetree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml index 08f3870be..3f1de09cb 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ini.xml @@ -9,6 +9,13 @@ *.inf *.service *.socket + *.container + *.network + *.build + *.pod + *.kube + *.volume + *.image .gitconfig .editorconfig pylintrc @@ -42,4 +49,4 @@ - \ No newline at end of file + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kakoune.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kakoune.xml new file mode 100644 index 000000000..afc048960 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kakoune.xml @@ -0,0 +1,96 @@ + + + + Kakoune + kak + kakoune + kakrc + kakscript + *.kak + kakrc + application/x-sh + application/x-shellscript + text/x-shellscript + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kotlin.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kotlin.xml index ec02c4ef1..28bf2d8ba 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kotlin.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kotlin.xml @@ -113,9 +113,7 @@ - - - + @@ -137,8 +135,20 @@ - - + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lox.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lox.xml index 602885a20..8dec0a856 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lox.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lox.xml @@ -6,24 +6,6 @@ true - - - - - - - - - - - - - - - - - - @@ -39,23 +21,39 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -69,10 +67,7 @@ - - - - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/modelica.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/modelica.xml new file mode 100644 index 000000000..e5fa60f99 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/modelica.xml @@ -0,0 +1,106 @@ + + + Modelica + modelica + *.mo + text/x-modelica + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/python.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/python.xml index a58686ff1..eaa9c3076 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/python.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/python.xml @@ -6,6 +6,7 @@ sage python3 py3 + starlark *.py *.pyi *.pyw @@ -23,6 +24,7 @@ WORKSPACE.bazel MODULE.bazel REPO.bazel + *.star *.tac text/x-python application/x-python diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rgbasm.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rgbasm.xml new file mode 100644 index 000000000..6814ca1c7 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rgbasm.xml @@ -0,0 +1,239 @@ + + + RGBDS Assembly + rgbasm + *.asm + 0.5 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ring.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ring.xml new file mode 100644 index 000000000..44454ea8f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ring.xml @@ -0,0 +1,74 @@ + + + Ring + ring + *.ring + *.rh + *.rform + text/x-ring + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rpgle.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rpgle.xml index a74f3c66f..c74cd2c39 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rpgle.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/rpgle.xml @@ -11,7 +11,7 @@ text/x-sqlrpgle true - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/txtpb.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/txtpb.xml new file mode 100644 index 000000000..9cb48c031 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/txtpb.xml @@ -0,0 +1,162 @@ + + + Protocol Buffer Text Format + txtpb + *.txtpb + *.textproto + *.textpb + *.pbtxt + application/x-protobuf-text + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wat.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wat.xml new file mode 100644 index 000000000..4a7f7e465 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/wat.xml @@ -0,0 +1,149 @@ + + + WebAssembly Text Format + wast + wat + *.wat + *.wast + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/serialise.go b/vendor/github.com/alecthomas/chroma/v2/serialise.go index 645a5faab..3d7f6c5d5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/serialise.go +++ b/vendor/github.com/alecthomas/chroma/v2/serialise.go @@ -150,8 +150,12 @@ func NewXMLLexer(from fs.FS, path string) (*RegexLexer, error) { regexAnalysers := make([]regexAnalyse, 0, len(config.Analyse.Regexes)) + regexFlags := regexp2.None + if config.CaseInsensitive { + regexFlags = regexp2.IgnoreCase + } for _, ra := range config.Analyse.Regexes { - re, err := regexp2.Compile(ra.Pattern, regexp2.None) + re, err := regexp2.Compile(ra.Pattern, regexFlags) if err != nil { return nil, fmt.Errorf("%s: %q is not a valid analyser regex: %w", config.Name, ra.Pattern, err) } diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/ashen.xml b/vendor/github.com/alecthomas/chroma/v2/styles/ashen.xml new file mode 100644 index 000000000..c22b3fa55 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/ashen.xml @@ -0,0 +1,69 @@ + + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml b/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml new file mode 100644 index 000000000..37f589f98 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml @@ -0,0 +1,107 @@ + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml b/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml new file mode 100644 index 000000000..fd1cd880c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml @@ -0,0 +1,107 @@ + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/github.xml b/vendor/github.com/alecthomas/chroma/v2/styles/github.xml index d747f6538..dd6a56db4 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/github.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/github.xml @@ -1,6 +1,6 @@ \ No newline at end of file + + diff --git a/vendor/github.com/alexkohler/prealloc/pkg/math.go b/vendor/github.com/alexkohler/prealloc/pkg/math.go new file mode 100644 index 000000000..4335b0860 --- /dev/null +++ b/vendor/github.com/alexkohler/prealloc/pkg/math.go @@ -0,0 +1,117 @@ +package pkg + +import ( + "go/ast" + "go/token" + "strconv" +) + +func addIntExpr(x, y ast.Expr) ast.Expr { + if x == nil || y == nil { + return nil + } + + xInt, xOK := intValue(x) + yInt, yOK := intValue(y) + + if xOK && yOK { + return intExpr(xInt + yInt) + } + if xOK { + if xInt == 0 { + return y + } + if xInt < 0 { + return &ast.BinaryExpr{X: y, Op: token.SUB, Y: intExpr(-xInt)} + } + } + if yOK { + if yInt == 0 { + return x + } + if yInt < 0 { + return &ast.BinaryExpr{X: x, Op: token.SUB, Y: intExpr(-yInt)} + } + } + if unary, ok := y.(*ast.UnaryExpr); ok && unary.Op == token.SUB { + return &ast.BinaryExpr{X: x, Op: token.SUB, Y: unary.X} + } + return &ast.BinaryExpr{X: x, Op: token.ADD, Y: y} +} + +func subIntExpr(x, y ast.Expr) ast.Expr { + if unary, ok := y.(*ast.UnaryExpr); ok && unary.Op == token.SUB { + y = unary.X + } else { + y = &ast.UnaryExpr{Op: token.SUB, X: y} + } + return addIntExpr(x, y) +} + +func mulIntExpr(x, y ast.Expr) ast.Expr { + if x == nil || y == nil { + return nil + } + + xInt, xOK := intValue(x) + yInt, yOK := intValue(y) + + if xOK && yOK { + return intExpr(xInt * yInt) + } + if xOK { + if xInt == 0 { + return intExpr(0) + } + if xInt == 1 { + return y + } + } + if yOK { + if yInt == 0 { + return intExpr(0) + } + if yInt == 1 { + return x + } + } + return &ast.BinaryExpr{X: x, Op: token.MUL, Y: y} +} + +func intExpr(n int) *ast.BasicLit { + return &ast.BasicLit{Kind: token.INT, Value: strconv.Itoa(n)} +} + +func intValue(expr ast.Expr) (int, bool) { + var negate bool + for { + switch e := expr.(type) { + case *ast.UnaryExpr: + if e.Op == token.SUB { + negate = !negate + expr = e.X + continue + } + case *ast.CallExpr: + if ident, ok := e.Fun.(*ast.Ident); ok && len(e.Args) == 1 { + switch ident.Name { + case "byte", "rune", "int", "int8", "int16", "int32", "int64", + "uint", "uint8", "uint16", "uint32", "uint64", "uintptr": + expr = e.Args[0] + continue + } + } + } + break + } + + if lit, ok := expr.(*ast.BasicLit); ok && lit.Kind == token.INT { + if i, err := strconv.Atoi(lit.Value); err == nil { + if negate { + return -i, true + } + return i, true + } + } + return 0, false +} diff --git a/vendor/github.com/alexkohler/prealloc/pkg/prealloc.go b/vendor/github.com/alexkohler/prealloc/pkg/prealloc.go index 72d8b95f7..8e9db4b21 100644 --- a/vendor/github.com/alexkohler/prealloc/pkg/prealloc.go +++ b/vendor/github.com/alexkohler/prealloc/pkg/prealloc.go @@ -1,15 +1,27 @@ package pkg import ( - "fmt" + "bytes" "go/ast" + "go/format" "go/token" + "strconv" + + "golang.org/x/tools/go/analysis" ) type sliceDeclaration struct { - name string - // sType string - genD *ast.GenDecl + name string + pos token.Pos + level int // Nesting level of this slice. Will be disqualified if appended at a deeper level. + lenExpr ast.Expr // Initial length of this slice. + exclude bool // Whether this slice has been disqualified due to an unsupported pattern. + hasReturn bool // Whether a return statement has been found after the first append. Any subsequent appends will disqualify this slice in simple mode. +} + +type sliceAppend struct { + index int // Index of the target slice. + countExpr ast.Expr // Number of items appended. } type returnsVisitor struct { @@ -18,250 +30,587 @@ type returnsVisitor struct { includeRangeLoops bool includeForLoops bool // visitor fields - sliceDeclarations []*sliceDeclaration - preallocHints []Hint - returnsInsideOfLoop bool - arrayTypes []string + sliceDeclarations []*sliceDeclaration + sliceAppends []*sliceAppend + preallocHints []analysis.Diagnostic + level int // Current nesting level. Loops do not increment the level. + hasReturn bool // Whether a return statement has been found. Slices appended before and after a return are disqualified in simple mode. + hasGoto bool // Whether a goto statement has been found. Goto disqualifies pending and subsequent slices in simple mode. + hasBranch bool // Whether a branch statement has been found. Loops with branch statements are unsupported in simple mode. } -func Check(files []*ast.File, simple, includeRangeLoops, includeForLoops bool) []Hint { - hints := []Hint{} +func Check(files []*ast.File, simple, includeRangeLoops, includeForLoops bool) []analysis.Diagnostic { + retVis := &returnsVisitor{ + simple: simple, + includeRangeLoops: includeRangeLoops, + includeForLoops: includeForLoops, + } for _, f := range files { - retVis := &returnsVisitor{ - simple: simple, - includeRangeLoops: includeRangeLoops, - includeForLoops: includeForLoops, - } ast.Walk(retVis, f) - // if simple is true, then we actually have to check if we had returns - // inside of our loop. Otherwise, we can just report all messages. - if !retVis.simple || !retVis.returnsInsideOfLoop { - hints = append(hints, retVis.preallocHints...) - } } - - return hints + return retVis.preallocHints } -func contains(slice []string, item string) bool { - for _, s := range slice { - if s == item { - return true +func (v *returnsVisitor) Visit(node ast.Node) ast.Visitor { + switch s := node.(type) { + case *ast.FuncDecl: + if s.Body == nil { + return nil } - } + v.level = 0 + v.hasReturn = false + v.hasGoto = false + ast.Walk(v, s.Body) + return nil + + case *ast.FuncLit: + if s.Body == nil { + return nil + } + wasReturn := v.hasReturn + wasGoto := v.hasGoto + v.hasReturn = false + ast.Walk(v, s.Body) + v.hasReturn = wasReturn + v.hasGoto = wasGoto + return nil + + case *ast.BlockStmt: + declIdx := len(v.sliceDeclarations) + appendIdx := len(v.sliceAppends) + v.level++ + for _, stmt := range s.List { + ast.Walk(v, stmt) + } + v.level-- - return false -} + buf := bytes.NewBuffer(nil) + for i := declIdx; i < len(v.sliceDeclarations); i++ { + sliceDecl := v.sliceDeclarations[i] + if sliceDecl.exclude || v.hasGoto { + continue + } -func (v *returnsVisitor) Visit(node ast.Node) ast.Visitor { + capExpr := sliceDecl.lenExpr + for j := appendIdx; j < len(v.sliceAppends); j++ { + if v.sliceAppends[j] != nil && v.sliceAppends[j].index == i { + capExpr = addIntExpr(capExpr, v.sliceAppends[j].countExpr) + } + } + if capExpr == sliceDecl.lenExpr { + // nothing appended + continue + } + if capVal, ok := intValue(capExpr); ok && capVal <= 0 { + continue + } - v.sliceDeclarations = nil - v.returnsInsideOfLoop = false + buf.Reset() + buf.WriteString("Consider preallocating ") + buf.WriteString(sliceDecl.name) + if capExpr != nil { + undo := buf.Len() + buf.WriteString(" with capacity ") + if format.Node(buf, token.NewFileSet(), capExpr) != nil { + buf.Truncate(undo) + } + } + v.preallocHints = append(v.preallocHints, analysis.Diagnostic{ + Pos: sliceDecl.pos, + Message: buf.String(), + }) + } - switch n := node.(type) { - case *ast.TypeSpec: - if _, ok := n.Type.(*ast.ArrayType); ok { - if n.Name != nil { - v.arrayTypes = append(v.arrayTypes, n.Name.Name) + // discard slices and associated appends that are falling out of scope + v.sliceDeclarations = v.sliceDeclarations[:declIdx] + for i := appendIdx; i < len(v.sliceAppends); i++ { + if v.sliceAppends[i] != nil { + if v.sliceAppends[i].index >= declIdx { + v.sliceAppends[i] = nil + } else { + appendIdx = i + 1 + } } } - case *ast.FuncDecl: - if n.Body != nil { - for _, stmt := range n.Body.List { - switch s := stmt.(type) { - // Find non pre-allocated slices - case *ast.DeclStmt: - genD, ok := s.Decl.(*ast.GenDecl) - if !ok { + v.sliceAppends = v.sliceAppends[:appendIdx] + return nil + + case *ast.ValueSpec: + _, isArrayType := inferExprType(s.Type).(*ast.ArrayType) + for i, name := range s.Names { + var lenExpr ast.Expr + if i >= len(s.Values) { + if !isArrayType { + continue + } + lenExpr = intExpr(0) + } else if lenExpr = isCreateArray(s.Values[i]); lenExpr == nil { + if id, ok := s.Values[i].(*ast.Ident); !ok || id.Name != "nil" { + continue + } + lenExpr = intExpr(0) + } + v.sliceDeclarations = append(v.sliceDeclarations, &sliceDeclaration{name: name.Name, pos: s.Pos(), level: v.level, lenExpr: lenExpr}) + } + + case *ast.AssignStmt: + if len(s.Lhs) != len(s.Rhs) { + return nil + } + for i, lhs := range s.Lhs { + ident, ok := lhs.(*ast.Ident) + if !ok { + continue + } + if lenExpr := isCreateArray(s.Rhs[i]); lenExpr != nil { + v.sliceDeclarations = append(v.sliceDeclarations, &sliceDeclaration{name: ident.Name, pos: s.Pos(), level: v.level, lenExpr: lenExpr}) + } else { + declIdx := -1 + for i := len(v.sliceDeclarations) - 1; i >= 0; i-- { + if v.sliceDeclarations[i].name == ident.Name { + declIdx = i + break + } + } + if declIdx < 0 { + continue + } + sliceDecl := v.sliceDeclarations[declIdx] + switch expr := s.Rhs[i].(type) { + case *ast.Ident: + // create a new slice declaration when reinitializing an existing slice to nil + if s.Tok == token.ASSIGN && expr.Name == "nil" { + v.sliceDeclarations = append(v.sliceDeclarations, &sliceDeclaration{name: ident.Name, pos: s.Pos(), level: v.level, lenExpr: intExpr(0)}) continue } - if genD.Tok == token.TYPE { - for _, spec := range genD.Specs { - tSpec, ok := spec.(*ast.TypeSpec) - if !ok { + case *ast.CallExpr: + if len(expr.Args) >= 2 && !sliceDecl.hasReturn && sliceDecl.level == v.level { + if funIdent, ok := expr.Fun.(*ast.Ident); ok && funIdent.Name == "append" { + if rhsIdent, ok := expr.Args[0].(*ast.Ident); ok && ident.Name == rhsIdent.Name { + v.sliceAppends = append(v.sliceAppends, &sliceAppend{index: declIdx, countExpr: appendCount(expr)}) continue } - - if _, ok := tSpec.Type.(*ast.ArrayType); ok { - if tSpec.Name != nil { - v.arrayTypes = append(v.arrayTypes, tSpec.Name.Name) - } - } - } - } else if genD.Tok == token.VAR { - for _, spec := range genD.Specs { - vSpec, ok := spec.(*ast.ValueSpec) - if !ok { - continue - } - var isArrType bool - switch val := vSpec.Type.(type) { - case *ast.ArrayType: - isArrType = true - case *ast.Ident: - isArrType = contains(v.arrayTypes, val.Name) - } - if isArrType { - if vSpec.Names != nil { - /*atID, ok := arrayType.Elt.(*ast.Ident) - if !ok { - continue - }*/ - - // We should handle multiple slices declared on same line e.g. var mySlice1, mySlice2 []uint32 - for _, vName := range vSpec.Names { - v.sliceDeclarations = append(v.sliceDeclarations, &sliceDeclaration{name: vName.Name /*sType: atID.Name,*/, genD: genD}) - } - } - } } } + } + sliceDecl.exclude = true + } + } - case *ast.RangeStmt: - if v.includeRangeLoops { - if len(v.sliceDeclarations) == 0 { - continue - } - // Check the value being ranged over and ensure it's not a channel (we cannot offer any recommendations on channel ranges). - rangeIdent, ok := s.X.(*ast.Ident) - if ok && rangeIdent.Obj != nil { - valueSpec, ok := rangeIdent.Obj.Decl.(*ast.ValueSpec) - if ok { - if _, rangeTargetIsChannel := valueSpec.Type.(*ast.ChanType); rangeTargetIsChannel { - continue - } - } - } - if s.Body != nil { - v.handleLoops(s.Body) - } - } + case *ast.RangeStmt: + return v.walkLoop(v.includeRangeLoops, s.Body, func() (ast.Expr, bool) { return rangeLoopCount(s) }) - case *ast.ForStmt: - if v.includeForLoops { - if len(v.sliceDeclarations) == 0 { - continue - } - if s.Body != nil { - v.handleLoops(s.Body) - } - } + case *ast.ForStmt: + return v.walkLoop(v.includeForLoops, s.Body, func() (ast.Expr, bool) { return forLoopCount(s) }) - default: - } + case *ast.SwitchStmt: + return v.walkSwitchSelect(s.Body) + + case *ast.TypeSwitchStmt: + return v.walkSwitchSelect(s.Body) + + case *ast.SelectStmt: + return v.walkSwitchSelect(s.Body) + + case *ast.ReturnStmt: + if !v.simple { + return nil + } + v.hasReturn = true + // flag all slices that have been appended at least once + for _, sliceApp := range v.sliceAppends { + if sliceApp != nil { + v.sliceDeclarations[sliceApp.index].hasReturn = true } } + + case *ast.BranchStmt: + if !v.simple { + return nil + } + if s.Label != nil { + v.hasGoto = true + } else { + v.hasBranch = true + } } + return v } -// handleLoops is a helper function to share the logic required for both *ast.RangeLoops and *ast.ForLoops -func (v *returnsVisitor) handleLoops(blockStmt *ast.BlockStmt) { +func (v *returnsVisitor) walkLoop(include bool, body *ast.BlockStmt, loopCount func() (ast.Expr, bool)) ast.Visitor { + if len(v.sliceDeclarations) == 0 { + return v + } + if body == nil { + return nil + } - for _, stmt := range blockStmt.List { - switch bodyStmt := stmt.(type) { - case *ast.AssignStmt: - asgnStmt := bodyStmt - for index, expr := range asgnStmt.Rhs { - if index >= len(asgnStmt.Lhs) { - continue + appendIdx := len(v.sliceAppends) + hadBranch := v.hasBranch + v.hasBranch = false + v.level-- + ast.Walk(v, body) + v.level++ + + exclude := !include || v.hasReturn || v.hasGoto || v.hasBranch + var loopCountExpr ast.Expr + if !exclude { + var ok bool + loopCountExpr, ok = loopCount() + exclude = !ok + } + if exclude { + // exclude all slices that were appended within this loop + for i := appendIdx; i < len(v.sliceAppends); i++ { + if v.sliceAppends[i] != nil { + v.sliceDeclarations[v.sliceAppends[i].index].exclude = true + } + } + } else { + for i := range v.sliceDeclarations { + prev := -1 + for j := len(v.sliceAppends) - 1; j >= appendIdx; j-- { + if v.sliceAppends[j] != nil && v.sliceAppends[j].index == i { + if prev >= 0 { + // consolidate appends to the same slice + v.sliceAppends[j].countExpr = addIntExpr(v.sliceAppends[j].countExpr, v.sliceAppends[prev].countExpr) + v.sliceAppends[prev] = nil + } else if loopCountExpr == nil { + // make appends indeterminate if the loop count is indeterminate + v.sliceAppends[j].countExpr = nil + } + prev = j } + } + if prev >= 0 { + v.sliceAppends[prev].countExpr = mulIntExpr(v.sliceAppends[prev].countExpr, loopCountExpr) + } + } + } + v.hasBranch = hadBranch + return nil +} - lhsIdent, ok := asgnStmt.Lhs[index].(*ast.Ident) - if !ok { - continue - } +func (v *returnsVisitor) walkSwitchSelect(body *ast.BlockStmt) ast.Visitor { + hadBranch := v.hasBranch + v.hasBranch = false + ast.Walk(v, body) + v.hasBranch = hadBranch + return nil +} - callExpr, ok := expr.(*ast.CallExpr) - if !ok { - continue - } +func isCreateArray(expr ast.Expr) ast.Expr { + switch e := expr.(type) { + case *ast.CompositeLit: + // []any{...} + if _, ok := inferExprType(e.Type).(*ast.ArrayType); ok { + return intExpr(len(e.Elts)) + } + case *ast.CallExpr: + switch len(e.Args) { + case 1: + // []any(nil) + arg, ok := e.Args[0].(*ast.Ident) + if !ok || arg.Name != "nil" { + return nil + } + if _, ok = inferExprType(e.Fun).(*ast.ArrayType); ok { + return intExpr(0) + } + case 2: + // make([]any, n) + ident, ok := e.Fun.(*ast.Ident) + if ok && ident.Name == "make" { + return e.Args[1] + } + } + } + return nil +} - rhsFuncIdent, ok := callExpr.Fun.(*ast.Ident) - if !ok { - continue - } +func sliceLength(expr ast.Expr) ast.Expr { + if call, ok := expr.(*ast.CallExpr); ok { + if len(call.Args) == 1 { + if _, ok := call.Fun.(*ast.ArrayType); ok { + expr = call.Args[0] + } + } else if len(call.Args) >= 2 { + if funIdent, ok := call.Fun.(*ast.Ident); ok && funIdent.Name == "append" { + return addIntExpr(sliceLength(call.Args[0]), appendCount(call)) + } + } + } - if rhsFuncIdent.Name != "append" { - continue + switch xType := inferExprType(expr).(type) { + case *ast.ArrayType: + if lit, ok := expr.(*ast.CompositeLit); ok { + return intExpr(len(lit.Elts)) + } + case *ast.Ident: + if xType.Name == "string" { + if lit, ok := expr.(*ast.BasicLit); ok && lit.Kind == token.STRING { + if str, err := strconv.Unquote(lit.Value); err == nil { + return intExpr(len(str)) } + } + } + default: + return nil + } - // e.g., `x = append(x)` - // Pointless, but pre-allocation will not help. - if len(callExpr.Args) < 2 { - continue - } + if hasCall(expr) { + return nil + } - rhsIdent, ok := callExpr.Args[0].(*ast.Ident) - if !ok { - continue - } + if slice, ok := expr.(*ast.SliceExpr); ok { + high := slice.High + if high == nil { + high = &ast.CallExpr{Fun: ast.NewIdent("len"), Args: []ast.Expr{slice.X}} + } + if slice.Low != nil { + return subIntExpr(high, slice.Low) + } + return high + } - // e.g., `x = append(y, a)` - // This is weird (and maybe a logic error), - // but we cannot recommend pre-allocation. - if lhsIdent.Name != rhsIdent.Name { - continue - } + return &ast.CallExpr{Fun: ast.NewIdent("len"), Args: []ast.Expr{expr}} +} - // e.g., `x = append(x, y...)` - // we should ignore this. Pre-allocating in this case - // is confusing, and is not possible in general. - if callExpr.Ellipsis.IsValid() { - continue - } +func rangeLoopCount(stmt *ast.RangeStmt) (ast.Expr, bool) { + x := stmt.X + if call, ok := x.(*ast.CallExpr); ok { + if len(call.Args) == 1 { + if _, ok := call.Fun.(*ast.ArrayType); ok { + x = call.Args[0] + } + } else if len(call.Args) >= 2 { + if funIdent, ok := call.Fun.(*ast.Ident); ok && funIdent.Name == "append" { + return addIntExpr(sliceLength(call.Args[0]), appendCount(call)), true + } + } + } - for _, sliceDecl := range v.sliceDeclarations { - if sliceDecl.name == lhsIdent.Name { - // This is a potential mark, we just need to make sure there are no returns/continues in the - // range loop. - // now we just need to grab whatever we're ranging over - /*sxIdent, ok := s.X.(*ast.Ident) - if !ok { - continue - }*/ - - v.preallocHints = append(v.preallocHints, Hint{ - Pos: sliceDecl.genD.Pos(), - DeclaredSliceName: sliceDecl.name, - }) - } - } + xType := inferExprType(x) + + switch xType := xType.(type) { + case *ast.ChanType, *ast.FuncType: + return nil, false + case *ast.ArrayType: + if lit, ok := stmt.X.(*ast.CompositeLit); ok { + if xType.Len != nil { + return xType.Len, true } - case *ast.IfStmt: - ifStmt := bodyStmt - if ifStmt.Body != nil { - for _, ifBodyStmt := range ifStmt.Body.List { - // TODO should probably handle embedded ifs here - switch /*ift :=*/ ifBodyStmt.(type) { - case *ast.BranchStmt, *ast.ReturnStmt: - v.returnsInsideOfLoop = true - default: - } + return intExpr(len(lit.Elts)), true + } + case *ast.MapType: + if lit, ok := x.(*ast.CompositeLit); ok { + return intExpr(len(lit.Elts)), true + } + case *ast.StarExpr: + if xType, ok := xType.X.(*ast.ArrayType); !ok || xType.Len == nil { + return nil, true + } else if unary, ok := x.(*ast.UnaryExpr); ok && unary.Op == token.AND { + if _, ok := unary.X.(*ast.CompositeLit); ok { + return xType.Len, true + } + } + case *ast.Ident: + if xType.Name == "string" { + if lit, ok := x.(*ast.BasicLit); ok && lit.Kind == token.STRING { + if str, err := strconv.Unquote(lit.Value); err == nil { + return intExpr(len(str)), true } } + } + default: + return nil, true + } + if hasCall(x) { + return nil, true + } + + if ident, ok := xType.(*ast.Ident); ok { + switch ident.Name { + case "byte", "rune", "int", "int8", "int16", "int32", "int64", + "uint", "uint8", "uint16", "uint32", "uint64", "uintptr": + return x, true + case "string": default: + return nil, true + } + } + if slice, ok := x.(*ast.SliceExpr); ok { + high := slice.High + if high == nil { + high = &ast.CallExpr{Fun: ast.NewIdent("len"), Args: []ast.Expr{slice.X}} } + if slice.Low != nil { + return subIntExpr(high, slice.Low), true + } + return high, true } + return &ast.CallExpr{Fun: ast.NewIdent("len"), Args: []ast.Expr{x}}, true } -// Hint stores the information about an occurrence of a slice that could be -// preallocated. -type Hint struct { - Pos token.Pos - DeclaredSliceName string +func appendCount(expr *ast.CallExpr) ast.Expr { + if expr.Ellipsis.IsValid() { + return sliceLength(expr.Args[1]) + } + return intExpr(len(expr.Args) - 1) } -func (h Hint) String() string { - return fmt.Sprintf("%v: Consider preallocating %v", h.Pos, h.DeclaredSliceName) +func forLoopCount(stmt *ast.ForStmt) (ast.Expr, bool) { + if stmt.Init == nil || stmt.Cond == nil || stmt.Post == nil { + return nil, false + } + + initStmt, ok := stmt.Init.(*ast.AssignStmt) + if !ok { + return nil, true + } + + postStmt, ok := stmt.Post.(*ast.IncDecStmt) + if !ok { + return nil, true + } + + postIdent, ok := postStmt.X.(*ast.Ident) + if !ok { + return nil, true + } + + index := -1 + for i := range initStmt.Lhs { + if ident, ok := initStmt.Lhs[i].(*ast.Ident); ok && ident.Name == postIdent.Name { + index = i + break + } + } + if index < 0 { + return nil, true + } + + lower := initStmt.Rhs[index] + if hasCall(lower) { + return nil, true + } + + upper, op := forLoopUpperBound(stmt.Cond, postIdent.Name) + + if postStmt.Tok == token.INC { + if op == token.GTR || op == token.GEQ { + return nil, false + } + } else { + if op == token.LSS || op == token.LEQ { + return nil, false + } + lower, upper = upper, lower + } + + countExpr := subIntExpr(upper, lower) + if op == token.LEQ || op == token.GEQ { + countExpr = addIntExpr(countExpr, intExpr(1)) + } + return countExpr, true } -func (h Hint) StringFromFS(f *token.FileSet) string { - file := f.File(h.Pos) - lineNumber := file.Position(h.Pos).Line +func forLoopUpperBound(expr ast.Expr, name string) (ast.Expr, token.Token) { + binExpr, ok := expr.(*ast.BinaryExpr) + if !ok { + return nil, 0 + } - return fmt.Sprintf("%v:%v Consider preallocating %v", file.Name(), lineNumber, h.DeclaredSliceName) + switch binExpr.Op { + case token.LAND, token.LOR: + if xExpr, xOp := forLoopUpperBound(binExpr.X, name); xExpr != nil { + if yExpr, yOp := forLoopUpperBound(binExpr.Y, name); yExpr != nil { + if xOp == yOp { + var funName string + if binExpr.Op == token.LAND { + funName = "min" + } else { + funName = "max" + } + if call, ok := xExpr.(*ast.CallExpr); ok { + if ident, ok := call.Fun.(*ast.Ident); ok && ident.Name == funName { + call.Args = append(call.Args, yExpr) + return xExpr, xOp + } + } + if call, ok := yExpr.(*ast.CallExpr); ok { + if ident, ok := call.Fun.(*ast.Ident); ok && ident.Name == funName { + call.Args = append(call.Args, xExpr) + return yExpr, yOp + } + } + return &ast.CallExpr{Fun: ast.NewIdent(funName), Args: []ast.Expr{xExpr, yExpr}}, xOp + } + } + } + + case token.LSS, token.GTR, token.LEQ, token.GEQ, token.NEQ: + if ident, ok := binExpr.X.(*ast.Ident); ok && ident.Name == name { + if hasCall(binExpr.Y) { + return nil, 0 + } + return binExpr.Y, binExpr.Op + } else if ident, ok := binExpr.Y.(*ast.Ident); ok && ident.Name == name { + if hasCall(binExpr.X) { + return nil, 0 + } + // reverse the inequality + op := binExpr.Op + switch op { + case token.LSS: + op = token.GTR + case token.GTR: + op = token.LSS + case token.LEQ: + op = token.GEQ + case token.GEQ: + op = token.LEQ + default: + } + return binExpr.X, op + } + + default: + } + + return nil, 0 +} + +func hasCall(expr ast.Expr) bool { + var found bool + ast.Inspect(expr, func(n ast.Node) bool { + if call, ok := n.(*ast.CallExpr); ok { + switch fun := call.Fun.(type) { + case *ast.ArrayType, *ast.MapType: + // allow array/map type convertion + return true + case *ast.Ident: + switch fun.Name { + case "bool", "error", "string", "any", + "byte", "rune", "int", "int8", "int16", "int32", "int64", + "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", + "float32", "float64", "complex64", "complex128": + // allow built-in type conversions + if len(call.Args) == 1 { + return true + } + case "len", "cap", "real", "imag", "min", "max", "complex": + // allow cheap pure built-in functions + return true + } + } + found = true + } + return !found + }) + return found } diff --git a/vendor/github.com/alexkohler/prealloc/pkg/types.go b/vendor/github.com/alexkohler/prealloc/pkg/types.go new file mode 100644 index 000000000..6d0561590 --- /dev/null +++ b/vendor/github.com/alexkohler/prealloc/pkg/types.go @@ -0,0 +1,376 @@ +package pkg + +import ( + "go/ast" + "go/token" +) + +func inferExprType(expr ast.Expr) ast.Expr { + switch e := expr.(type) { + case *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType: + return e + case *ast.ParenExpr: + return inferExprType(e.X) + case *ast.SliceExpr: + return inferExprType(e.X) + case *ast.TypeAssertExpr: + return inferExprType(e.Type) + case *ast.CompositeLit: + return inferExprType(e.Type) + case *ast.Ellipsis: + return &ast.ArrayType{Elt: e.Elt} + case *ast.FuncLit: + return &ast.FuncType{Results: e.Type.Results} + case *ast.BasicLit: + return inferBasicType(e) + case *ast.BinaryExpr: + return inferBinaryType(e) + case *ast.StarExpr: + return inferStarType(e) + case *ast.UnaryExpr: + return inferUnaryType(e) + case *ast.CallExpr: + return inferCallType(e) + case *ast.IndexExpr: + return inferIndexType(e) + case *ast.IndexListExpr: + return inferIndexListType(e) + case *ast.SelectorExpr: + return inferSelectorType(e) + case *ast.Ident: + return inferIdentType(e) + default: + return nil + } +} + +func inferBasicType(basic *ast.BasicLit) ast.Expr { + switch basic.Kind { + case token.INT: + return ast.NewIdent("int") + case token.FLOAT: + return ast.NewIdent("float64") + case token.IMAG: + return ast.NewIdent("imag") + case token.CHAR: + return ast.NewIdent("char") + case token.STRING: + return ast.NewIdent("string") + default: + return nil + } +} + +func inferBinaryType(binary *ast.BinaryExpr) ast.Expr { + switch binary.Op { + case token.EQL, token.NEQ, token.LSS, token.LEQ, token.GTR, token.GEQ: + return ast.NewIdent("bool") + default: + if x := inferExprType(binary.X); x != nil { + return x + } + return inferExprType(binary.Y) + } +} + +func inferStarType(star *ast.StarExpr) ast.Expr { + switch x := inferExprType(star.X).(type) { + case nil: + return nil + case *ast.StarExpr: + return inferExprType(x.X) + default: + return &ast.StarExpr{X: x} + } +} + +func inferUnaryType(unary *ast.UnaryExpr) ast.Expr { + if x := inferExprType(unary.X); x != nil { + switch unary.Op { + case token.AND: + return &ast.StarExpr{X: x} + case token.ARROW: + if ct, ok := x.(*ast.ChanType); ok { + return inferExprType(ct.Value) + } + return x + default: + return x + } + } + return nil +} + +func inferCallType(call *ast.CallExpr) ast.Expr { + if id, ok := call.Fun.(*ast.Ident); ok && id.Obj == nil { + switch id.Name { + case "len", "cap", "copy": + return ast.NewIdent("int") + case "real", "imag": + return ast.NewIdent("float64") + case "complex": + return ast.NewIdent("complex64") + case "recover": + return ast.NewIdent("any") + case "make", "min", "max": + if len(call.Args) > 0 { + return inferExprType(call.Args[0]) + } + case "new": + if len(call.Args) > 0 { + if arg := inferExprType(call.Args[0]); arg != nil { + return &ast.StarExpr{X: arg} + } + } + case "append": + if len(call.Args) > 0 { + if arg := inferExprType(call.Args[0]); arg != nil { + return arg + } + return &ast.ArrayType{} + } + } + } + + fun := inferExprType(call.Fun) + if ft, ok := fun.(*ast.FuncType); ok && len(ft.Results.List) > 0 { + return inferExprType(ft.Results.List[0].Type) + } + return fun +} + +func inferIndexType(index *ast.IndexExpr) ast.Expr { + if selector, ok := index.X.(*ast.SelectorExpr); ok && selector.Sel != nil && selector.Sel.Name == "Seq" { + if ident, ok := selector.X.(*ast.Ident); ok && ident.Name == "iter" { + return &ast.FuncType{ + Params: &ast.FieldList{List: []*ast.Field{{ + Names: []*ast.Ident{{Name: "yield"}}, + Type: &ast.FuncType{ + Params: &ast.FieldList{List: []*ast.Field{{Type: ast.NewIdent("V")}}}, + Results: &ast.FieldList{List: []*ast.Field{{Type: ast.NewIdent("bool")}}}, + }, + }}}, + } + } + } + + switch x := inferExprType(index.X).(type) { + case *ast.ArrayType: + return inferExprType(x.Elt) + case *ast.MapType: + return inferExprType(x.Value) + default: + return x + } +} + +func inferIndexListType(index *ast.IndexListExpr) ast.Expr { + if selector, ok := index.X.(*ast.SelectorExpr); ok && selector.Sel != nil && selector.Sel.Name == "Seq2" { + if ident, ok := selector.X.(*ast.Ident); ok && ident.Name == "iter" { + return &ast.FuncType{ + Params: &ast.FieldList{List: []*ast.Field{{ + Names: []*ast.Ident{{Name: "yield"}}, + Type: &ast.FuncType{ + Params: &ast.FieldList{List: []*ast.Field{ + {Type: ast.NewIdent("K")}, + {Type: ast.NewIdent("V")}, + }}, + Results: &ast.FieldList{List: []*ast.Field{{Type: ast.NewIdent("bool")}}}, + }, + }}}, + } + } + } + + x := inferExprType(index.X) + if at, ok := x.(*ast.ArrayType); ok { + return inferExprType(at.Elt) + } + return x +} + +func inferSelectorType(sel *ast.SelectorExpr) ast.Expr { + x := inferExprType(sel.X) + if se, ok := x.(*ast.StarExpr); ok { + x = se.X + } + switch x := x.(type) { + case *ast.StructType: + for _, field := range x.Fields.List { + for _, name := range field.Names { + if name.Name == sel.Sel.Name { + return inferExprType(field.Type) + } + } + } + case *ast.InterfaceType: + for _, method := range x.Methods.List { + for _, name := range method.Names { + if name.Name == sel.Sel.Name { + return inferExprType(method.Type) + } + } + } + } + return nil +} + +func inferIdentType(ident *ast.Ident) ast.Expr { + if ident.Obj == nil { + switch ident.Name { + case "bool", "byte", "comparable", "error", "rune", "string", "any", + "int", "int8", "int16", "int32", "int64", + "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", + "float32", "float64", "complex64", "complex128": + return ident + case "nil": + return ast.NewIdent("any") + case "true", "false": + return ast.NewIdent("bool") + case "iota": + return ast.NewIdent("int") + } + } else { + switch decl := ident.Obj.Decl.(type) { + case *ast.Field: + return inferExprType(decl.Type) + case *ast.FuncDecl: + return inferExprType(decl.Type) + case *ast.TypeSpec: + // abort when recursive pointer type detected + t := decl.Type + for { + if star, ok := t.(*ast.StarExpr); ok { + t = star.X + } else if t == ident { + return nil + } else { + break + } + } + return inferExprType(decl.Type) + case *ast.ValueSpec: + return inferValueType(decl, ident.Name) + case *ast.AssignStmt: + return inferAssignType(decl, ident.Name) + } + } + return nil +} + +func inferValueType(value *ast.ValueSpec, name string) ast.Expr { + if value.Type != nil { + return inferExprType(value.Type) + } + + index := -1 + for i := range value.Names { + if value.Names[i].Name == name { + index = i + } + } + if index < 0 { + return nil + } + + if len(value.Names) == len(value.Values) { + return inferExprType(value.Values[index]) + } + + return inferAssignMultiType(value.Values[0], index) +} + +func inferAssignType(assign *ast.AssignStmt, name string) ast.Expr { + index := -1 + for i := range assign.Lhs { + if id, ok := assign.Lhs[i].(*ast.Ident); ok && id.Name == name { + index = i + } + } + if index < 0 { + return nil + } + + if len(assign.Rhs) == 1 { + if ue, ok := assign.Rhs[0].(*ast.UnaryExpr); ok && ue.Op == token.RANGE { + switch rhs := inferExprType(assign.Rhs[0]).(type) { + case *ast.ArrayType: + switch index { + case 0: + return ast.NewIdent("int") + case 1: + return inferExprType(rhs.Elt) + } + case *ast.MapType: + switch index { + case 0: + return inferExprType(rhs.Key) + case 1: + return inferExprType(rhs.Value) + } + case *ast.Ident: + if rhs.Name == "string" { + switch index { + case 0: + return ast.NewIdent("int") + case 1: + return ast.NewIdent("rune") + } + } + case *ast.ChanType: + if index == 0 { + return inferExprType(rhs.Value) + } + } + } + } + + if len(assign.Lhs) == len(assign.Rhs) { + return inferExprType(assign.Rhs[index]) + } + + return inferAssignMultiType(assign.Rhs[0], index) +} + +func inferAssignMultiType(rhs ast.Expr, index int) ast.Expr { + switch rhs := rhs.(type) { + case *ast.TypeAssertExpr: + switch index { + case 0: + return inferExprType(rhs.Type) + case 1: + return ast.NewIdent("bool") + } + case *ast.CallExpr: + if fun, ok := inferExprType(rhs.Fun).(*ast.FuncType); ok { + for _, res := range fun.Results.List { + for range res.Names { + if index == 0 { + return inferExprType(res.Type) + } + index-- + } + } + } + case *ast.IndexExpr: + if mt, ok := inferExprType(rhs.X).(*ast.MapType); ok { + switch index { + case 0: + return inferExprType(mt.Value) + case 1: + return ast.NewIdent("bool") + } + } + case *ast.UnaryExpr: + if ct, ok := inferExprType(rhs.X).(*ast.ChanType); ok { + switch index { + case 0: + return inferExprType(ct.Value) + case 1: + return ast.NewIdent("bool") + } + } + } + + return nil +} diff --git a/vendor/github.com/charmbracelet/colorprofile/.golangci-soft.yml b/vendor/github.com/charmbracelet/colorprofile/.golangci-soft.yml deleted file mode 100644 index d325d4fcc..000000000 --- a/vendor/github.com/charmbracelet/colorprofile/.golangci-soft.yml +++ /dev/null @@ -1,40 +0,0 @@ -run: - tests: false - issues-exit-code: 0 - -issues: - include: - - EXC0001 - - EXC0005 - - EXC0011 - - EXC0012 - - EXC0013 - - max-issues-per-linter: 0 - max-same-issues: 0 - -linters: - enable: - - exhaustive - - goconst - - godot - - godox - - mnd - - gomoddirectives - - goprintffuncname - - misspell - - nakedret - - nestif - - noctx - - nolintlint - - prealloc - - wrapcheck - - # disable default linters, they are already enabled in .golangci.yml - disable: - - errcheck - - gosimple - - govet - - ineffassign - - staticcheck - - unused diff --git a/vendor/github.com/charmbracelet/colorprofile/.golangci.yml b/vendor/github.com/charmbracelet/colorprofile/.golangci.yml index d6789e014..be61d89ba 100644 --- a/vendor/github.com/charmbracelet/colorprofile/.golangci.yml +++ b/vendor/github.com/charmbracelet/colorprofile/.golangci.yml @@ -1,24 +1,23 @@ +version: "2" run: tests: false - -issues: - include: - - EXC0001 - - EXC0005 - - EXC0011 - - EXC0012 - - EXC0013 - - max-issues-per-linter: 0 - max-same-issues: 0 - linters: enable: - bodyclose - - gofumpt - - goimports + - exhaustive + - goconst + - godot + - godox + - gomoddirectives + - goprintffuncname - gosec + - misspell + - nakedret + - nestif - nilerr + - noctx + - nolintlint + - prealloc - revive - rowserrcheck - sqlclosecheck @@ -26,3 +25,17 @@ linters: - unconvert - unparam - whitespace + - wrapcheck + exclusions: + generated: lax + presets: + - common-false-positives +issues: + max-issues-per-linter: 0 + max-same-issues: 0 +formatters: + enable: + - gofumpt + - goimports + exclusions: + generated: lax diff --git a/vendor/github.com/charmbracelet/colorprofile/doc.go b/vendor/github.com/charmbracelet/colorprofile/doc.go new file mode 100644 index 000000000..bd522e903 --- /dev/null +++ b/vendor/github.com/charmbracelet/colorprofile/doc.go @@ -0,0 +1,4 @@ +// Package colorprofile provides a way to downsample ANSI escape sequence +// colors and styles automatically based on output, environment variables, and +// Terminfo databases. +package colorprofile diff --git a/vendor/github.com/charmbracelet/colorprofile/env.go b/vendor/github.com/charmbracelet/colorprofile/env.go index 8df3d8f7e..749f989e2 100644 --- a/vendor/github.com/charmbracelet/colorprofile/env.go +++ b/vendor/github.com/charmbracelet/colorprofile/env.go @@ -12,6 +12,8 @@ import ( "github.com/xo/terminfo" ) +const dumbTerm = "dumb" + // Detect returns the color profile based on the terminal output, and // environment variables. This respects NO_COLOR, CLICOLOR, and CLICOLOR_FORCE // environment variables. @@ -29,10 +31,10 @@ import ( // See https://no-color.org/ and https://bixense.com/clicolors/ for more information. func Detect(output io.Writer, env []string) Profile { out, ok := output.(term.File) - isatty := ok && term.IsTerminal(out.Fd()) environ := newEnviron(env) - term := environ.get("TERM") - isDumb := term == "dumb" + isatty := isTTYForced(environ) || (ok && term.IsTerminal(out.Fd())) + term, ok := environ.lookup("TERM") + isDumb := !ok || term == dumbTerm envp := colorProfile(isatty, environ) if envp == TrueColor || envNoColor(environ) { // We already know we have TrueColor, or NO_COLOR is set. @@ -69,7 +71,8 @@ func Env(env []string) (p Profile) { } func colorProfile(isatty bool, env environ) (p Profile) { - isDumb := env.get("TERM") == "dumb" + term, ok := env.lookup("TERM") + isDumb := (!ok && runtime.GOOS != "windows") || term == dumbTerm envp := envColorProfile(env) if !isatty || isDumb { // Check if the output is a terminal. @@ -83,7 +86,7 @@ func colorProfile(isatty bool, env environ) (p Profile) { if p > Ascii { p = Ascii } - return + return //nolint:nakedret } if cliColorForced(env) { @@ -94,7 +97,7 @@ func colorProfile(isatty bool, env environ) (p Profile) { p = envp } - return + return //nolint:nakedret } if cliColor(env) { @@ -123,6 +126,11 @@ func cliColorForced(env environ) bool { return cliColorForce } +func isTTYForced(env environ) bool { + skip, _ := strconv.ParseBool(env.get("TTY_FORCE")) + return skip +} + func colorTerm(env environ) bool { colorTerm := strings.ToLower(env.get("COLORTERM")) return colorTerm == "truecolor" || colorTerm == "24bit" || @@ -132,7 +140,7 @@ func colorTerm(env environ) bool { // envColorProfile returns infers the color profile from the environment. func envColorProfile(env environ) (p Profile) { term, ok := env.lookup("TERM") - if !ok || len(term) == 0 || term == "dumb" { + if !ok || len(term) == 0 || term == dumbTerm { p = NoTTY if runtime.GOOS == "windows" { // Use Windows API to detect color profile. Windows Terminal and @@ -184,7 +192,12 @@ func envColorProfile(env environ) (p Profile) { p = ANSI256 } - return + // Direct color terminals support true colors. + if strings.HasSuffix(term, "direct") { + return TrueColor + } + + return //nolint:nakedret } // Terminfo returns the color profile based on the terminal's terminfo @@ -278,10 +291,3 @@ func (e environ) get(key string) string { v, _ := e.lookup(key) return v } - -func max[T ~byte | ~int](a, b T) T { - if a > b { - return a - } - return b -} diff --git a/vendor/github.com/charmbracelet/colorprofile/profile.go b/vendor/github.com/charmbracelet/colorprofile/profile.go index 97e37ac36..2bcb37c6e 100644 --- a/vendor/github.com/charmbracelet/colorprofile/profile.go +++ b/vendor/github.com/charmbracelet/colorprofile/profile.go @@ -12,15 +12,15 @@ import ( type Profile byte const ( - // NoTTY, not a terminal profile. + // NoTTY is a profile with no terminal support. NoTTY Profile = iota - // Ascii, uncolored profile. + // Ascii is a profile with no color support. Ascii //nolint:revive - // ANSI, 4-bit color profile. + // ANSI is a profile with 16 colors (4-bit). ANSI - // ANSI256, 8-bit color profile. + // ANSI256 is a profile with 256 colors (8-bit). ANSI256 - // TrueColor, 24-bit color profile. + // TrueColor is a profile with 16 million colors (24-bit). TrueColor ) diff --git a/vendor/github.com/charmbracelet/colorprofile/writer.go b/vendor/github.com/charmbracelet/colorprofile/writer.go index d04b3b99d..47f0c6eb9 100644 --- a/vendor/github.com/charmbracelet/colorprofile/writer.go +++ b/vendor/github.com/charmbracelet/colorprofile/writer.go @@ -2,6 +2,7 @@ package colorprofile import ( "bytes" + "fmt" "image/color" "io" "strconv" @@ -37,11 +38,13 @@ type Writer struct { func (w *Writer) Write(p []byte) (int, error) { switch w.Profile { case TrueColor: - return w.Forward.Write(p) + return w.Forward.Write(p) //nolint:wrapcheck case NoTTY: - return io.WriteString(w.Forward, ansi.Strip(string(p))) - default: + return io.WriteString(w.Forward, ansi.Strip(string(p))) //nolint:wrapcheck + case Ascii, ANSI, ANSI256: return w.downsample(p) + default: + return 0, fmt.Errorf("invalid profile: %v", w.Profile) } } @@ -63,7 +66,7 @@ func (w *Writer) downsample(p []byte) (int, error) { default: // If we're not a style SGR sequence, just write the bytes. if n, err := buf.Write(seq); err != nil { - return n, err + return n, err //nolint:wrapcheck } } @@ -71,7 +74,7 @@ func (w *Writer) downsample(p []byte) (int, error) { state = newState } - return w.Forward.Write(buf.Bytes()) + return w.Forward.Write(buf.Bytes()) //nolint:wrapcheck } // WriteString writes the given text to the underlying writer. diff --git a/vendor/github.com/charmbracelet/x/ansi/color.go b/vendor/github.com/charmbracelet/x/ansi/color.go index 77f8a08d1..09feb9759 100644 --- a/vendor/github.com/charmbracelet/x/ansi/color.go +++ b/vendor/github.com/charmbracelet/x/ansi/color.go @@ -2,34 +2,9 @@ package ansi import ( "image/color" -) -// Technically speaking, the 16 basic ANSI colors are arbitrary and can be -// customized at the terminal level. Given that, we're returning what we feel -// are good defaults. -// -// This could also be a slice, but we use a map to make the mappings very -// explicit. -// -// See: https://www.ditig.com/publications/256-colors-cheat-sheet -var lowANSI = map[uint32]uint32{ - 0: 0x000000, // black - 1: 0x800000, // red - 2: 0x008000, // green - 3: 0x808000, // yellow - 4: 0x000080, // blue - 5: 0x800080, // magenta - 6: 0x008080, // cyan - 7: 0xc0c0c0, // white - 8: 0x808080, // bright black - 9: 0xff0000, // bright red - 10: 0x00ff00, // bright green - 11: 0xffff00, // bright yellow - 12: 0x0000ff, // bright blue - 13: 0xff00ff, // bright magenta - 14: 0x00ffff, // bright cyan - 15: 0xffffff, // bright white -} + "github.com/lucasb-eyer/go-colorful" +) // Color is a color that can be used in a terminal. ANSI (including // ANSI256) and 24-bit "true colors" fall under this category. @@ -100,28 +75,33 @@ func (c BasicColor) RGBA() (uint32, uint32, uint32, uint32) { return 0, 0, 0, 0xffff } - r, g, b := ansiToRGB(ansi) - return toRGBA(r, g, b) + return ansiToRGB(byte(ansi)).RGBA() } -// ExtendedColor is an ANSI 256 (8-bit) color with a value from 0 to 255. -type ExtendedColor uint8 +// IndexedColor is an ANSI 256 (8-bit) color with a value from 0 to 255. +type IndexedColor uint8 -var _ Color = ExtendedColor(0) +var _ Color = IndexedColor(0) // RGBA returns the red, green, blue and alpha components of the color. It // satisfies the color.Color interface. -func (c ExtendedColor) RGBA() (uint32, uint32, uint32, uint32) { - r, g, b := ansiToRGB(uint32(c)) - return toRGBA(r, g, b) +func (c IndexedColor) RGBA() (uint32, uint32, uint32, uint32) { + return ansiToRGB(byte(c)).RGBA() } +// ExtendedColor is an ANSI 256 (8-bit) color with a value from 0 to 255. +// +// Deprecated: use [IndexedColor] instead. +type ExtendedColor = IndexedColor + // TrueColor is a 24-bit color that can be used in the terminal. // This can be used to represent RGB colors. // // For example, the color red can be represented as: // // TrueColor(0xff0000) +// +// Deprecated: use [RGBColor] instead. type TrueColor uint32 var _ Color = TrueColor(0) @@ -133,44 +113,25 @@ func (c TrueColor) RGBA() (uint32, uint32, uint32, uint32) { return toRGBA(r, g, b) } +// RGBColor is a 24-bit color that can be used in the terminal. +// This can be used to represent RGB colors. +type RGBColor struct { + R uint8 + G uint8 + B uint8 +} + +// RGBA returns the red, green, blue and alpha components of the color. It +// satisfies the color.Color interface. +func (c RGBColor) RGBA() (uint32, uint32, uint32, uint32) { + return toRGBA(uint32(c.R), uint32(c.G), uint32(c.B)) +} + // ansiToRGB converts an ANSI color to a 24-bit RGB color. // // r, g, b := ansiToRGB(57) -func ansiToRGB(ansi uint32) (uint32, uint32, uint32) { - // For out-of-range values return black. - if ansi > 255 { - return 0, 0, 0 - } - - // Low ANSI. - if ansi < 16 { - h, ok := lowANSI[ansi] - if !ok { - return 0, 0, 0 - } - r, g, b := hexToRGB(h) - return r, g, b - } - - // Grays. - if ansi > 231 { - s := (ansi-232)*10 + 8 - return s, s, s - } - - // ANSI256. - n := ansi - 16 - b := n % 6 - g := (n - b) / 6 % 6 - r := (n - b - g*6) / 36 % 6 - for _, v := range []*uint32{&r, &g, &b} { - if *v > 0 { - c := *v*40 + 55 - *v = c - } - } - - return r, g, b +func ansiToRGB(ansi byte) color.Color { + return ansiHex[ansi] } // hexToRGB converts a number in hexadecimal format to red, green, and blue @@ -194,3 +155,630 @@ func toRGBA(r, g, b uint32) (uint32, uint32, uint32, uint32) { b |= b << 8 return r, g, b, 0xffff } + +//nolint:unused +func distSq(r1, g1, b1, r2, g2, b2 int) int { + return ((r1-r2)*(r1-r2) + (g1-g2)*(g1-g2) + (b1-b2)*(b1-b2)) +} + +func to6Cube[T int | float64](v T) int { + if v < 48 { + return 0 + } + if v < 115 { + return 1 + } + return int((v - 35) / 40) +} + +// Convert256 converts a [color.Color], usually a 24-bit color, to xterm(1) 256 +// color palette. +// +// xterm provides a 6x6x6 color cube (16 - 231) and 24 greys (232 - 255). We +// map our RGB color to the closest in the cube, also work out the closest +// grey, and use the nearest of the two based on the lightness of the color. +// +// Note that the xterm has much lower resolution for darker colors (they are +// not evenly spread out), so our 6 levels are not evenly spread: 0x0, 0x5f +// (95), 0x87 (135), 0xaf (175), 0xd7 (215) and 0xff (255). Greys are more +// evenly spread (8, 18, 28 ... 238). +func Convert256(c color.Color) IndexedColor { + // If the color is already an IndexedColor, return it. + if i, ok := c.(IndexedColor); ok { + return i + } + + // Note: this is mostly ported from tmux/colour.c. + col, ok := colorful.MakeColor(c) + if !ok { + return IndexedColor(0) + } + + r := col.R * 255 + g := col.G * 255 + b := col.B * 255 + + q2c := [6]int{0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff} + + // Map RGB to 6x6x6 cube. + qr := to6Cube(r) + cr := q2c[qr] + qg := to6Cube(g) + cg := q2c[qg] + qb := to6Cube(b) + cb := q2c[qb] + + // If we have hit the color exactly, return early. + ci := (36 * qr) + (6 * qg) + qb + if cr == int(r) && cg == int(g) && cb == int(b) { + return IndexedColor(16 + ci) //nolint:gosec + } + + // Work out the closest grey (average of RGB). + greyAvg := int(r+g+b) / 3 + var greyIdx int + if greyAvg > 238 { + greyIdx = 23 + } else { + greyIdx = (greyAvg - 3) / 10 + } + grey := 8 + (10 * greyIdx) + + // Return the one which is nearer to the original input rgb value + // XXX: This is where it differs from tmux's implementation, we prefer the + // closer color to the original in terms of light distances rather than the + // cube distance. + c2 := colorful.Color{R: float64(cr) / 255.0, G: float64(cg) / 255.0, B: float64(cb) / 255.0} + g2 := colorful.Color{R: float64(grey) / 255.0, G: float64(grey) / 255.0, B: float64(grey) / 255.0} + colorDist := col.DistanceHSLuv(c2) + grayDist := col.DistanceHSLuv(g2) + + if colorDist <= grayDist { + return IndexedColor(16 + ci) //nolint:gosec + } + return IndexedColor(232 + greyIdx) //nolint:gosec + + // // Is grey or 6x6x6 color closest? + // d := distSq(cr, cg, cb, int(r), int(g), int(b)) + // if distSq(grey, grey, grey, int(r), int(g), int(b)) < d { + // return IndexedColor(232 + greyIdx) //nolint:gosec + // } + // return IndexedColor(16 + ci) //nolint:gosec +} + +// Convert16 converts a [color.Color] to a 16-color ANSI color. It will first +// try to find a match in the 256 xterm(1) color palette, and then map that to +// the 16-color ANSI palette. +func Convert16(c color.Color) BasicColor { + switch c := c.(type) { + case BasicColor: + // If the color is already a BasicColor, return it. + return c + case IndexedColor: + // If the color is already an IndexedColor, return the corresponding + // BasicColor. + return ansi256To16[c] + default: + c256 := Convert256(c) + return ansi256To16[c256] + } +} + +// RGB values of ANSI colors (0-255). +var ansiHex = [...]color.RGBA{ + 0: {R: 0x00, G: 0x00, B: 0x00, A: 0xff}, // "#000000" + 1: {R: 0x80, G: 0x00, B: 0x00, A: 0xff}, // "#800000" + 2: {R: 0x00, G: 0x80, B: 0x00, A: 0xff}, // "#008000" + 3: {R: 0x80, G: 0x80, B: 0x00, A: 0xff}, // "#808000" + 4: {R: 0x00, G: 0x00, B: 0x80, A: 0xff}, // "#000080" + 5: {R: 0x80, G: 0x00, B: 0x80, A: 0xff}, // "#800080" + 6: {R: 0x00, G: 0x80, B: 0x80, A: 0xff}, // "#008080" + 7: {R: 0xc0, G: 0xc0, B: 0xc0, A: 0xff}, // "#c0c0c0" + 8: {R: 0x80, G: 0x80, B: 0x80, A: 0xff}, // "#808080" + 9: {R: 0xff, G: 0x00, B: 0x00, A: 0xff}, // "#ff0000" + 10: {R: 0x00, G: 0xff, B: 0x00, A: 0xff}, // "#00ff00" + 11: {R: 0xff, G: 0xff, B: 0x00, A: 0xff}, // "#ffff00" + 12: {R: 0x00, G: 0x00, B: 0xff, A: 0xff}, // "#0000ff" + 13: {R: 0xff, G: 0x00, B: 0xff, A: 0xff}, // "#ff00ff" + 14: {R: 0x00, G: 0xff, B: 0xff, A: 0xff}, // "#00ffff" + 15: {R: 0xff, G: 0xff, B: 0xff, A: 0xff}, // "#ffffff" + 16: {R: 0x00, G: 0x00, B: 0x00, A: 0xff}, // "#000000" + 17: {R: 0x00, G: 0x00, B: 0x5f, A: 0xff}, // "#00005f" + 18: {R: 0x00, G: 0x00, B: 0x87, A: 0xff}, // "#000087" + 19: {R: 0x00, G: 0x00, B: 0xaf, A: 0xff}, // "#0000af" + 20: {R: 0x00, G: 0x00, B: 0xd7, A: 0xff}, // "#0000d7" + 21: {R: 0x00, G: 0x00, B: 0xff, A: 0xff}, // "#0000ff" + 22: {R: 0x00, G: 0x5f, B: 0x00, A: 0xff}, // "#005f00" + 23: {R: 0x00, G: 0x5f, B: 0x5f, A: 0xff}, // "#005f5f" + 24: {R: 0x00, G: 0x5f, B: 0x87, A: 0xff}, // "#005f87" + 25: {R: 0x00, G: 0x5f, B: 0xaf, A: 0xff}, // "#005faf" + 26: {R: 0x00, G: 0x5f, B: 0xd7, A: 0xff}, // "#005fd7" + 27: {R: 0x00, G: 0x5f, B: 0xff, A: 0xff}, // "#005fff" + 28: {R: 0x00, G: 0x87, B: 0x00, A: 0xff}, // "#008700" + 29: {R: 0x00, G: 0x87, B: 0x5f, A: 0xff}, // "#00875f" + 30: {R: 0x00, G: 0x87, B: 0x87, A: 0xff}, // "#008787" + 31: {R: 0x00, G: 0x87, B: 0xaf, A: 0xff}, // "#0087af" + 32: {R: 0x00, G: 0x87, B: 0xd7, A: 0xff}, // "#0087d7" + 33: {R: 0x00, G: 0x87, B: 0xff, A: 0xff}, // "#0087ff" + 34: {R: 0x00, G: 0xaf, B: 0x00, A: 0xff}, // "#00af00" + 35: {R: 0x00, G: 0xaf, B: 0x5f, A: 0xff}, // "#00af5f" + 36: {R: 0x00, G: 0xaf, B: 0x87, A: 0xff}, // "#00af87" + 37: {R: 0x00, G: 0xaf, B: 0xaf, A: 0xff}, // "#00afaf" + 38: {R: 0x00, G: 0xaf, B: 0xd7, A: 0xff}, // "#00afd7" + 39: {R: 0x00, G: 0xaf, B: 0xff, A: 0xff}, // "#00afff" + 40: {R: 0x00, G: 0xd7, B: 0x00, A: 0xff}, // "#00d700" + 41: {R: 0x00, G: 0xd7, B: 0x5f, A: 0xff}, // "#00d75f" + 42: {R: 0x00, G: 0xd7, B: 0x87, A: 0xff}, // "#00d787" + 43: {R: 0x00, G: 0xd7, B: 0xaf, A: 0xff}, // "#00d7af" + 44: {R: 0x00, G: 0xd7, B: 0xd7, A: 0xff}, // "#00d7d7" + 45: {R: 0x00, G: 0xd7, B: 0xff, A: 0xff}, // "#00d7ff" + 46: {R: 0x00, G: 0xff, B: 0x00, A: 0xff}, // "#00ff00" + 47: {R: 0x00, G: 0xff, B: 0x5f, A: 0xff}, // "#00ff5f" + 48: {R: 0x00, G: 0xff, B: 0x87, A: 0xff}, // "#00ff87" + 49: {R: 0x00, G: 0xff, B: 0xaf, A: 0xff}, // "#00ffaf" + 50: {R: 0x00, G: 0xff, B: 0xd7, A: 0xff}, // "#00ffd7" + 51: {R: 0x00, G: 0xff, B: 0xff, A: 0xff}, // "#00ffff" + 52: {R: 0x5f, G: 0x00, B: 0x00, A: 0xff}, // "#5f0000" + 53: {R: 0x5f, G: 0x00, B: 0x5f, A: 0xff}, // "#5f005f" + 54: {R: 0x5f, G: 0x00, B: 0x87, A: 0xff}, // "#5f0087" + 55: {R: 0x5f, G: 0x00, B: 0xaf, A: 0xff}, // "#5f00af" + 56: {R: 0x5f, G: 0x00, B: 0xd7, A: 0xff}, // "#5f00d7" + 57: {R: 0x5f, G: 0x00, B: 0xff, A: 0xff}, // "#5f00ff" + 58: {R: 0x5f, G: 0x5f, B: 0x00, A: 0xff}, // "#5f5f00" + 59: {R: 0x5f, G: 0x5f, B: 0x5f, A: 0xff}, // "#5f5f5f" + 60: {R: 0x5f, G: 0x5f, B: 0x87, A: 0xff}, // "#5f5f87" + 61: {R: 0x5f, G: 0x5f, B: 0xaf, A: 0xff}, // "#5f5faf" + 62: {R: 0x5f, G: 0x5f, B: 0xd7, A: 0xff}, // "#5f5fd7" + 63: {R: 0x5f, G: 0x5f, B: 0xff, A: 0xff}, // "#5f5fff" + 64: {R: 0x5f, G: 0x87, B: 0x00, A: 0xff}, // "#5f8700" + 65: {R: 0x5f, G: 0x87, B: 0x5f, A: 0xff}, // "#5f875f" + 66: {R: 0x5f, G: 0x87, B: 0x87, A: 0xff}, // "#5f8787" + 67: {R: 0x5f, G: 0x87, B: 0xaf, A: 0xff}, // "#5f87af" + 68: {R: 0x5f, G: 0x87, B: 0xd7, A: 0xff}, // "#5f87d7" + 69: {R: 0x5f, G: 0x87, B: 0xff, A: 0xff}, // "#5f87ff" + 70: {R: 0x5f, G: 0xaf, B: 0x00, A: 0xff}, // "#5faf00" + 71: {R: 0x5f, G: 0xaf, B: 0x5f, A: 0xff}, // "#5faf5f" + 72: {R: 0x5f, G: 0xaf, B: 0x87, A: 0xff}, // "#5faf87" + 73: {R: 0x5f, G: 0xaf, B: 0xaf, A: 0xff}, // "#5fafaf" + 74: {R: 0x5f, G: 0xaf, B: 0xd7, A: 0xff}, // "#5fafd7" + 75: {R: 0x5f, G: 0xaf, B: 0xff, A: 0xff}, // "#5fafff" + 76: {R: 0x5f, G: 0xd7, B: 0x00, A: 0xff}, // "#5fd700" + 77: {R: 0x5f, G: 0xd7, B: 0x5f, A: 0xff}, // "#5fd75f" + 78: {R: 0x5f, G: 0xd7, B: 0x87, A: 0xff}, // "#5fd787" + 79: {R: 0x5f, G: 0xd7, B: 0xaf, A: 0xff}, // "#5fd7af" + 80: {R: 0x5f, G: 0xd7, B: 0xd7, A: 0xff}, // "#5fd7d7" + 81: {R: 0x5f, G: 0xd7, B: 0xff, A: 0xff}, // "#5fd7ff" + 82: {R: 0x5f, G: 0xff, B: 0x00, A: 0xff}, // "#5fff00" + 83: {R: 0x5f, G: 0xff, B: 0x5f, A: 0xff}, // "#5fff5f" + 84: {R: 0x5f, G: 0xff, B: 0x87, A: 0xff}, // "#5fff87" + 85: {R: 0x5f, G: 0xff, B: 0xaf, A: 0xff}, // "#5fffaf" + 86: {R: 0x5f, G: 0xff, B: 0xd7, A: 0xff}, // "#5fffd7" + 87: {R: 0x5f, G: 0xff, B: 0xff, A: 0xff}, // "#5fffff" + 88: {R: 0x87, G: 0x00, B: 0x00, A: 0xff}, // "#870000" + 89: {R: 0x87, G: 0x00, B: 0x5f, A: 0xff}, // "#87005f" + 90: {R: 0x87, G: 0x00, B: 0x87, A: 0xff}, // "#870087" + 91: {R: 0x87, G: 0x00, B: 0xaf, A: 0xff}, // "#8700af" + 92: {R: 0x87, G: 0x00, B: 0xd7, A: 0xff}, // "#8700d7" + 93: {R: 0x87, G: 0x00, B: 0xff, A: 0xff}, // "#8700ff" + 94: {R: 0x87, G: 0x5f, B: 0x00, A: 0xff}, // "#875f00" + 95: {R: 0x87, G: 0x5f, B: 0x5f, A: 0xff}, // "#875f5f" + 96: {R: 0x87, G: 0x5f, B: 0x87, A: 0xff}, // "#875f87" + 97: {R: 0x87, G: 0x5f, B: 0xaf, A: 0xff}, // "#875faf" + 98: {R: 0x87, G: 0x5f, B: 0xd7, A: 0xff}, // "#875fd7" + 99: {R: 0x87, G: 0x5f, B: 0xff, A: 0xff}, // "#875fff" + 100: {R: 0x87, G: 0x87, B: 0x00, A: 0xff}, // "#878700" + 101: {R: 0x87, G: 0x87, B: 0x5f, A: 0xff}, // "#87875f" + 102: {R: 0x87, G: 0x87, B: 0x87, A: 0xff}, // "#878787" + 103: {R: 0x87, G: 0x87, B: 0xaf, A: 0xff}, // "#8787af" + 104: {R: 0x87, G: 0x87, B: 0xd7, A: 0xff}, // "#8787d7" + 105: {R: 0x87, G: 0x87, B: 0xff, A: 0xff}, // "#8787ff" + 106: {R: 0x87, G: 0xaf, B: 0x00, A: 0xff}, // "#87af00" + 107: {R: 0x87, G: 0xaf, B: 0x5f, A: 0xff}, // "#87af5f" + 108: {R: 0x87, G: 0xaf, B: 0x87, A: 0xff}, // "#87af87" + 109: {R: 0x87, G: 0xaf, B: 0xaf, A: 0xff}, // "#87afaf" + 110: {R: 0x87, G: 0xaf, B: 0xd7, A: 0xff}, // "#87afd7" + 111: {R: 0x87, G: 0xaf, B: 0xff, A: 0xff}, // "#87afff" + 112: {R: 0x87, G: 0xd7, B: 0x00, A: 0xff}, // "#87d700" + 113: {R: 0x87, G: 0xd7, B: 0x5f, A: 0xff}, // "#87d75f" + 114: {R: 0x87, G: 0xd7, B: 0x87, A: 0xff}, // "#87d787" + 115: {R: 0x87, G: 0xd7, B: 0xaf, A: 0xff}, // "#87d7af" + 116: {R: 0x87, G: 0xd7, B: 0xd7, A: 0xff}, // "#87d7d7" + 117: {R: 0x87, G: 0xd7, B: 0xff, A: 0xff}, // "#87d7ff" + 118: {R: 0x87, G: 0xff, B: 0x00, A: 0xff}, // "#87ff00" + 119: {R: 0x87, G: 0xff, B: 0x5f, A: 0xff}, // "#87ff5f" + 120: {R: 0x87, G: 0xff, B: 0x87, A: 0xff}, // "#87ff87" + 121: {R: 0x87, G: 0xff, B: 0xaf, A: 0xff}, // "#87ffaf" + 122: {R: 0x87, G: 0xff, B: 0xd7, A: 0xff}, // "#87ffd7" + 123: {R: 0x87, G: 0xff, B: 0xff, A: 0xff}, // "#87ffff" + 124: {R: 0xaf, G: 0x00, B: 0x00, A: 0xff}, // "#af0000" + 125: {R: 0xaf, G: 0x00, B: 0x5f, A: 0xff}, // "#af005f" + 126: {R: 0xaf, G: 0x00, B: 0x87, A: 0xff}, // "#af0087" + 127: {R: 0xaf, G: 0x00, B: 0xaf, A: 0xff}, // "#af00af" + 128: {R: 0xaf, G: 0x00, B: 0xd7, A: 0xff}, // "#af00d7" + 129: {R: 0xaf, G: 0x00, B: 0xff, A: 0xff}, // "#af00ff" + 130: {R: 0xaf, G: 0x5f, B: 0x00, A: 0xff}, // "#af5f00" + 131: {R: 0xaf, G: 0x5f, B: 0x5f, A: 0xff}, // "#af5f5f" + 132: {R: 0xaf, G: 0x5f, B: 0x87, A: 0xff}, // "#af5f87" + 133: {R: 0xaf, G: 0x5f, B: 0xaf, A: 0xff}, // "#af5faf" + 134: {R: 0xaf, G: 0x5f, B: 0xd7, A: 0xff}, // "#af5fd7" + 135: {R: 0xaf, G: 0x5f, B: 0xff, A: 0xff}, // "#af5fff" + 136: {R: 0xaf, G: 0x87, B: 0x00, A: 0xff}, // "#af8700" + 137: {R: 0xaf, G: 0x87, B: 0x5f, A: 0xff}, // "#af875f" + 138: {R: 0xaf, G: 0x87, B: 0x87, A: 0xff}, // "#af8787" + 139: {R: 0xaf, G: 0x87, B: 0xaf, A: 0xff}, // "#af87af" + 140: {R: 0xaf, G: 0x87, B: 0xd7, A: 0xff}, // "#af87d7" + 141: {R: 0xaf, G: 0x87, B: 0xff, A: 0xff}, // "#af87ff" + 142: {R: 0xaf, G: 0xaf, B: 0x00, A: 0xff}, // "#afaf00" + 143: {R: 0xaf, G: 0xaf, B: 0x5f, A: 0xff}, // "#afaf5f" + 144: {R: 0xaf, G: 0xaf, B: 0x87, A: 0xff}, // "#afaf87" + 145: {R: 0xaf, G: 0xaf, B: 0xaf, A: 0xff}, // "#afafaf" + 146: {R: 0xaf, G: 0xaf, B: 0xd7, A: 0xff}, // "#afafd7" + 147: {R: 0xaf, G: 0xaf, B: 0xff, A: 0xff}, // "#afafff" + 148: {R: 0xaf, G: 0xd7, B: 0x00, A: 0xff}, // "#afd700" + 149: {R: 0xaf, G: 0xd7, B: 0x5f, A: 0xff}, // "#afd75f" + 150: {R: 0xaf, G: 0xd7, B: 0x87, A: 0xff}, // "#afd787" + 151: {R: 0xaf, G: 0xd7, B: 0xaf, A: 0xff}, // "#afd7af" + 152: {R: 0xaf, G: 0xd7, B: 0xd7, A: 0xff}, // "#afd7d7" + 153: {R: 0xaf, G: 0xd7, B: 0xff, A: 0xff}, // "#afd7ff" + 154: {R: 0xaf, G: 0xff, B: 0x00, A: 0xff}, // "#afff00" + 155: {R: 0xaf, G: 0xff, B: 0x5f, A: 0xff}, // "#afff5f" + 156: {R: 0xaf, G: 0xff, B: 0x87, A: 0xff}, // "#afff87" + 157: {R: 0xaf, G: 0xff, B: 0xaf, A: 0xff}, // "#afffaf" + 158: {R: 0xaf, G: 0xff, B: 0xd7, A: 0xff}, // "#afffd7" + 159: {R: 0xaf, G: 0xff, B: 0xff, A: 0xff}, // "#afffff" + 160: {R: 0xd7, G: 0x00, B: 0x00, A: 0xff}, // "#d70000" + 161: {R: 0xd7, G: 0x00, B: 0x5f, A: 0xff}, // "#d7005f" + 162: {R: 0xd7, G: 0x00, B: 0x87, A: 0xff}, // "#d70087" + 163: {R: 0xd7, G: 0x00, B: 0xaf, A: 0xff}, // "#d700af" + 164: {R: 0xd7, G: 0x00, B: 0xd7, A: 0xff}, // "#d700d7" + 165: {R: 0xd7, G: 0x00, B: 0xff, A: 0xff}, // "#d700ff" + 166: {R: 0xd7, G: 0x5f, B: 0x00, A: 0xff}, // "#d75f00" + 167: {R: 0xd7, G: 0x5f, B: 0x5f, A: 0xff}, // "#d75f5f" + 168: {R: 0xd7, G: 0x5f, B: 0x87, A: 0xff}, // "#d75f87" + 169: {R: 0xd7, G: 0x5f, B: 0xaf, A: 0xff}, // "#d75faf" + 170: {R: 0xd7, G: 0x5f, B: 0xd7, A: 0xff}, // "#d75fd7" + 171: {R: 0xd7, G: 0x5f, B: 0xff, A: 0xff}, // "#d75fff" + 172: {R: 0xd7, G: 0x87, B: 0x00, A: 0xff}, // "#d78700" + 173: {R: 0xd7, G: 0x87, B: 0x5f, A: 0xff}, // "#d7875f" + 174: {R: 0xd7, G: 0x87, B: 0x87, A: 0xff}, // "#d78787" + 175: {R: 0xd7, G: 0x87, B: 0xaf, A: 0xff}, // "#d787af" + 176: {R: 0xd7, G: 0x87, B: 0xd7, A: 0xff}, // "#d787d7" + 177: {R: 0xd7, G: 0x87, B: 0xff, A: 0xff}, // "#d787ff" + 178: {R: 0xd7, G: 0xaf, B: 0x00, A: 0xff}, // "#d7af00" + 179: {R: 0xd7, G: 0xaf, B: 0x5f, A: 0xff}, // "#d7af5f" + 180: {R: 0xd7, G: 0xaf, B: 0x87, A: 0xff}, // "#d7af87" + 181: {R: 0xd7, G: 0xaf, B: 0xaf, A: 0xff}, // "#d7afaf" + 182: {R: 0xd7, G: 0xaf, B: 0xd7, A: 0xff}, // "#d7afd7" + 183: {R: 0xd7, G: 0xaf, B: 0xff, A: 0xff}, // "#d7afff" + 184: {R: 0xd7, G: 0xd7, B: 0x00, A: 0xff}, // "#d7d700" + 185: {R: 0xd7, G: 0xd7, B: 0x5f, A: 0xff}, // "#d7d75f" + 186: {R: 0xd7, G: 0xd7, B: 0x87, A: 0xff}, // "#d7d787" + 187: {R: 0xd7, G: 0xd7, B: 0xaf, A: 0xff}, // "#d7d7af" + 188: {R: 0xd7, G: 0xd7, B: 0xd7, A: 0xff}, // "#d7d7d7" + 189: {R: 0xd7, G: 0xd7, B: 0xff, A: 0xff}, // "#d7d7ff" + 190: {R: 0xd7, G: 0xff, B: 0x00, A: 0xff}, // "#d7ff00" + 191: {R: 0xd7, G: 0xff, B: 0x5f, A: 0xff}, // "#d7ff5f" + 192: {R: 0xd7, G: 0xff, B: 0x87, A: 0xff}, // "#d7ff87" + 193: {R: 0xd7, G: 0xff, B: 0xaf, A: 0xff}, // "#d7ffaf" + 194: {R: 0xd7, G: 0xff, B: 0xd7, A: 0xff}, // "#d7ffd7" + 195: {R: 0xd7, G: 0xff, B: 0xff, A: 0xff}, // "#d7ffff" + 196: {R: 0xff, G: 0x00, B: 0x00, A: 0xff}, // "#ff0000" + 197: {R: 0xff, G: 0x00, B: 0x5f, A: 0xff}, // "#ff005f" + 198: {R: 0xff, G: 0x00, B: 0x87, A: 0xff}, // "#ff0087" + 199: {R: 0xff, G: 0x00, B: 0xaf, A: 0xff}, // "#ff00af" + 200: {R: 0xff, G: 0x00, B: 0xd7, A: 0xff}, // "#ff00d7" + 201: {R: 0xff, G: 0x00, B: 0xff, A: 0xff}, // "#ff00ff" + 202: {R: 0xff, G: 0x5f, B: 0x00, A: 0xff}, // "#ff5f00" + 203: {R: 0xff, G: 0x5f, B: 0x5f, A: 0xff}, // "#ff5f5f" + 204: {R: 0xff, G: 0x5f, B: 0x87, A: 0xff}, // "#ff5f87" + 205: {R: 0xff, G: 0x5f, B: 0xaf, A: 0xff}, // "#ff5faf" + 206: {R: 0xff, G: 0x5f, B: 0xd7, A: 0xff}, // "#ff5fd7" + 207: {R: 0xff, G: 0x5f, B: 0xff, A: 0xff}, // "#ff5fff" + 208: {R: 0xff, G: 0x87, B: 0x00, A: 0xff}, // "#ff8700" + 209: {R: 0xff, G: 0x87, B: 0x5f, A: 0xff}, // "#ff875f" + 210: {R: 0xff, G: 0x87, B: 0x87, A: 0xff}, // "#ff8787" + 211: {R: 0xff, G: 0x87, B: 0xaf, A: 0xff}, // "#ff87af" + 212: {R: 0xff, G: 0x87, B: 0xd7, A: 0xff}, // "#ff87d7" + 213: {R: 0xff, G: 0x87, B: 0xff, A: 0xff}, // "#ff87ff" + 214: {R: 0xff, G: 0xaf, B: 0x00, A: 0xff}, // "#ffaf00" + 215: {R: 0xff, G: 0xaf, B: 0x5f, A: 0xff}, // "#ffaf5f" + 216: {R: 0xff, G: 0xaf, B: 0x87, A: 0xff}, // "#ffaf87" + 217: {R: 0xff, G: 0xaf, B: 0xaf, A: 0xff}, // "#ffafaf" + 218: {R: 0xff, G: 0xaf, B: 0xd7, A: 0xff}, // "#ffafd7" + 219: {R: 0xff, G: 0xaf, B: 0xff, A: 0xff}, // "#ffafff" + 220: {R: 0xff, G: 0xd7, B: 0x00, A: 0xff}, // "#ffd700" + 221: {R: 0xff, G: 0xd7, B: 0x5f, A: 0xff}, // "#ffd75f" + 222: {R: 0xff, G: 0xd7, B: 0x87, A: 0xff}, // "#ffd787" + 223: {R: 0xff, G: 0xd7, B: 0xaf, A: 0xff}, // "#ffd7af" + 224: {R: 0xff, G: 0xd7, B: 0xd7, A: 0xff}, // "#ffd7d7" + 225: {R: 0xff, G: 0xd7, B: 0xff, A: 0xff}, // "#ffd7ff" + 226: {R: 0xff, G: 0xff, B: 0x00, A: 0xff}, // "#ffff00" + 227: {R: 0xff, G: 0xff, B: 0x5f, A: 0xff}, // "#ffff5f" + 228: {R: 0xff, G: 0xff, B: 0x87, A: 0xff}, // "#ffff87" + 229: {R: 0xff, G: 0xff, B: 0xaf, A: 0xff}, // "#ffffaf" + 230: {R: 0xff, G: 0xff, B: 0xd7, A: 0xff}, // "#ffffd7" + 231: {R: 0xff, G: 0xff, B: 0xff, A: 0xff}, // "#ffffff" + 232: {R: 0x08, G: 0x08, B: 0x08, A: 0xff}, // "#080808" + 233: {R: 0x12, G: 0x12, B: 0x12, A: 0xff}, // "#121212" + 234: {R: 0x1c, G: 0x1c, B: 0x1c, A: 0xff}, // "#1c1c1c" + 235: {R: 0x26, G: 0x26, B: 0x26, A: 0xff}, // "#262626" + 236: {R: 0x30, G: 0x30, B: 0x30, A: 0xff}, // "#303030" + 237: {R: 0x3a, G: 0x3a, B: 0x3a, A: 0xff}, // "#3a3a3a" + 238: {R: 0x44, G: 0x44, B: 0x44, A: 0xff}, // "#444444" + 239: {R: 0x4e, G: 0x4e, B: 0x4e, A: 0xff}, // "#4e4e4e" + 240: {R: 0x58, G: 0x58, B: 0x58, A: 0xff}, // "#585858" + 241: {R: 0x62, G: 0x62, B: 0x62, A: 0xff}, // "#626262" + 242: {R: 0x6c, G: 0x6c, B: 0x6c, A: 0xff}, // "#6c6c6c" + 243: {R: 0x76, G: 0x76, B: 0x76, A: 0xff}, // "#767676" + 244: {R: 0x80, G: 0x80, B: 0x80, A: 0xff}, // "#808080" + 245: {R: 0x8a, G: 0x8a, B: 0x8a, A: 0xff}, // "#8a8a8a" + 246: {R: 0x94, G: 0x94, B: 0x94, A: 0xff}, // "#949494" + 247: {R: 0x9e, G: 0x9e, B: 0x9e, A: 0xff}, // "#9e9e9e" + 248: {R: 0xa8, G: 0xa8, B: 0xa8, A: 0xff}, // "#a8a8a8" + 249: {R: 0xb2, G: 0xb2, B: 0xb2, A: 0xff}, // "#b2b2b2" + 250: {R: 0xbc, G: 0xbc, B: 0xbc, A: 0xff}, // "#bcbcbc" + 251: {R: 0xc6, G: 0xc6, B: 0xc6, A: 0xff}, // "#c6c6c6" + 252: {R: 0xd0, G: 0xd0, B: 0xd0, A: 0xff}, // "#d0d0d0" + 253: {R: 0xda, G: 0xda, B: 0xda, A: 0xff}, // "#dadada" + 254: {R: 0xe4, G: 0xe4, B: 0xe4, A: 0xff}, // "#e4e4e4" + 255: {R: 0xee, G: 0xee, B: 0xee, A: 0xff}, // "#eeeeee" +} + +var ansi256To16 = [...]BasicColor{ + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + 10: 10, + 11: 11, + 12: 12, + 13: 13, + 14: 14, + 15: 15, + 16: 0, + 17: 4, + 18: 4, + 19: 4, + 20: 12, + 21: 12, + 22: 2, + 23: 6, + 24: 4, + 25: 4, + 26: 12, + 27: 12, + 28: 2, + 29: 2, + 30: 6, + 31: 4, + 32: 12, + 33: 12, + 34: 2, + 35: 2, + 36: 2, + 37: 6, + 38: 12, + 39: 12, + 40: 10, + 41: 10, + 42: 10, + 43: 10, + 44: 14, + 45: 12, + 46: 10, + 47: 10, + 48: 10, + 49: 10, + 50: 10, + 51: 14, + 52: 1, + 53: 5, + 54: 4, + 55: 4, + 56: 12, + 57: 12, + 58: 3, + 59: 8, + 60: 4, + 61: 4, + 62: 12, + 63: 12, + 64: 2, + 65: 2, + 66: 6, + 67: 4, + 68: 12, + 69: 12, + 70: 2, + 71: 2, + 72: 2, + 73: 6, + 74: 12, + 75: 12, + 76: 10, + 77: 10, + 78: 10, + 79: 10, + 80: 14, + 81: 12, + 82: 10, + 83: 10, + 84: 10, + 85: 10, + 86: 10, + 87: 14, + 88: 1, + 89: 1, + 90: 5, + 91: 4, + 92: 12, + 93: 12, + 94: 1, + 95: 1, + 96: 5, + 97: 4, + 98: 12, + 99: 12, + 100: 3, + 101: 3, + 102: 8, + 103: 4, + 104: 12, + 105: 12, + 106: 2, + 107: 2, + 108: 2, + 109: 6, + 110: 12, + 111: 12, + 112: 10, + 113: 10, + 114: 10, + 115: 10, + 116: 14, + 117: 12, + 118: 10, + 119: 10, + 120: 10, + 121: 10, + 122: 10, + 123: 14, + 124: 1, + 125: 1, + 126: 1, + 127: 5, + 128: 12, + 129: 12, + 130: 1, + 131: 1, + 132: 1, + 133: 5, + 134: 12, + 135: 12, + 136: 1, + 137: 1, + 138: 1, + 139: 5, + 140: 12, + 141: 12, + 142: 3, + 143: 3, + 144: 3, + 145: 7, + 146: 12, + 147: 12, + 148: 10, + 149: 10, + 150: 10, + 151: 10, + 152: 14, + 153: 12, + 154: 10, + 155: 10, + 156: 10, + 157: 10, + 158: 10, + 159: 14, + 160: 9, + 161: 9, + 162: 9, + 163: 9, + 164: 13, + 165: 12, + 166: 9, + 167: 9, + 168: 9, + 169: 9, + 170: 13, + 171: 12, + 172: 9, + 173: 9, + 174: 9, + 175: 9, + 176: 13, + 177: 12, + 178: 9, + 179: 9, + 180: 9, + 181: 9, + 182: 13, + 183: 12, + 184: 11, + 185: 11, + 186: 11, + 187: 11, + 188: 7, + 189: 12, + 190: 10, + 191: 10, + 192: 10, + 193: 10, + 194: 10, + 195: 14, + 196: 9, + 197: 9, + 198: 9, + 199: 9, + 200: 9, + 201: 13, + 202: 9, + 203: 9, + 204: 9, + 205: 9, + 206: 9, + 207: 13, + 208: 9, + 209: 9, + 210: 9, + 211: 9, + 212: 9, + 213: 13, + 214: 9, + 215: 9, + 216: 9, + 217: 9, + 218: 9, + 219: 13, + 220: 9, + 221: 9, + 222: 9, + 223: 9, + 224: 9, + 225: 13, + 226: 11, + 227: 11, + 228: 11, + 229: 11, + 230: 11, + 231: 15, + 232: 0, + 233: 0, + 234: 0, + 235: 0, + 236: 0, + 237: 0, + 238: 8, + 239: 8, + 240: 8, + 241: 8, + 242: 8, + 243: 8, + 244: 7, + 245: 7, + 246: 7, + 247: 7, + 248: 7, + 249: 7, + 250: 15, + 251: 15, + 252: 15, + 253: 15, + 254: 15, + 255: 15, +} diff --git a/vendor/github.com/charmbracelet/x/ansi/cursor.go b/vendor/github.com/charmbracelet/x/ansi/cursor.go index 0c364d608..2a74c483c 100644 --- a/vendor/github.com/charmbracelet/x/ansi/cursor.go +++ b/vendor/github.com/charmbracelet/x/ansi/cursor.go @@ -1,6 +1,8 @@ package ansi -import "strconv" +import ( + "strconv" +) // SaveCursor (DECSC) is an escape sequence that saves the current cursor // position. @@ -260,7 +262,7 @@ func CHA(col int) string { // See: https://vt100.net/docs/vt510-rm/CUP.html func CursorPosition(col, row int) string { if row <= 0 && col <= 0 { - return HomeCursorPosition + return CursorHomePosition } var r, c string diff --git a/vendor/github.com/charmbracelet/x/ansi/finalterm.go b/vendor/github.com/charmbracelet/x/ansi/finalterm.go new file mode 100644 index 000000000..2c2834728 --- /dev/null +++ b/vendor/github.com/charmbracelet/x/ansi/finalterm.go @@ -0,0 +1,67 @@ +package ansi + +import "strings" + +// FinalTerm returns an escape sequence that is used for shell integrations. +// Originally, FinalTerm designed the protocol hence the name. +// +// OSC 133 ; Ps ; Pm ST +// OSC 133 ; Ps ; Pm BEL +// +// See: https://iterm2.com/documentation-shell-integration.html +func FinalTerm(pm ...string) string { + return "\x1b]133;" + strings.Join(pm, ";") + "\x07" +} + +// FinalTermPrompt returns an escape sequence that is used for shell +// integrations prompt marks. This is sent just before the start of the shell +// prompt. +// +// This is an alias for FinalTerm("A"). +func FinalTermPrompt(pm ...string) string { + if len(pm) == 0 { + return FinalTerm("A") + } + return FinalTerm(append([]string{"A"}, pm...)...) +} + +// FinalTermCmdStart returns an escape sequence that is used for shell +// integrations command start marks. This is sent just after the end of the +// shell prompt, before the user enters a command. +// +// This is an alias for FinalTerm("B"). +func FinalTermCmdStart(pm ...string) string { + if len(pm) == 0 { + return FinalTerm("B") + } + return FinalTerm(append([]string{"B"}, pm...)...) +} + +// FinalTermCmdExecuted returns an escape sequence that is used for shell +// integrations command executed marks. This is sent just before the start of +// the command output. +// +// This is an alias for FinalTerm("C"). +func FinalTermCmdExecuted(pm ...string) string { + if len(pm) == 0 { + return FinalTerm("C") + } + return FinalTerm(append([]string{"C"}, pm...)...) +} + +// FinalTermCmdFinished returns an escape sequence that is used for shell +// integrations command finished marks. +// +// If the command was sent after +// [FinalTermCmdStart], it indicates that the command was aborted. If the +// command was sent after [FinalTermCmdExecuted], it indicates the end of the +// command output. If neither was sent, [FinalTermCmdFinished] should be +// ignored. +// +// This is an alias for FinalTerm("D"). +func FinalTermCmdFinished(pm ...string) string { + if len(pm) == 0 { + return FinalTerm("D") + } + return FinalTerm(append([]string{"D"}, pm...)...) +} diff --git a/vendor/github.com/charmbracelet/x/ansi/graphics.go b/vendor/github.com/charmbracelet/x/ansi/graphics.go index 604fef47c..b5b1dc82f 100644 --- a/vendor/github.com/charmbracelet/x/ansi/graphics.go +++ b/vendor/github.com/charmbracelet/x/ansi/graphics.go @@ -8,11 +8,49 @@ import ( "image" "io" "os" + "strconv" "strings" "github.com/charmbracelet/x/ansi/kitty" ) +// SixelGraphics returns a sequence that encodes the given sixel image payload to +// a DCS sixel sequence. +// +// DCS p1; p2; p3; q [sixel payload] ST +// +// p1 = pixel aspect ratio, deprecated and replaced by pixel metrics in the payload +// +// p2 = This is supposed to be 0 for transparency, but terminals don't seem to +// to use it properly. Value 0 leaves an unsightly black bar on all terminals +// I've tried and looks correct with value 1. +// +// p3 = Horizontal grid size parameter. Everyone ignores this and uses a fixed grid +// size, as far as I can tell. +// +// See https://shuford.invisible-island.net/all_about_sixels.txt +func SixelGraphics(p1, p2, p3 int, payload []byte) string { + var buf bytes.Buffer + + buf.WriteString("\x1bP") + if p1 >= 0 { + buf.WriteString(strconv.Itoa(p1)) + } + buf.WriteByte(';') + if p2 >= 0 { + buf.WriteString(strconv.Itoa(p2)) + } + if p3 > 0 { + buf.WriteByte(';') + buf.WriteString(strconv.Itoa(p3)) + } + buf.WriteByte('q') + buf.Write(payload) + buf.WriteString("\x1b\\") + + return buf.String() +} + // KittyGraphics returns a sequence that encodes the given image in the Kitty // graphics protocol. // @@ -43,7 +81,7 @@ var ( KittyGraphicsTempPattern = "tty-graphics-protocol-*" ) -// WriteKittyGraphics writes an image using the Kitty Graphics protocol with +// EncodeKittyGraphics writes an image using the Kitty Graphics protocol with // the given options to w. It chunks the written data if o.Chunk is true. // // You can omit m and use nil when rendering an image from a file. In this @@ -54,7 +92,7 @@ var ( // the terminal. // // See https://sw.kovidgoyal.net/kitty/graphics-protocol/ -func WriteKittyGraphics(w io.Writer, m image.Image, o *kitty.Options) error { +func EncodeKittyGraphics(w io.Writer, m image.Image, o *kitty.Options) error { if o == nil { o = &kitty.Options{} } diff --git a/vendor/github.com/charmbracelet/x/ansi/mode.go b/vendor/github.com/charmbracelet/x/ansi/mode.go index 57f3f0a8e..b57b09cc7 100644 --- a/vendor/github.com/charmbracelet/x/ansi/mode.go +++ b/vendor/github.com/charmbracelet/x/ansi/mode.go @@ -243,6 +243,21 @@ const ( RequestInsertReplaceMode = "\x1b[4$p" ) +// BiDirectional Support Mode (BDSM) is a mode that determines whether the +// terminal supports bidirectional text. When enabled, the terminal supports +// bidirectional text and is set to implicit bidirectional mode. When disabled, +// the terminal does not support bidirectional text. +// +// See ECMA-48 7.2.1. +const ( + BiDirectionalSupportMode = ANSIMode(8) + BDSM = BiDirectionalSupportMode + + SetBiDirectionalSupportMode = "\x1b[8h" + ResetBiDirectionalSupportMode = "\x1b[8l" + RequestBiDirectionalSupportMode = "\x1b[8$p" +) + // Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether // the terminal echoes characters back to the host. When enabled, the terminal // sends characters to the host as they are typed. diff --git a/vendor/github.com/charmbracelet/x/ansi/modes.go b/vendor/github.com/charmbracelet/x/ansi/modes.go index 1bec5bc80..6856d35e4 100644 --- a/vendor/github.com/charmbracelet/x/ansi/modes.go +++ b/vendor/github.com/charmbracelet/x/ansi/modes.go @@ -4,12 +4,6 @@ package ansi // all modes are [ModeNotRecognized]. type Modes map[Mode]ModeSetting -// NewModes creates a new Modes map. By default, all modes are -// [ModeNotRecognized]. -func NewModes() Modes { - return make(Modes) -} - // Get returns the setting of a terminal mode. If the mode is not set, it // returns [ModeNotRecognized]. func (m Modes) Get(mode Mode) ModeSetting { diff --git a/vendor/github.com/charmbracelet/x/ansi/sgr.go b/vendor/github.com/charmbracelet/x/ansi/sgr.go index 1a18c98ef..c4bd2afad 100644 --- a/vendor/github.com/charmbracelet/x/ansi/sgr.go +++ b/vendor/github.com/charmbracelet/x/ansi/sgr.go @@ -1,7 +1,5 @@ package ansi -import "strconv" - // Select Graphic Rendition (SGR) is a command that sets display attributes. // // Default is 0. @@ -14,20 +12,7 @@ func SelectGraphicRendition(ps ...Attr) string { return ResetStyle } - var s Style - for _, p := range ps { - attr, ok := attrStrings[p] - if ok { - s = append(s, attr) - } else { - if p < 0 { - p = 0 - } - s = append(s, strconv.Itoa(p)) - } - } - - return s.String() + return NewStyle(ps...).String() } // SGR is an alias for [SelectGraphicRendition]. @@ -36,60 +21,59 @@ func SGR(ps ...Attr) string { } var attrStrings = map[int]string{ - ResetAttr: "0", - BoldAttr: "1", - FaintAttr: "2", - ItalicAttr: "3", - UnderlineAttr: "4", - SlowBlinkAttr: "5", - RapidBlinkAttr: "6", - ReverseAttr: "7", - ConcealAttr: "8", - StrikethroughAttr: "9", - NoBoldAttr: "21", - NormalIntensityAttr: "22", - NoItalicAttr: "23", - NoUnderlineAttr: "24", - NoBlinkAttr: "25", - NoReverseAttr: "27", - NoConcealAttr: "28", - NoStrikethroughAttr: "29", - BlackForegroundColorAttr: "30", - RedForegroundColorAttr: "31", - GreenForegroundColorAttr: "32", - YellowForegroundColorAttr: "33", - BlueForegroundColorAttr: "34", - MagentaForegroundColorAttr: "35", - CyanForegroundColorAttr: "36", - WhiteForegroundColorAttr: "37", - ExtendedForegroundColorAttr: "38", - DefaultForegroundColorAttr: "39", - BlackBackgroundColorAttr: "40", - RedBackgroundColorAttr: "41", - GreenBackgroundColorAttr: "42", - YellowBackgroundColorAttr: "43", - BlueBackgroundColorAttr: "44", - MagentaBackgroundColorAttr: "45", - CyanBackgroundColorAttr: "46", - WhiteBackgroundColorAttr: "47", - ExtendedBackgroundColorAttr: "48", - DefaultBackgroundColorAttr: "49", - ExtendedUnderlineColorAttr: "58", - DefaultUnderlineColorAttr: "59", - BrightBlackForegroundColorAttr: "90", - BrightRedForegroundColorAttr: "91", - BrightGreenForegroundColorAttr: "92", - BrightYellowForegroundColorAttr: "93", - BrightBlueForegroundColorAttr: "94", - BrightMagentaForegroundColorAttr: "95", - BrightCyanForegroundColorAttr: "96", - BrightWhiteForegroundColorAttr: "97", - BrightBlackBackgroundColorAttr: "100", - BrightRedBackgroundColorAttr: "101", - BrightGreenBackgroundColorAttr: "102", - BrightYellowBackgroundColorAttr: "103", - BrightBlueBackgroundColorAttr: "104", - BrightMagentaBackgroundColorAttr: "105", - BrightCyanBackgroundColorAttr: "106", - BrightWhiteBackgroundColorAttr: "107", + ResetAttr: resetAttr, + BoldAttr: boldAttr, + FaintAttr: faintAttr, + ItalicAttr: italicAttr, + UnderlineAttr: underlineAttr, + SlowBlinkAttr: slowBlinkAttr, + RapidBlinkAttr: rapidBlinkAttr, + ReverseAttr: reverseAttr, + ConcealAttr: concealAttr, + StrikethroughAttr: strikethroughAttr, + NormalIntensityAttr: normalIntensityAttr, + NoItalicAttr: noItalicAttr, + NoUnderlineAttr: noUnderlineAttr, + NoBlinkAttr: noBlinkAttr, + NoReverseAttr: noReverseAttr, + NoConcealAttr: noConcealAttr, + NoStrikethroughAttr: noStrikethroughAttr, + BlackForegroundColorAttr: blackForegroundColorAttr, + RedForegroundColorAttr: redForegroundColorAttr, + GreenForegroundColorAttr: greenForegroundColorAttr, + YellowForegroundColorAttr: yellowForegroundColorAttr, + BlueForegroundColorAttr: blueForegroundColorAttr, + MagentaForegroundColorAttr: magentaForegroundColorAttr, + CyanForegroundColorAttr: cyanForegroundColorAttr, + WhiteForegroundColorAttr: whiteForegroundColorAttr, + ExtendedForegroundColorAttr: extendedForegroundColorAttr, + DefaultForegroundColorAttr: defaultForegroundColorAttr, + BlackBackgroundColorAttr: blackBackgroundColorAttr, + RedBackgroundColorAttr: redBackgroundColorAttr, + GreenBackgroundColorAttr: greenBackgroundColorAttr, + YellowBackgroundColorAttr: yellowBackgroundColorAttr, + BlueBackgroundColorAttr: blueBackgroundColorAttr, + MagentaBackgroundColorAttr: magentaBackgroundColorAttr, + CyanBackgroundColorAttr: cyanBackgroundColorAttr, + WhiteBackgroundColorAttr: whiteBackgroundColorAttr, + ExtendedBackgroundColorAttr: extendedBackgroundColorAttr, + DefaultBackgroundColorAttr: defaultBackgroundColorAttr, + ExtendedUnderlineColorAttr: extendedUnderlineColorAttr, + DefaultUnderlineColorAttr: defaultUnderlineColorAttr, + BrightBlackForegroundColorAttr: brightBlackForegroundColorAttr, + BrightRedForegroundColorAttr: brightRedForegroundColorAttr, + BrightGreenForegroundColorAttr: brightGreenForegroundColorAttr, + BrightYellowForegroundColorAttr: brightYellowForegroundColorAttr, + BrightBlueForegroundColorAttr: brightBlueForegroundColorAttr, + BrightMagentaForegroundColorAttr: brightMagentaForegroundColorAttr, + BrightCyanForegroundColorAttr: brightCyanForegroundColorAttr, + BrightWhiteForegroundColorAttr: brightWhiteForegroundColorAttr, + BrightBlackBackgroundColorAttr: brightBlackBackgroundColorAttr, + BrightRedBackgroundColorAttr: brightRedBackgroundColorAttr, + BrightGreenBackgroundColorAttr: brightGreenBackgroundColorAttr, + BrightYellowBackgroundColorAttr: brightYellowBackgroundColorAttr, + BrightBlueBackgroundColorAttr: brightBlueBackgroundColorAttr, + BrightMagentaBackgroundColorAttr: brightMagentaBackgroundColorAttr, + BrightCyanBackgroundColorAttr: brightCyanBackgroundColorAttr, + BrightWhiteBackgroundColorAttr: brightWhiteBackgroundColorAttr, } diff --git a/vendor/github.com/charmbracelet/x/ansi/style.go b/vendor/github.com/charmbracelet/x/ansi/style.go index 46ddcaa99..c8663f32b 100644 --- a/vendor/github.com/charmbracelet/x/ansi/style.go +++ b/vendor/github.com/charmbracelet/x/ansi/style.go @@ -17,6 +17,26 @@ type Attr = int // Style represents an ANSI SGR (Select Graphic Rendition) style. type Style []string +// NewStyle returns a new style with the given attributes. +func NewStyle(attrs ...Attr) Style { + if len(attrs) == 0 { + return Style{} + } + s := make(Style, 0, len(attrs)) + for _, a := range attrs { + attr, ok := attrStrings[a] + if ok { + s = append(s, attr) + } else { + if a < 0 { + a = 0 + } + s = append(s, strconv.Itoa(a)) + } + } + return s +} + // String returns the ANSI SGR (Select Graphic Rendition) style sequence for // the given style. func (s Style) String() string { @@ -127,11 +147,6 @@ func (s Style) Strikethrough() Style { return append(s, strikethroughAttr) } -// NoBold appends the no bold style attribute to the style. -func (s Style) NoBold() Style { - return append(s, noBoldAttr) -} - // NormalIntensity appends the normal intensity style attribute to the style. func (s Style) NormalIntensity() Style { return append(s, normalIntensityAttr) @@ -236,7 +251,6 @@ const ( ReverseAttr Attr = 7 ConcealAttr Attr = 8 StrikethroughAttr Attr = 9 - NoBoldAttr Attr = 21 // Some terminals treat this as double underline. NormalIntensityAttr Attr = 22 NoItalicAttr Attr = 23 NoUnderlineAttr Attr = 24 @@ -298,7 +312,6 @@ const ( reverseAttr = "7" concealAttr = "8" strikethroughAttr = "9" - noBoldAttr = "21" normalIntensityAttr = "22" noItalicAttr = "23" noUnderlineAttr = "24" diff --git a/vendor/github.com/charmbracelet/x/ansi/title.go b/vendor/github.com/charmbracelet/x/ansi/title.go index 8fd8bf98d..54ef94235 100644 --- a/vendor/github.com/charmbracelet/x/ansi/title.go +++ b/vendor/github.com/charmbracelet/x/ansi/title.go @@ -30,3 +30,19 @@ func SetIconName(s string) string { func SetWindowTitle(s string) string { return "\x1b]2;" + s + "\x07" } + +// DECSWT is a sequence for setting the window title. +// +// This is an alias for [SetWindowTitle]("1;"). +// See: EK-VT520-RM 5–156 https://vt100.net/dec/ek-vt520-rm.pdf +func DECSWT(name string) string { + return SetWindowTitle("1;" + name) +} + +// DECSIN is a sequence for setting the icon name. +// +// This is an alias for [SetWindowTitle]("L;"). +// See: EK-VT520-RM 5–134 https://vt100.net/dec/ek-vt520-rm.pdf +func DECSIN(name string) string { + return SetWindowTitle("L;" + name) +} diff --git a/vendor/github.com/charmbracelet/x/ansi/truncate.go b/vendor/github.com/charmbracelet/x/ansi/truncate.go index 1fa3efefe..3f541fa56 100644 --- a/vendor/github.com/charmbracelet/x/ansi/truncate.go +++ b/vendor/github.com/charmbracelet/x/ansi/truncate.go @@ -10,8 +10,7 @@ import ( // Cut the string, without adding any prefix or tail strings. This function is // aware of ANSI escape codes and will not break them, and accounts for -// wide-characters (such as East-Asian characters and emojis). Note that the -// [left] parameter is inclusive, while [right] isn't. +// wide-characters (such as East-Asian characters and emojis). // This treats the text as a sequence of graphemes. func Cut(s string, left, right int) string { return cut(GraphemeWidth, s, left, right) @@ -19,8 +18,10 @@ func Cut(s string, left, right int) string { // CutWc the string, without adding any prefix or tail strings. This function is // aware of ANSI escape codes and will not break them, and accounts for -// wide-characters (such as East-Asian characters and emojis). Note that the -// [left] parameter is inclusive, while [right] isn't. +// wide-characters (such as East-Asian characters and emojis). +// Note that the [left] parameter is inclusive, while [right] isn't, +// which is to say it'll return `[left, right)`. +// // This treats the text as a sequence of wide characters and runes. func CutWc(s string, left, right int) string { return cut(WcWidth, s, left, right) @@ -41,7 +42,7 @@ func cut(m Method, s string, left, right int) string { if left == 0 { return truncate(s, right, "") } - return truncateLeft(Truncate(s, right, ""), left, "") + return truncateLeft(truncate(s, right, ""), left, "") } // Truncate truncates a string to a given length, adding a tail to the end if @@ -99,6 +100,7 @@ func truncate(m Method, s string, length int, tail string) string { // increment the index by the length of the cluster i += len(cluster) + curWidth += width // Are we ignoring? Skip to the next byte if ignoring { @@ -107,16 +109,15 @@ func truncate(m Method, s string, length int, tail string) string { // Is this gonna be too wide? // If so write the tail and stop collecting. - if curWidth+width > length && !ignoring { + if curWidth > length && !ignoring { ignoring = true buf.WriteString(tail) } - if curWidth+width > length { + if curWidth > length { continue } - curWidth += width buf.Write(cluster) // Done collecting, now we're back in the ground state. @@ -142,6 +143,14 @@ func truncate(m Method, s string, length int, tail string) string { // collects printable ASCII curWidth++ fallthrough + case parser.ExecuteAction: + // execute action will be things like \n, which, if outside the cut, + // should be ignored. + if ignoring { + i++ + continue + } + fallthrough default: buf.WriteByte(b[i]) i++ @@ -214,14 +223,14 @@ func truncateLeft(m Method, s string, n int, prefix string) string { buf.WriteString(prefix) } - if ignoring { - continue - } - if curWidth > n { buf.Write(cluster) } + if ignoring { + continue + } + pstate = parser.GroundState continue } @@ -240,6 +249,14 @@ func truncateLeft(m Method, s string, n int, prefix string) string { continue } + fallthrough + case parser.ExecuteAction: + // execute action will be things like \n, which, if outside the cut, + // should be ignored. + if ignoring { + i++ + continue + } fallthrough default: buf.WriteByte(b[i]) diff --git a/vendor/github.com/charmbracelet/x/ansi/util.go b/vendor/github.com/charmbracelet/x/ansi/util.go index 301ef15ff..0f5cea787 100644 --- a/vendor/github.com/charmbracelet/x/ansi/util.go +++ b/vendor/github.com/charmbracelet/x/ansi/util.go @@ -10,7 +10,7 @@ import ( ) // colorToHexString returns a hex string representation of a color. -func colorToHexString(c color.Color) string { +func colorToHexString(c color.Color) string { //nolint:unused if c == nil { return "" } @@ -28,7 +28,7 @@ func colorToHexString(c color.Color) string { // rgbToHex converts red, green, and blue values to a hexadecimal value. // // hex := rgbToHex(0, 0, 255) // 0x0000FF -func rgbToHex(r, g, b uint32) uint32 { +func rgbToHex(r, g, b uint32) uint32 { //nolint:unused return r<<16 + g<<8 + b } diff --git a/vendor/github.com/charmbracelet/x/cellbuf/cell.go b/vendor/github.com/charmbracelet/x/cellbuf/cell.go index 991c919e7..4d49d45ee 100644 --- a/vendor/github.com/charmbracelet/x/cellbuf/cell.go +++ b/vendor/github.com/charmbracelet/x/cellbuf/cell.go @@ -154,6 +154,11 @@ const ( ResetAttr AttrMask = 0 ) +// Contains returns whether the attribute mask contains the attribute. +func (a AttrMask) Contains(attr AttrMask) bool { + return a&attr == attr +} + // UnderlineStyle is the style of underline to use for text. type UnderlineStyle = ansi.UnderlineStyle diff --git a/vendor/github.com/charmbracelet/x/cellbuf/wrap.go b/vendor/github.com/charmbracelet/x/cellbuf/wrap.go index 59a2a3375..f89f52f60 100644 --- a/vendor/github.com/charmbracelet/x/cellbuf/wrap.go +++ b/vendor/github.com/charmbracelet/x/cellbuf/wrap.go @@ -8,6 +8,8 @@ import ( "github.com/charmbracelet/x/ansi" ) +const nbsp = '\u00a0' + // Wrap returns a string that is wrapped to the specified limit applying any // ANSI escape sequences in the string. It tries to wrap the string at word // boundaries, but will break words if necessary. @@ -39,6 +41,11 @@ func Wrap(s string, limit int, breakpoints string) string { wordLen int ) + hasBlankStyle := func() bool { + // Only follow reverse attribute, bg color and underline style + return !style.Attrs.Contains(ReverseAttr) && style.Bg == nil && style.UlStyle == NoUnderline + } + addSpace := func() { curWidth += space.Len() buf.Write(space.Bytes()) @@ -114,7 +121,7 @@ func Wrap(s string, limit int, breakpoints string) string { if len(seq) == 1 { // ASCII r, _ := utf8.DecodeRuneInString(seq) - if unicode.IsSpace(r) { + if r != nbsp && unicode.IsSpace(r) && hasBlankStyle() { addWord() space.WriteRune(r) break diff --git a/vendor/github.com/ckaznocha/intrange/go.work b/vendor/github.com/ckaznocha/intrange/go.work new file mode 100644 index 000000000..b7e127dcb --- /dev/null +++ b/vendor/github.com/ckaznocha/intrange/go.work @@ -0,0 +1,8 @@ +go 1.23.0 + +toolchain go1.23.4 + +use ( + . + ./testdata +) diff --git a/vendor/github.com/ghostiam/protogetter/processor.go b/vendor/github.com/ghostiam/protogetter/processor.go index aaa4ab3c6..42892fd5f 100644 --- a/vendor/github.com/ghostiam/protogetter/processor.go +++ b/vendor/github.com/ghostiam/protogetter/processor.go @@ -201,6 +201,28 @@ func (c *processor) process(n ast.Node) (*Result, error) { c.filter.AddPos(x.X.Pos()) + case *ast.DeclStmt: + decl, ok := x.Decl.(*ast.GenDecl) + if !ok { + return &Result{}, nil + } + + for _, spec := range decl.Specs { + vSpec, ok := spec.(*ast.ValueSpec) + if !ok { + continue + } + + _, ok = vSpec.Type.(*ast.StarExpr) + if !ok { + continue + } + + for _, ve := range vSpec.Values { + c.filter.AddPos(ve.Pos()) + } + } + default: return nil, fmt.Errorf("not implemented for type: %s (%s)", reflect.TypeOf(x), formatNode(n)) } @@ -236,11 +258,12 @@ func (c *processor) processInner(expr ast.Expr) { c.processInner(x.X) c.write(".") - // Skip if the field is filtered. - isFiltered := c.filter.IsFiltered(x.Sel.Pos()) - // If getter exists, use it. - if methodIsExists(c.info, x.X, "Get"+x.Sel.Name) && !isFiltered { + if methodIsExists(c.info, x.X, "Get"+x.Sel.Name) && + // Skip if the field is filtered. + !c.filter.IsFiltered(x.Sel.Pos()) && + // Check if the field is a proto-message. + isProtoMessage(c.info, x.X) { c.writeFrom(x.Sel.Name) c.writeTo("Get" + x.Sel.Name + "()") return diff --git a/vendor/github.com/ghostiam/protogetter/protogetter.go b/vendor/github.com/ghostiam/protogetter/protogetter.go index 0dbcf31c9..a64d1f5f0 100644 --- a/vendor/github.com/ghostiam/protogetter/protogetter.go +++ b/vendor/github.com/ghostiam/protogetter/protogetter.go @@ -97,6 +97,7 @@ func Run(pass *analysis.Pass, cfg *Config) error { (*ast.IncDecStmt)(nil), (*ast.UnaryExpr)(nil), (*ast.KeyValueExpr)(nil), + (*ast.DeclStmt)(nil), } // Skip filtered files. diff --git a/vendor/github.com/go-critic/go-critic/checkers/embedded_rules.go b/vendor/github.com/go-critic/go-critic/checkers/embedded_rules.go index ad507425e..0d448399e 100644 --- a/vendor/github.com/go-critic/go-critic/checkers/embedded_rules.go +++ b/vendor/github.com/go-critic/go-critic/checkers/embedded_rules.go @@ -6,6 +6,7 @@ import ( "go/build" "go/token" "os" + "sync" "github.com/go-critic/go-critic/checkers/rulesdata" "github.com/go-critic/go-critic/linter" @@ -15,6 +16,42 @@ import ( //go:generate go run ./rules/precompile.go -rules ./rules/rules.go -o ./rulesdata/rulesdata.go +// cachedEngine holds a pre-initialized ruleguard engine for a specific rule group. +// The engine is created once and reused for all checker instances. +type cachedEngine struct { + engine *ruleguard.Engine + once sync.Once + err error + + // Configuration needed to create the engine + fset *token.FileSet + buildContext *build.Context + groupName string + debug bool +} + +func (ce *cachedEngine) get() (*ruleguard.Engine, error) { + ce.once.Do(func() { + parseContext := &ruleguard.LoadContext{ + Fset: ce.fset, + GroupFilter: func(gr *ruleguard.GoRuleGroup) bool { + return gr.Name == ce.groupName + }, + DebugImports: ce.debug, + DebugPrint: func(s string) { + fmt.Println("debug:", s) + }, + } + engine := ruleguard.NewEngine() + engine.BuildContext = ce.buildContext + ce.err = engine.LoadFromIR(parseContext, "rules/rules.go", rulesdata.PrecompiledRules) + if ce.err == nil { + ce.engine = engine + } + }) + return ce.engine, ce.err +} + func InitEmbeddedRules() error { filename := "rules/rules.go" @@ -49,8 +86,8 @@ func InitEmbeddedRules() error { groups = rootEngine.LoadedGroups() } - // For every rules group we create a new checker and a separate engine. - // That dedicated ruleguard engine will contain rules only from one group. + // For every rules group we create a cached engine holder. + // The engine will be created lazily on first use and then reused. for i := range groups { g := groups[i] info := &linter.CheckerInfo{ @@ -63,20 +100,17 @@ func InitEmbeddedRules() error { EmbeddedRuleguard: true, } + + // Create a cached engine for this rule group + cache := &cachedEngine{ + fset: fset, + buildContext: buildContext, + groupName: g.Name, + debug: ruleguardDebug, + } + collection.AddChecker(info, func(ctx *linter.CheckerContext) (linter.FileWalker, error) { - parseContext := &ruleguard.LoadContext{ - Fset: fset, - GroupFilter: func(gr *ruleguard.GoRuleGroup) bool { - return gr.Name == g.Name - }, - DebugImports: ruleguardDebug, - DebugPrint: func(s string) { - fmt.Println("debug:", s) - }, - } - engine := ruleguard.NewEngine() - engine.BuildContext = buildContext - err := engine.LoadFromIR(parseContext, filename, rulesdata.PrecompiledRules) + engine, err := cache.get() if err != nil { return nil, err } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/max_len/max_len.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/max_len/max_len.go index 1d647c49e..fba28c96e 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/max_len/max_len.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/max_len/max_len.go @@ -4,11 +4,14 @@ package max_len import ( "fmt" gdc "go/doc/comment" + "regexp" + "slices" "strings" "unicode/utf8" "github.com/godoc-lint/godoc-lint/pkg/model" "github.com/godoc-lint/godoc-lint/pkg/util" + "golang.org/x/tools/go/analysis" ) const maxLenRule = model.MaxLenRule @@ -32,6 +35,7 @@ func (r *MaxLenChecker) GetCoveredRules() model.RuleSet { func (r *MaxLenChecker) Apply(actx *model.AnalysisContext) error { includeTests := actx.Config.GetRuleOptions().MaxLenIncludeTests maxLen := int(actx.Config.GetRuleOptions().MaxLenLength) + ignoreRegexps := actx.Config.GetRuleOptions().MaxLenIgnorePatterns docs := make(map[*model.CommentGroup]struct{}, 10*len(actx.InspectorResult.Files)) @@ -52,12 +56,12 @@ func (r *MaxLenChecker) Apply(actx *model.AnalysisContext) error { } for doc := range docs { - checkMaxLen(actx, doc, maxLen) + checkMaxLen(actx, doc, maxLen, ignoreRegexps) } return nil } -func checkMaxLen(actx *model.AnalysisContext, doc *model.CommentGroup, maxLen int) { +func checkMaxLen(actx *model.AnalysisContext, doc *model.CommentGroup, maxLen int, ignoreRegexps []*regexp.Regexp) { if doc.DisabledRules.All || doc.DisabledRules.Rules.Has(maxLenRule) { return } @@ -81,14 +85,68 @@ func checkMaxLen(actx *model.AnalysisContext, doc *model.CommentGroup, maxLen in text := string((&gdc.Printer{}).Comment(strippedCodeAndLinks)) linesIter := strings.SplitSeq(removeCarriageReturn(text), "\n") + // This is a clone of the original comment list since we need to remove + // elements from it, if needed. The main purpose of this is to don't miss + // duplicate long lines. + cgl := slices.Clone(doc.CG.List) + for l := range linesIter { lineLen := utf8.RuneCountInString(l) if lineLen <= maxLen { continue } - actx.Pass.ReportRangef(&doc.CG, "godoc line is too long (%d > %d)", lineLen, maxLen) - break + if shouldIgnoreLine(l, ignoreRegexps) { + continue + } + + // Here we try to find the accurate position of the line within the + // original comment group. Historically, we would use the entire godoc + // block range to report the issue (See #55). + // + // However, the following approach does not work with /*..*/ comment + // blocks, since for them individual lines are not separately available, + // i.e. all lines would be in a single ast.Comment instance and + // therefore the ast.Comment.Pos will always point to the starting /* + // token. + + foundAt := -1 + for i, c := range cgl { + // As of [ast.Comment] docs, c.Text does not include carriage + // returns (\r) that may have been present in the source. This is + // good, since we have already stripped them from the lines. + // + // If the comment is a //-style one, c.Text starts with "// ". Since + // we're only interested in //-style cases, it's enough to check for + // that prefix. + if c.Text == "// "+l { + foundAt = i + break + } + } + + var rng analysis.Range + if foundAt != -1 { + rng = cgl[foundAt] + // Remove the found comment line from the list so that we don't miss + // duplicate long lines, or even reporting the same line number more + // than once while leaving the other(s). + cgl = slices.Delete(cgl, foundAt, foundAt+1) + } else { + // Fallback to reporting the entire godoc block. + rng = &doc.CG + } + + actx.Pass.ReportRangef(rng, "godoc line is too long (%d > %d)", lineLen, maxLen) + } +} + +func shouldIgnoreLine(line string, ignoreRegexps []*regexp.Regexp) bool { + for _, re := range ignoreRegexps { + if re.MatchString(line) { + return true + } } + return false } func removeCarriageReturn(s string) string { diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/registry.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/registry.go index 8452fa02c..657fa8bc4 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/registry.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/registry.go @@ -8,6 +8,7 @@ import ( "github.com/godoc-lint/godoc-lint/pkg/check/pkg_doc" "github.com/godoc-lint/godoc-lint/pkg/check/require_doc" "github.com/godoc-lint/godoc-lint/pkg/check/start_with_name" + "github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink" "github.com/godoc-lint/godoc-lint/pkg/model" ) @@ -37,6 +38,7 @@ func NewPopulatedRegistry() *Registry { start_with_name.NewStartWithNameChecker(), no_unused_link.NewNoUnusedLinkChecker(), deprecated.NewDeprecatedChecker(), + stdlib_doclink.NewStdlibDoclinkChecker(), ) } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/require_doc/require_doc.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/require_doc/require_doc.go index afa16bd78..de2436b7b 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/require_doc/require_doc.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/require_doc/require_doc.go @@ -40,6 +40,12 @@ func (r *RequireDocChecker) Apply(actx *model.AnalysisContext) error { for _, ir := range util.AnalysisApplicableFiles(actx, includeTests, model.RuleSet{}.Add(requireDocRule)) { for _, decl := range ir.SymbolDecl { isExported := ast.IsExported(decl.Name) + if decl.IsMethod && decl.MethodRecvBaseTypeName != "" { + // A method is considered exported (in terms of godoc visibility) + // only if both the method name and the base type name are exported. + isExported = isExported && ast.IsExported(decl.MethodRecvBaseTypeName) + } + if isExported && !requirePublic || !isExported && !requirePrivate { continue } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/start_with_name/start_with_name.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/start_with_name/start_with_name.go index f8c905aab..13c933dad 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/start_with_name/start_with_name.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/start_with_name/start_with_name.go @@ -41,6 +41,12 @@ func (r *StartWithNameChecker) Apply(actx *model.AnalysisContext) error { for _, ir := range util.AnalysisApplicableFiles(actx, includeTests, model.RuleSet{}.Add(startWithNameRule)) { for _, decl := range ir.SymbolDecl { isExported := ast.IsExported(decl.Name) + if decl.IsMethod && decl.MethodRecvBaseTypeName != "" { + // A method is considered exported (in terms of godoc visibility) + // only if both the method name and the base type name are exported. + isExported = isExported && ast.IsExported(decl.MethodRecvBaseTypeName) + } + if !isExported && !includePrivate { continue } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/data.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/data.go new file mode 100644 index 000000000..92fb8b1bc --- /dev/null +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/data.go @@ -0,0 +1,27 @@ +package stdlib_doclink + +import ( + "bytes" + _ "embed" + "encoding/json" + "sync" + + "github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal" +) + +//go:embed stdlib.json +var stdlibRaw []byte + +var stdlib = sync.OnceValue(func() internal.Stdlib { + v, _ := parseStdlib() + return v +}) + +func parseStdlib() (internal.Stdlib, error) { + result := internal.Stdlib{} + if err := json.NewDecoder(bytes.NewReader(stdlibRaw)).Decode(&result); err != nil { + // This never happens + return internal.Stdlib{}, err + } + return result, nil +} diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal/type.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal/type.go new file mode 100644 index 000000000..4197695e1 --- /dev/null +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal/type.go @@ -0,0 +1,30 @@ +// Package internal contains internal types for stdlib_doclink checker. +package internal + +import ( + _ "embed" +) + +// SymbolKind represents the kind of a symbol in the standard library. +type SymbolKind string + +// Kinds of symbols. +const ( + SymbolKindNA SymbolKind = "" + SymbolKindConst SymbolKind = "c" + SymbolKindVar SymbolKind = "v" + SymbolKindFunc SymbolKind = "f" + SymbolKindMethod SymbolKind = "m" + SymbolKindType SymbolKind = "t" +) + +// StdlibPackage represents a standard library package with its path, name, and +// symbols. +type StdlibPackage struct { + Path string `json:"path"` + Name string `json:"name"` + Symbols map[string]SymbolKind `json:"symbols"` +} + +// Stdlib represents a collection of standard library packages. +type Stdlib map[string]*StdlibPackage diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib.json b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib.json new file mode 100644 index 000000000..840ba17b5 --- /dev/null +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib.json @@ -0,0 +1 @@ +{"archive/tar":{"path":"archive/tar","name":"tar","symbols":{"ErrFieldTooLong":"v","ErrHeader":"v","ErrInsecurePath":"v","ErrWriteAfterClose":"v","ErrWriteTooLong":"v","FileInfoHeader":"f","FileInfoNames":"t","Format":"t","Format.String":"m","FormatGNU":"c","FormatPAX":"c","FormatUSTAR":"c","FormatUnknown":"c","Header":"t","Header.FileInfo":"m","NewReader":"f","NewWriter":"f","Reader":"t","Reader.Next":"m","Reader.Read":"m","TypeBlock":"c","TypeChar":"c","TypeCont":"c","TypeDir":"c","TypeFifo":"c","TypeGNULongLink":"c","TypeGNULongName":"c","TypeGNUSparse":"c","TypeLink":"c","TypeReg":"c","TypeRegA":"c","TypeSymlink":"c","TypeXGlobalHeader":"c","TypeXHeader":"c","Writer":"t","Writer.AddFS":"m","Writer.Close":"m","Writer.Flush":"m","Writer.Write":"m","Writer.WriteHeader":"m"}},"archive/zip":{"path":"archive/zip","name":"zip","symbols":{"Compressor":"t","Decompressor":"t","Deflate":"c","ErrAlgorithm":"v","ErrChecksum":"v","ErrFormat":"v","ErrInsecurePath":"v","File":"t","File.DataOffset":"m","File.Open":"m","File.OpenRaw":"m","FileHeader":"t","FileHeader.FileInfo":"m","FileHeader.ModTime":"m","FileHeader.Mode":"m","FileHeader.SetModTime":"m","FileHeader.SetMode":"m","FileInfoHeader":"f","NewReader":"f","NewWriter":"f","OpenReader":"f","ReadCloser":"t","ReadCloser.Close":"m","Reader":"t","Reader.Open":"m","Reader.RegisterDecompressor":"m","RegisterCompressor":"f","RegisterDecompressor":"f","Store":"c","Writer":"t","Writer.AddFS":"m","Writer.Close":"m","Writer.Copy":"m","Writer.Create":"m","Writer.CreateHeader":"m","Writer.CreateRaw":"m","Writer.Flush":"m","Writer.RegisterCompressor":"m","Writer.SetComment":"m","Writer.SetOffset":"m"}},"bufio":{"path":"bufio","name":"bufio","symbols":{"ErrAdvanceTooFar":"v","ErrBadReadCount":"v","ErrBufferFull":"v","ErrFinalToken":"v","ErrInvalidUnreadByte":"v","ErrInvalidUnreadRune":"v","ErrNegativeAdvance":"v","ErrNegativeCount":"v","ErrTooLong":"v","MaxScanTokenSize":"c","NewReadWriter":"f","NewReader":"f","NewReaderSize":"f","NewScanner":"f","NewWriter":"f","NewWriterSize":"f","ReadWriter":"t","Reader":"t","Reader.Buffered":"m","Reader.Discard":"m","Reader.Peek":"m","Reader.Read":"m","Reader.ReadByte":"m","Reader.ReadBytes":"m","Reader.ReadLine":"m","Reader.ReadRune":"m","Reader.ReadSlice":"m","Reader.ReadString":"m","Reader.Reset":"m","Reader.Size":"m","Reader.UnreadByte":"m","Reader.UnreadRune":"m","Reader.WriteTo":"m","ScanBytes":"f","ScanLines":"f","ScanRunes":"f","ScanWords":"f","Scanner":"t","Scanner.Buffer":"m","Scanner.Bytes":"m","Scanner.Err":"m","Scanner.Scan":"m","Scanner.Split":"m","Scanner.Text":"m","SplitFunc":"t","Writer":"t","Writer.Available":"m","Writer.AvailableBuffer":"m","Writer.Buffered":"m","Writer.Flush":"m","Writer.ReadFrom":"m","Writer.Reset":"m","Writer.Size":"m","Writer.Write":"m","Writer.WriteByte":"m","Writer.WriteRune":"m","Writer.WriteString":"m"}},"builtin":{"path":"builtin","name":"builtin","symbols":{"ComplexType":"t","FloatType":"t","IntegerType":"t","Type":"t","Type1":"t"}},"bytes":{"path":"bytes","name":"bytes","symbols":{"Buffer":"t","Buffer.Available":"m","Buffer.AvailableBuffer":"m","Buffer.Bytes":"m","Buffer.Cap":"m","Buffer.Grow":"m","Buffer.Len":"m","Buffer.Next":"m","Buffer.Read":"m","Buffer.ReadByte":"m","Buffer.ReadBytes":"m","Buffer.ReadFrom":"m","Buffer.ReadRune":"m","Buffer.ReadString":"m","Buffer.Reset":"m","Buffer.String":"m","Buffer.Truncate":"m","Buffer.UnreadByte":"m","Buffer.UnreadRune":"m","Buffer.Write":"m","Buffer.WriteByte":"m","Buffer.WriteRune":"m","Buffer.WriteString":"m","Buffer.WriteTo":"m","Clone":"f","Compare":"f","Contains":"f","ContainsAny":"f","ContainsFunc":"f","ContainsRune":"f","Count":"f","Cut":"f","CutPrefix":"f","CutSuffix":"f","Equal":"f","EqualFold":"f","ErrTooLarge":"v","Fields":"f","FieldsFunc":"f","FieldsFuncSeq":"f","FieldsSeq":"f","HasPrefix":"f","HasSuffix":"f","Index":"f","IndexAny":"f","IndexByte":"f","IndexFunc":"f","IndexRune":"f","Join":"f","LastIndex":"f","LastIndexAny":"f","LastIndexByte":"f","LastIndexFunc":"f","Lines":"f","Map":"f","MinRead":"c","NewBuffer":"f","NewBufferString":"f","NewReader":"f","Reader":"t","Reader.Len":"m","Reader.Read":"m","Reader.ReadAt":"m","Reader.ReadByte":"m","Reader.ReadRune":"m","Reader.Reset":"m","Reader.Seek":"m","Reader.Size":"m","Reader.UnreadByte":"m","Reader.UnreadRune":"m","Reader.WriteTo":"m","Repeat":"f","Replace":"f","ReplaceAll":"f","Runes":"f","Split":"f","SplitAfter":"f","SplitAfterN":"f","SplitAfterSeq":"f","SplitN":"f","SplitSeq":"f","Title":"f","ToLower":"f","ToLowerSpecial":"f","ToTitle":"f","ToTitleSpecial":"f","ToUpper":"f","ToUpperSpecial":"f","ToValidUTF8":"f","Trim":"f","TrimFunc":"f","TrimLeft":"f","TrimLeftFunc":"f","TrimPrefix":"f","TrimRight":"f","TrimRightFunc":"f","TrimSpace":"f","TrimSuffix":"f"}},"cmp":{"path":"cmp","name":"cmp","symbols":{"Compare":"f","Less":"f","Or":"f","Ordered":"t"}},"compress/bzip2":{"path":"compress/bzip2","name":"bzip2","symbols":{"NewReader":"f","StructuralError":"t","StructuralError.Error":"m"}},"compress/flate":{"path":"compress/flate","name":"flate","symbols":{"BestCompression":"c","BestSpeed":"c","CorruptInputError":"t","CorruptInputError.Error":"m","DefaultCompression":"c","HuffmanOnly":"c","InternalError":"t","InternalError.Error":"m","NewReader":"f","NewReaderDict":"f","NewWriter":"f","NewWriterDict":"f","NoCompression":"c","ReadError":"t","ReadError.Error":"m","Reader":"t","Resetter":"t","WriteError":"t","WriteError.Error":"m","Writer":"t","Writer.Close":"m","Writer.Flush":"m","Writer.Reset":"m","Writer.Write":"m"}},"compress/gzip":{"path":"compress/gzip","name":"gzip","symbols":{"BestCompression":"c","BestSpeed":"c","DefaultCompression":"c","ErrChecksum":"v","ErrHeader":"v","Header":"t","HuffmanOnly":"c","NewReader":"f","NewWriter":"f","NewWriterLevel":"f","NoCompression":"c","Reader":"t","Reader.Close":"m","Reader.Multistream":"m","Reader.Read":"m","Reader.Reset":"m","Writer":"t","Writer.Close":"m","Writer.Flush":"m","Writer.Reset":"m","Writer.Write":"m"}},"compress/lzw":{"path":"compress/lzw","name":"lzw","symbols":{"LSB":"c","MSB":"c","NewReader":"f","NewWriter":"f","Order":"t","Reader":"t","Reader.Close":"m","Reader.Read":"m","Reader.Reset":"m","Writer":"t","Writer.Close":"m","Writer.Reset":"m","Writer.Write":"m"}},"compress/zlib":{"path":"compress/zlib","name":"zlib","symbols":{"BestCompression":"c","BestSpeed":"c","DefaultCompression":"c","ErrChecksum":"v","ErrDictionary":"v","ErrHeader":"v","HuffmanOnly":"c","NewReader":"f","NewReaderDict":"f","NewWriter":"f","NewWriterLevel":"f","NewWriterLevelDict":"f","NoCompression":"c","Resetter":"t","Writer":"t","Writer.Close":"m","Writer.Flush":"m","Writer.Reset":"m","Writer.Write":"m"}},"container/heap":{"path":"container/heap","name":"heap","symbols":{"Fix":"f","Init":"f","Interface":"t","Pop":"f","Push":"f","Remove":"f"}},"container/list":{"path":"container/list","name":"list","symbols":{"Element":"t","Element.Next":"m","Element.Prev":"m","List":"t","List.Back":"m","List.Front":"m","List.Init":"m","List.InsertAfter":"m","List.InsertBefore":"m","List.Len":"m","List.MoveAfter":"m","List.MoveBefore":"m","List.MoveToBack":"m","List.MoveToFront":"m","List.PushBack":"m","List.PushBackList":"m","List.PushFront":"m","List.PushFrontList":"m","List.Remove":"m","New":"f"}},"container/ring":{"path":"container/ring","name":"ring","symbols":{"New":"f","Ring":"t","Ring.Do":"m","Ring.Len":"m","Ring.Link":"m","Ring.Move":"m","Ring.Next":"m","Ring.Prev":"m","Ring.Unlink":"m"}},"context":{"path":"context","name":"context","symbols":{"AfterFunc":"f","Background":"f","CancelCauseFunc":"t","CancelFunc":"t","Canceled":"v","Cause":"f","Context":"t","DeadlineExceeded":"v","TODO":"f","WithCancel":"f","WithCancelCause":"f","WithDeadline":"f","WithDeadlineCause":"f","WithTimeout":"f","WithTimeoutCause":"f","WithValue":"f","WithoutCancel":"f"}},"crypto":{"path":"crypto","name":"crypto","symbols":{"BLAKE2b_256":"c","BLAKE2b_384":"c","BLAKE2b_512":"c","BLAKE2s_256":"c","Decrypter":"t","DecrypterOpts":"t","Hash":"t","Hash.Available":"m","Hash.HashFunc":"m","Hash.New":"m","Hash.Size":"m","Hash.String":"m","MD4":"c","MD5":"c","MD5SHA1":"c","MessageSigner":"t","PrivateKey":"t","PublicKey":"t","RIPEMD160":"c","RegisterHash":"f","SHA1":"c","SHA224":"c","SHA256":"c","SHA384":"c","SHA3_224":"c","SHA3_256":"c","SHA3_384":"c","SHA3_512":"c","SHA512":"c","SHA512_224":"c","SHA512_256":"c","SignMessage":"f","Signer":"t","SignerOpts":"t"}},"crypto/aes":{"path":"crypto/aes","name":"aes","symbols":{"BlockSize":"c","KeySizeError":"t","KeySizeError.Error":"m","NewCipher":"f"}},"crypto/cipher":{"path":"crypto/cipher","name":"cipher","symbols":{"AEAD":"t","Block":"t","BlockMode":"t","NewCBCDecrypter":"f","NewCBCEncrypter":"f","NewCFBDecrypter":"f","NewCFBEncrypter":"f","NewCTR":"f","NewGCM":"f","NewGCMWithNonceSize":"f","NewGCMWithRandomNonce":"f","NewGCMWithTagSize":"f","NewOFB":"f","Stream":"t","StreamReader":"t","StreamReader.Read":"m","StreamWriter":"t","StreamWriter.Close":"m","StreamWriter.Write":"m"}},"crypto/des":{"path":"crypto/des","name":"des","symbols":{"BlockSize":"c","KeySizeError":"t","KeySizeError.Error":"m","NewCipher":"f","NewTripleDESCipher":"f"}},"crypto/dsa":{"path":"crypto/dsa","name":"dsa","symbols":{"ErrInvalidPublicKey":"v","GenerateKey":"f","GenerateParameters":"f","L1024N160":"c","L2048N224":"c","L2048N256":"c","L3072N256":"c","ParameterSizes":"t","Parameters":"t","PrivateKey":"t","PublicKey":"t","Sign":"f","Verify":"f"}},"crypto/ecdh":{"path":"crypto/ecdh","name":"ecdh","symbols":{"Curve":"t","P256":"f","P384":"f","P521":"f","PrivateKey":"t","PrivateKey.Bytes":"m","PrivateKey.Curve":"m","PrivateKey.ECDH":"m","PrivateKey.Equal":"m","PrivateKey.Public":"m","PrivateKey.PublicKey":"m","PublicKey":"t","PublicKey.Bytes":"m","PublicKey.Curve":"m","PublicKey.Equal":"m","X25519":"f"}},"crypto/ecdsa":{"path":"crypto/ecdsa","name":"ecdsa","symbols":{"GenerateKey":"f","ParseRawPrivateKey":"f","ParseUncompressedPublicKey":"f","PrivateKey":"t","PrivateKey.Bytes":"m","PrivateKey.ECDH":"m","PrivateKey.Equal":"m","PrivateKey.Public":"m","PrivateKey.Sign":"m","PublicKey":"t","PublicKey.Bytes":"m","PublicKey.ECDH":"m","PublicKey.Equal":"m","Sign":"f","SignASN1":"f","Verify":"f","VerifyASN1":"f"}},"crypto/ed25519":{"path":"crypto/ed25519","name":"ed25519","symbols":{"GenerateKey":"f","NewKeyFromSeed":"f","Options":"t","Options.HashFunc":"m","PrivateKey":"t","PrivateKey.Equal":"m","PrivateKey.Public":"m","PrivateKey.Seed":"m","PrivateKey.Sign":"m","PrivateKeySize":"c","PublicKey":"t","PublicKey.Equal":"m","PublicKeySize":"c","SeedSize":"c","Sign":"f","SignatureSize":"c","Verify":"f","VerifyWithOptions":"f"}},"crypto/elliptic":{"path":"crypto/elliptic","name":"elliptic","symbols":{"Curve":"t","CurveParams":"t","CurveParams.Add":"m","CurveParams.Double":"m","CurveParams.IsOnCurve":"m","CurveParams.Params":"m","CurveParams.ScalarBaseMult":"m","CurveParams.ScalarMult":"m","GenerateKey":"f","Marshal":"f","MarshalCompressed":"f","P224":"f","P256":"f","P384":"f","P521":"f","Unmarshal":"f","UnmarshalCompressed":"f"}},"crypto/fips140":{"path":"crypto/fips140","name":"fips140","symbols":{"Enabled":"f"}},"crypto/hkdf":{"path":"crypto/hkdf","name":"hkdf","symbols":{"Expand":"f","Extract":"f","Key":"f"}},"crypto/hmac":{"path":"crypto/hmac","name":"hmac","symbols":{"Equal":"f","New":"f"}},"crypto/md5":{"path":"crypto/md5","name":"md5","symbols":{"BlockSize":"c","New":"f","Size":"c","Sum":"f"}},"crypto/mlkem":{"path":"crypto/mlkem","name":"mlkem","symbols":{"CiphertextSize1024":"c","CiphertextSize768":"c","DecapsulationKey1024":"t","DecapsulationKey1024.Bytes":"m","DecapsulationKey1024.Decapsulate":"m","DecapsulationKey1024.EncapsulationKey":"m","DecapsulationKey768":"t","DecapsulationKey768.Bytes":"m","DecapsulationKey768.Decapsulate":"m","DecapsulationKey768.EncapsulationKey":"m","EncapsulationKey1024":"t","EncapsulationKey1024.Bytes":"m","EncapsulationKey1024.Encapsulate":"m","EncapsulationKey768":"t","EncapsulationKey768.Bytes":"m","EncapsulationKey768.Encapsulate":"m","EncapsulationKeySize1024":"c","EncapsulationKeySize768":"c","GenerateKey1024":"f","GenerateKey768":"f","NewDecapsulationKey1024":"f","NewDecapsulationKey768":"f","NewEncapsulationKey1024":"f","NewEncapsulationKey768":"f","SeedSize":"c","SharedKeySize":"c"}},"crypto/pbkdf2":{"path":"crypto/pbkdf2","name":"pbkdf2","symbols":{"Key":"f"}},"crypto/rand":{"path":"crypto/rand","name":"rand","symbols":{"Int":"f","Prime":"f","Read":"f","Reader":"v","Text":"f"}},"crypto/rc4":{"path":"crypto/rc4","name":"rc4","symbols":{"Cipher":"t","Cipher.Reset":"m","Cipher.XORKeyStream":"m","KeySizeError":"t","KeySizeError.Error":"m","NewCipher":"f"}},"crypto/rsa":{"path":"crypto/rsa","name":"rsa","symbols":{"CRTValue":"t","DecryptOAEP":"f","DecryptPKCS1v15":"f","DecryptPKCS1v15SessionKey":"f","EncryptOAEP":"f","EncryptPKCS1v15":"f","ErrDecryption":"v","ErrMessageTooLong":"v","ErrVerification":"v","GenerateKey":"f","GenerateMultiPrimeKey":"f","OAEPOptions":"t","PKCS1v15DecryptOptions":"t","PSSOptions":"t","PSSOptions.HashFunc":"m","PSSSaltLengthAuto":"c","PSSSaltLengthEqualsHash":"c","PrecomputedValues":"t","PrivateKey":"t","PrivateKey.Decrypt":"m","PrivateKey.Equal":"m","PrivateKey.Precompute":"m","PrivateKey.Public":"m","PrivateKey.Sign":"m","PrivateKey.Validate":"m","PublicKey":"t","PublicKey.Equal":"m","PublicKey.Size":"m","SignPKCS1v15":"f","SignPSS":"f","VerifyPKCS1v15":"f","VerifyPSS":"f"}},"crypto/sha1":{"path":"crypto/sha1","name":"sha1","symbols":{"BlockSize":"c","New":"f","Size":"c","Sum":"f"}},"crypto/sha256":{"path":"crypto/sha256","name":"sha256","symbols":{"BlockSize":"c","New":"f","New224":"f","Size":"c","Size224":"c","Sum224":"f","Sum256":"f"}},"crypto/sha3":{"path":"crypto/sha3","name":"sha3","symbols":{"New224":"f","New256":"f","New384":"f","New512":"f","NewCSHAKE128":"f","NewCSHAKE256":"f","NewSHAKE128":"f","NewSHAKE256":"f","SHA3":"t","SHA3.AppendBinary":"m","SHA3.BlockSize":"m","SHA3.Clone":"m","SHA3.MarshalBinary":"m","SHA3.Reset":"m","SHA3.Size":"m","SHA3.Sum":"m","SHA3.UnmarshalBinary":"m","SHA3.Write":"m","SHAKE":"t","SHAKE.AppendBinary":"m","SHAKE.BlockSize":"m","SHAKE.MarshalBinary":"m","SHAKE.Read":"m","SHAKE.Reset":"m","SHAKE.UnmarshalBinary":"m","SHAKE.Write":"m","Sum224":"f","Sum256":"f","Sum384":"f","Sum512":"f","SumSHAKE128":"f","SumSHAKE256":"f"}},"crypto/sha512":{"path":"crypto/sha512","name":"sha512","symbols":{"BlockSize":"c","New":"f","New384":"f","New512_224":"f","New512_256":"f","Size":"c","Size224":"c","Size256":"c","Size384":"c","Sum384":"f","Sum512":"f","Sum512_224":"f","Sum512_256":"f"}},"crypto/subtle":{"path":"crypto/subtle","name":"subtle","symbols":{"ConstantTimeByteEq":"f","ConstantTimeCompare":"f","ConstantTimeCopy":"f","ConstantTimeEq":"f","ConstantTimeLessOrEq":"f","ConstantTimeSelect":"f","WithDataIndependentTiming":"f","XORBytes":"f"}},"crypto/tls":{"path":"crypto/tls","name":"tls","symbols":{"AlertError":"t","AlertError.Error":"m","Certificate":"t","CertificateRequestInfo":"t","CertificateRequestInfo.Context":"m","CertificateRequestInfo.SupportsCertificate":"m","CertificateVerificationError":"t","CertificateVerificationError.Error":"m","CertificateVerificationError.Unwrap":"m","CipherSuite":"t","CipherSuiteName":"f","CipherSuites":"f","Client":"f","ClientAuthType":"t","ClientAuthType.String":"m","ClientHelloInfo":"t","ClientHelloInfo.Context":"m","ClientHelloInfo.SupportsCertificate":"m","ClientSessionCache":"t","ClientSessionState":"t","ClientSessionState.ResumptionState":"m","Config":"t","Config.BuildNameToCertificate":"m","Config.Clone":"m","Config.DecryptTicket":"m","Config.EncryptTicket":"m","Config.SetSessionTicketKeys":"m","Conn":"t","Conn.Close":"m","Conn.CloseWrite":"m","Conn.ConnectionState":"m","Conn.Handshake":"m","Conn.HandshakeContext":"m","Conn.LocalAddr":"m","Conn.NetConn":"m","Conn.OCSPResponse":"m","Conn.Read":"m","Conn.RemoteAddr":"m","Conn.SetDeadline":"m","Conn.SetReadDeadline":"m","Conn.SetWriteDeadline":"m","Conn.VerifyHostname":"m","Conn.Write":"m","ConnectionState":"t","ConnectionState.ExportKeyingMaterial":"m","CurveID":"t","CurveID.String":"m","CurveP256":"c","CurveP384":"c","CurveP521":"c","Dial":"f","DialWithDialer":"f","Dialer":"t","Dialer.Dial":"m","Dialer.DialContext":"m","ECDSAWithP256AndSHA256":"c","ECDSAWithP384AndSHA384":"c","ECDSAWithP521AndSHA512":"c","ECDSAWithSHA1":"c","ECHRejectionError":"t","ECHRejectionError.Error":"m","Ed25519":"c","EncryptedClientHelloKey":"t","InsecureCipherSuites":"f","Listen":"f","LoadX509KeyPair":"f","NewLRUClientSessionCache":"f","NewListener":"f","NewResumptionState":"f","NoClientCert":"c","PKCS1WithSHA1":"c","PKCS1WithSHA256":"c","PKCS1WithSHA384":"c","PKCS1WithSHA512":"c","PSSWithSHA256":"c","PSSWithSHA384":"c","PSSWithSHA512":"c","ParseSessionState":"f","QUICClient":"f","QUICConfig":"t","QUICConn":"t","QUICConn.Close":"m","QUICConn.ConnectionState":"m","QUICConn.HandleData":"m","QUICConn.NextEvent":"m","QUICConn.SendSessionTicket":"m","QUICConn.SetTransportParameters":"m","QUICConn.Start":"m","QUICConn.StoreSession":"m","QUICEncryptionLevel":"t","QUICEncryptionLevel.String":"m","QUICEncryptionLevelApplication":"c","QUICEncryptionLevelEarly":"c","QUICEncryptionLevelHandshake":"c","QUICEncryptionLevelInitial":"c","QUICEvent":"t","QUICEventKind":"t","QUICHandshakeDone":"c","QUICNoEvent":"c","QUICRejectedEarlyData":"c","QUICResumeSession":"c","QUICServer":"f","QUICSessionTicketOptions":"t","QUICSetReadSecret":"c","QUICSetWriteSecret":"c","QUICStoreSession":"c","QUICTransportParameters":"c","QUICTransportParametersRequired":"c","QUICWriteData":"c","RecordHeaderError":"t","RecordHeaderError.Error":"m","RenegotiateFreelyAsClient":"c","RenegotiateNever":"c","RenegotiateOnceAsClient":"c","RenegotiationSupport":"t","RequestClientCert":"c","RequireAndVerifyClientCert":"c","RequireAnyClientCert":"c","Server":"f","SessionState":"t","SessionState.Bytes":"m","SignatureScheme":"t","SignatureScheme.String":"m","TLS_AES_128_GCM_SHA256":"c","TLS_AES_256_GCM_SHA384":"c","TLS_CHACHA20_POLY1305_SHA256":"c","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA":"c","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256":"c","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256":"c","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA":"c","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384":"c","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305":"c","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256":"c","TLS_ECDHE_ECDSA_WITH_RC4_128_SHA":"c","TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA":"c","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA":"c","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256":"c","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256":"c","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA":"c","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384":"c","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305":"c","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256":"c","TLS_ECDHE_RSA_WITH_RC4_128_SHA":"c","TLS_FALLBACK_SCSV":"c","TLS_RSA_WITH_3DES_EDE_CBC_SHA":"c","TLS_RSA_WITH_AES_128_CBC_SHA":"c","TLS_RSA_WITH_AES_128_CBC_SHA256":"c","TLS_RSA_WITH_AES_128_GCM_SHA256":"c","TLS_RSA_WITH_AES_256_CBC_SHA":"c","TLS_RSA_WITH_AES_256_GCM_SHA384":"c","TLS_RSA_WITH_RC4_128_SHA":"c","VerifyClientCertIfGiven":"c","VersionName":"f","VersionSSL30":"c","VersionTLS10":"c","VersionTLS11":"c","VersionTLS12":"c","VersionTLS13":"c","X25519":"c","X25519MLKEM768":"c","X509KeyPair":"f"}},"crypto/x509":{"path":"crypto/x509","name":"x509","symbols":{"CANotAuthorizedForExtKeyUsage":"c","CANotAuthorizedForThisName":"c","CertPool":"t","CertPool.AddCert":"m","CertPool.AddCertWithConstraint":"m","CertPool.AppendCertsFromPEM":"m","CertPool.Clone":"m","CertPool.Equal":"m","CertPool.Subjects":"m","Certificate":"t","Certificate.CheckCRLSignature":"m","Certificate.CheckSignature":"m","Certificate.CheckSignatureFrom":"m","Certificate.CreateCRL":"m","Certificate.Equal":"m","Certificate.Verify":"m","Certificate.VerifyHostname":"m","CertificateInvalidError":"t","CertificateInvalidError.Error":"m","CertificateRequest":"t","CertificateRequest.CheckSignature":"m","ConstraintViolationError":"t","ConstraintViolationError.Error":"m","CreateCertificate":"f","CreateCertificateRequest":"f","CreateRevocationList":"f","DSA":"c","DSAWithSHA1":"c","DSAWithSHA256":"c","DecryptPEMBlock":"f","ECDSA":"c","ECDSAWithSHA1":"c","ECDSAWithSHA256":"c","ECDSAWithSHA384":"c","ECDSAWithSHA512":"c","Ed25519":"c","EncryptPEMBlock":"f","ErrUnsupportedAlgorithm":"v","Expired":"c","ExtKeyUsage":"t","ExtKeyUsageAny":"c","ExtKeyUsageClientAuth":"c","ExtKeyUsageCodeSigning":"c","ExtKeyUsageEmailProtection":"c","ExtKeyUsageIPSECEndSystem":"c","ExtKeyUsageIPSECTunnel":"c","ExtKeyUsageIPSECUser":"c","ExtKeyUsageMicrosoftCommercialCodeSigning":"c","ExtKeyUsageMicrosoftKernelCodeSigning":"c","ExtKeyUsageMicrosoftServerGatedCrypto":"c","ExtKeyUsageNetscapeServerGatedCrypto":"c","ExtKeyUsageOCSPSigning":"c","ExtKeyUsageServerAuth":"c","ExtKeyUsageTimeStamping":"c","HostnameError":"t","HostnameError.Error":"m","IncompatibleUsage":"c","IncorrectPasswordError":"v","InsecureAlgorithmError":"t","InsecureAlgorithmError.Error":"m","InvalidReason":"t","IsEncryptedPEMBlock":"f","KeyUsage":"t","KeyUsageCRLSign":"c","KeyUsageCertSign":"c","KeyUsageContentCommitment":"c","KeyUsageDataEncipherment":"c","KeyUsageDecipherOnly":"c","KeyUsageDigitalSignature":"c","KeyUsageEncipherOnly":"c","KeyUsageKeyAgreement":"c","KeyUsageKeyEncipherment":"c","MD2WithRSA":"c","MD5WithRSA":"c","MarshalECPrivateKey":"f","MarshalPKCS1PrivateKey":"f","MarshalPKCS1PublicKey":"f","MarshalPKCS8PrivateKey":"f","MarshalPKIXPublicKey":"f","NameConstraintsWithoutSANs":"c","NameMismatch":"c","NewCertPool":"f","NoValidChains":"c","NotAuthorizedToSign":"c","OID":"t","OID.AppendBinary":"m","OID.AppendText":"m","OID.Equal":"m","OID.EqualASN1OID":"m","OID.MarshalBinary":"m","OID.MarshalText":"m","OID.String":"m","OID.UnmarshalBinary":"m","OID.UnmarshalText":"m","OIDFromInts":"f","PEMCipher":"t","PEMCipher3DES":"c","PEMCipherAES128":"c","PEMCipherAES192":"c","PEMCipherAES256":"c","PEMCipherDES":"c","ParseCRL":"f","ParseCertificate":"f","ParseCertificateRequest":"f","ParseCertificates":"f","ParseDERCRL":"f","ParseECPrivateKey":"f","ParseOID":"f","ParsePKCS1PrivateKey":"f","ParsePKCS1PublicKey":"f","ParsePKCS8PrivateKey":"f","ParsePKIXPublicKey":"f","ParseRevocationList":"f","PolicyMapping":"t","PublicKeyAlgorithm":"t","PublicKeyAlgorithm.String":"m","PureEd25519":"c","RSA":"c","RevocationList":"t","RevocationList.CheckSignatureFrom":"m","RevocationListEntry":"t","SHA1WithRSA":"c","SHA256WithRSA":"c","SHA256WithRSAPSS":"c","SHA384WithRSA":"c","SHA384WithRSAPSS":"c","SHA512WithRSA":"c","SHA512WithRSAPSS":"c","SetFallbackRoots":"f","SignatureAlgorithm":"t","SignatureAlgorithm.String":"m","SystemCertPool":"f","SystemRootsError":"t","SystemRootsError.Error":"m","SystemRootsError.Unwrap":"m","TooManyConstraints":"c","TooManyIntermediates":"c","UnconstrainedName":"c","UnhandledCriticalExtension":"t","UnhandledCriticalExtension.Error":"m","UnknownAuthorityError":"t","UnknownAuthorityError.Error":"m","UnknownPublicKeyAlgorithm":"c","UnknownSignatureAlgorithm":"c","VerifyOptions":"t"}},"crypto/x509/pkix":{"path":"crypto/x509/pkix","name":"pkix","symbols":{"AlgorithmIdentifier":"t","AttributeTypeAndValue":"t","AttributeTypeAndValueSET":"t","CertificateList":"t","CertificateList.HasExpired":"m","Extension":"t","Name":"t","Name.FillFromRDNSequence":"m","Name.String":"m","Name.ToRDNSequence":"m","RDNSequence":"t","RDNSequence.String":"m","RelativeDistinguishedNameSET":"t","RevokedCertificate":"t","TBSCertificateList":"t"}},"database/sql":{"path":"database/sql","name":"sql","symbols":{"ColumnType":"t","ColumnType.DatabaseTypeName":"m","ColumnType.DecimalSize":"m","ColumnType.Length":"m","ColumnType.Name":"m","ColumnType.Nullable":"m","ColumnType.ScanType":"m","Conn":"t","Conn.BeginTx":"m","Conn.Close":"m","Conn.ExecContext":"m","Conn.PingContext":"m","Conn.PrepareContext":"m","Conn.QueryContext":"m","Conn.QueryRowContext":"m","Conn.Raw":"m","DB":"t","DB.Begin":"m","DB.BeginTx":"m","DB.Close":"m","DB.Conn":"m","DB.Driver":"m","DB.Exec":"m","DB.ExecContext":"m","DB.Ping":"m","DB.PingContext":"m","DB.Prepare":"m","DB.PrepareContext":"m","DB.Query":"m","DB.QueryContext":"m","DB.QueryRow":"m","DB.QueryRowContext":"m","DB.SetConnMaxIdleTime":"m","DB.SetConnMaxLifetime":"m","DB.SetMaxIdleConns":"m","DB.SetMaxOpenConns":"m","DB.Stats":"m","DBStats":"t","Drivers":"f","ErrConnDone":"v","ErrNoRows":"v","ErrTxDone":"v","IsolationLevel":"t","IsolationLevel.String":"m","LevelDefault":"c","LevelLinearizable":"c","LevelReadCommitted":"c","LevelReadUncommitted":"c","LevelRepeatableRead":"c","LevelSerializable":"c","LevelSnapshot":"c","LevelWriteCommitted":"c","Named":"f","NamedArg":"t","Null":"t","NullBool":"t","NullBool.Scan":"m","NullBool.Value":"m","NullByte":"t","NullByte.Scan":"m","NullByte.Value":"m","NullFloat64":"t","NullFloat64.Scan":"m","NullFloat64.Value":"m","NullInt16":"t","NullInt16.Scan":"m","NullInt16.Value":"m","NullInt32":"t","NullInt32.Scan":"m","NullInt32.Value":"m","NullInt64":"t","NullInt64.Scan":"m","NullInt64.Value":"m","NullString":"t","NullString.Scan":"m","NullString.Value":"m","NullTime":"t","NullTime.Scan":"m","NullTime.Value":"m","Open":"f","OpenDB":"f","Out":"t","RawBytes":"t","Register":"f","Result":"t","Row":"t","Row.Err":"m","Row.Scan":"m","Rows":"t","Rows.Close":"m","Rows.ColumnTypes":"m","Rows.Columns":"m","Rows.Err":"m","Rows.Next":"m","Rows.NextResultSet":"m","Rows.Scan":"m","Scanner":"t","Stmt":"t","Stmt.Close":"m","Stmt.Exec":"m","Stmt.ExecContext":"m","Stmt.Query":"m","Stmt.QueryContext":"m","Stmt.QueryRow":"m","Stmt.QueryRowContext":"m","Tx":"t","Tx.Commit":"m","Tx.Exec":"m","Tx.ExecContext":"m","Tx.Prepare":"m","Tx.PrepareContext":"m","Tx.Query":"m","Tx.QueryContext":"m","Tx.QueryRow":"m","Tx.QueryRowContext":"m","Tx.Rollback":"m","Tx.Stmt":"m","Tx.StmtContext":"m","TxOptions":"t"}},"database/sql/driver":{"path":"database/sql/driver","name":"driver","symbols":{"Bool":"v","ColumnConverter":"t","Conn":"t","ConnBeginTx":"t","ConnPrepareContext":"t","Connector":"t","DefaultParameterConverter":"v","Driver":"t","DriverContext":"t","ErrBadConn":"v","ErrRemoveArgument":"v","ErrSkip":"v","Execer":"t","ExecerContext":"t","Int32":"v","IsScanValue":"f","IsValue":"f","IsolationLevel":"t","NamedValue":"t","NamedValueChecker":"t","NotNull":"t","NotNull.ConvertValue":"m","Null":"t","Null.ConvertValue":"m","Pinger":"t","Queryer":"t","QueryerContext":"t","Result":"t","ResultNoRows":"v","Rows":"t","RowsAffected":"t","RowsAffected.LastInsertId":"m","RowsAffected.RowsAffected":"m","RowsColumnTypeDatabaseTypeName":"t","RowsColumnTypeLength":"t","RowsColumnTypeNullable":"t","RowsColumnTypePrecisionScale":"t","RowsColumnTypeScanType":"t","RowsNextResultSet":"t","SessionResetter":"t","Stmt":"t","StmtExecContext":"t","StmtQueryContext":"t","String":"v","Tx":"t","TxOptions":"t","Validator":"t","Value":"t","ValueConverter":"t","Valuer":"t"}},"debug/buildinfo":{"path":"debug/buildinfo","name":"buildinfo","symbols":{"BuildInfo":"t","Read":"f","ReadFile":"f"}},"debug/dwarf":{"path":"debug/dwarf","name":"dwarf","symbols":{"AddrType":"t","ArrayType":"t","ArrayType.Size":"m","ArrayType.String":"m","Attr":"t","Attr.GoString":"m","Attr.String":"m","AttrAbstractOrigin":"c","AttrAccessibility":"c","AttrAddrBase":"c","AttrAddrClass":"c","AttrAlignment":"c","AttrAllocated":"c","AttrArtificial":"c","AttrAssociated":"c","AttrBaseTypes":"c","AttrBinaryScale":"c","AttrBitOffset":"c","AttrBitSize":"c","AttrByteSize":"c","AttrCallAllCalls":"c","AttrCallAllSourceCalls":"c","AttrCallAllTailCalls":"c","AttrCallColumn":"c","AttrCallDataLocation":"c","AttrCallDataValue":"c","AttrCallFile":"c","AttrCallLine":"c","AttrCallOrigin":"c","AttrCallPC":"c","AttrCallParameter":"c","AttrCallReturnPC":"c","AttrCallTailCall":"c","AttrCallTarget":"c","AttrCallTargetClobbered":"c","AttrCallValue":"c","AttrCalling":"c","AttrCommonRef":"c","AttrCompDir":"c","AttrConstExpr":"c","AttrConstValue":"c","AttrContainingType":"c","AttrCount":"c","AttrDataBitOffset":"c","AttrDataLocation":"c","AttrDataMemberLoc":"c","AttrDecimalScale":"c","AttrDecimalSign":"c","AttrDeclColumn":"c","AttrDeclFile":"c","AttrDeclLine":"c","AttrDeclaration":"c","AttrDefaultValue":"c","AttrDefaulted":"c","AttrDeleted":"c","AttrDescription":"c","AttrDigitCount":"c","AttrDiscr":"c","AttrDiscrList":"c","AttrDiscrValue":"c","AttrDwoName":"c","AttrElemental":"c","AttrEncoding":"c","AttrEndianity":"c","AttrEntrypc":"c","AttrEnumClass":"c","AttrExplicit":"c","AttrExportSymbols":"c","AttrExtension":"c","AttrExternal":"c","AttrFrameBase":"c","AttrFriend":"c","AttrHighpc":"c","AttrIdentifierCase":"c","AttrImport":"c","AttrInline":"c","AttrIsOptional":"c","AttrLanguage":"c","AttrLinkageName":"c","AttrLocation":"c","AttrLoclistsBase":"c","AttrLowerBound":"c","AttrLowpc":"c","AttrMacroInfo":"c","AttrMacros":"c","AttrMainSubprogram":"c","AttrMutable":"c","AttrName":"c","AttrNamelistItem":"c","AttrNoreturn":"c","AttrObjectPointer":"c","AttrOrdering":"c","AttrPictureString":"c","AttrPriority":"c","AttrProducer":"c","AttrPrototyped":"c","AttrPure":"c","AttrRanges":"c","AttrRank":"c","AttrRecursive":"c","AttrReference":"c","AttrReturnAddr":"c","AttrRnglistsBase":"c","AttrRvalueReference":"c","AttrSegment":"c","AttrSibling":"c","AttrSignature":"c","AttrSmall":"c","AttrSpecification":"c","AttrStartScope":"c","AttrStaticLink":"c","AttrStmtList":"c","AttrStrOffsetsBase":"c","AttrStride":"c","AttrStrideSize":"c","AttrStringLength":"c","AttrStringLengthBitSize":"c","AttrStringLengthByteSize":"c","AttrThreadsScaled":"c","AttrTrampoline":"c","AttrType":"c","AttrUpperBound":"c","AttrUseLocation":"c","AttrUseUTF8":"c","AttrVarParam":"c","AttrVirtuality":"c","AttrVisibility":"c","AttrVtableElemLoc":"c","BasicType":"t","BasicType.Basic":"m","BasicType.String":"m","BoolType":"t","CharType":"t","Class":"t","Class.GoString":"m","Class.String":"m","ClassAddrPtr":"c","ClassAddress":"c","ClassBlock":"c","ClassConstant":"c","ClassExprLoc":"c","ClassFlag":"c","ClassLinePtr":"c","ClassLocList":"c","ClassLocListPtr":"c","ClassMacPtr":"c","ClassRangeListPtr":"c","ClassReference":"c","ClassReferenceAlt":"c","ClassReferenceSig":"c","ClassRngList":"c","ClassRngListsPtr":"c","ClassStrOffsetsPtr":"c","ClassString":"c","ClassStringAlt":"c","ClassUnknown":"c","CommonType":"t","CommonType.Common":"m","CommonType.Size":"m","ComplexType":"t","Data":"t","Data.AddSection":"m","Data.AddTypes":"m","Data.LineReader":"m","Data.Ranges":"m","Data.Reader":"m","Data.Type":"m","DecodeError":"t","DecodeError.Error":"m","DotDotDotType":"t","DotDotDotType.String":"m","Entry":"t","Entry.AttrField":"m","Entry.Val":"m","EnumType":"t","EnumType.String":"m","EnumValue":"t","ErrUnknownPC":"v","Field":"t","FloatType":"t","FuncType":"t","FuncType.String":"m","IntType":"t","LineEntry":"t","LineFile":"t","LineReader":"t","LineReader.Files":"m","LineReader.Next":"m","LineReader.Reset":"m","LineReader.Seek":"m","LineReader.SeekPC":"m","LineReader.Tell":"m","LineReaderPos":"t","New":"f","Offset":"t","PtrType":"t","PtrType.String":"m","QualType":"t","QualType.Size":"m","QualType.String":"m","Reader":"t","Reader.AddressSize":"m","Reader.ByteOrder":"m","Reader.Next":"m","Reader.Seek":"m","Reader.SeekPC":"m","Reader.SkipChildren":"m","StructField":"t","StructType":"t","StructType.Defn":"m","StructType.String":"m","Tag":"t","Tag.GoString":"m","Tag.String":"m","TagAccessDeclaration":"c","TagArrayType":"c","TagAtomicType":"c","TagBaseType":"c","TagCallSite":"c","TagCallSiteParameter":"c","TagCatchDwarfBlock":"c","TagClassType":"c","TagCoarrayType":"c","TagCommonDwarfBlock":"c","TagCommonInclusion":"c","TagCompileUnit":"c","TagCondition":"c","TagConstType":"c","TagConstant":"c","TagDwarfProcedure":"c","TagDynamicType":"c","TagEntryPoint":"c","TagEnumerationType":"c","TagEnumerator":"c","TagFileType":"c","TagFormalParameter":"c","TagFriend":"c","TagGenericSubrange":"c","TagImmutableType":"c","TagImportedDeclaration":"c","TagImportedModule":"c","TagImportedUnit":"c","TagInheritance":"c","TagInlinedSubroutine":"c","TagInterfaceType":"c","TagLabel":"c","TagLexDwarfBlock":"c","TagMember":"c","TagModule":"c","TagMutableType":"c","TagNamelist":"c","TagNamelistItem":"c","TagNamespace":"c","TagPackedType":"c","TagPartialUnit":"c","TagPointerType":"c","TagPtrToMemberType":"c","TagReferenceType":"c","TagRestrictType":"c","TagRvalueReferenceType":"c","TagSetType":"c","TagSharedType":"c","TagSkeletonUnit":"c","TagStringType":"c","TagStructType":"c","TagSubprogram":"c","TagSubrangeType":"c","TagSubroutineType":"c","TagTemplateAlias":"c","TagTemplateTypeParameter":"c","TagTemplateValueParameter":"c","TagThrownType":"c","TagTryDwarfBlock":"c","TagTypeUnit":"c","TagTypedef":"c","TagUnionType":"c","TagUnspecifiedParameters":"c","TagUnspecifiedType":"c","TagVariable":"c","TagVariant":"c","TagVariantPart":"c","TagVolatileType":"c","TagWithStmt":"c","Type":"t","TypedefType":"t","TypedefType.Size":"m","TypedefType.String":"m","UcharType":"t","UintType":"t","UnspecifiedType":"t","UnsupportedType":"t","UnsupportedType.String":"m","VoidType":"t","VoidType.String":"m"}},"debug/elf":{"path":"debug/elf","name":"elf","symbols":{"ARM_MAGIC_TRAMP_NUMBER":"c","COMPRESS_HIOS":"c","COMPRESS_HIPROC":"c","COMPRESS_LOOS":"c","COMPRESS_LOPROC":"c","COMPRESS_ZLIB":"c","COMPRESS_ZSTD":"c","Chdr32":"t","Chdr64":"t","Class":"t","Class.GoString":"m","Class.String":"m","CompressionType":"t","CompressionType.GoString":"m","CompressionType.String":"m","DF_1_CONFALT":"c","DF_1_DIRECT":"c","DF_1_DISPRELDNE":"c","DF_1_DISPRELPND":"c","DF_1_EDITED":"c","DF_1_ENDFILTEE":"c","DF_1_GLOBAL":"c","DF_1_GLOBAUDIT":"c","DF_1_GROUP":"c","DF_1_IGNMULDEF":"c","DF_1_INITFIRST":"c","DF_1_INTERPOSE":"c","DF_1_KMOD":"c","DF_1_LOADFLTR":"c","DF_1_NOCOMMON":"c","DF_1_NODEFLIB":"c","DF_1_NODELETE":"c","DF_1_NODIRECT":"c","DF_1_NODUMP":"c","DF_1_NOHDR":"c","DF_1_NOKSYMS":"c","DF_1_NOOPEN":"c","DF_1_NORELOC":"c","DF_1_NOW":"c","DF_1_ORIGIN":"c","DF_1_PIE":"c","DF_1_SINGLETON":"c","DF_1_STUB":"c","DF_1_SYMINTPOSE":"c","DF_1_TRANS":"c","DF_1_WEAKFILTER":"c","DF_BIND_NOW":"c","DF_ORIGIN":"c","DF_STATIC_TLS":"c","DF_SYMBOLIC":"c","DF_TEXTREL":"c","DT_ADDRRNGHI":"c","DT_ADDRRNGLO":"c","DT_AUDIT":"c","DT_AUXILIARY":"c","DT_BIND_NOW":"c","DT_CHECKSUM":"c","DT_CONFIG":"c","DT_DEBUG":"c","DT_DEPAUDIT":"c","DT_ENCODING":"c","DT_FEATURE":"c","DT_FILTER":"c","DT_FINI":"c","DT_FINI_ARRAY":"c","DT_FINI_ARRAYSZ":"c","DT_FLAGS":"c","DT_FLAGS_1":"c","DT_GNU_CONFLICT":"c","DT_GNU_CONFLICTSZ":"c","DT_GNU_HASH":"c","DT_GNU_LIBLIST":"c","DT_GNU_LIBLISTSZ":"c","DT_GNU_PRELINKED":"c","DT_HASH":"c","DT_HIOS":"c","DT_HIPROC":"c","DT_INIT":"c","DT_INIT_ARRAY":"c","DT_INIT_ARRAYSZ":"c","DT_JMPREL":"c","DT_LOOS":"c","DT_LOPROC":"c","DT_MIPS_AUX_DYNAMIC":"c","DT_MIPS_BASE_ADDRESS":"c","DT_MIPS_COMPACT_SIZE":"c","DT_MIPS_CONFLICT":"c","DT_MIPS_CONFLICTNO":"c","DT_MIPS_CXX_FLAGS":"c","DT_MIPS_DELTA_CLASS":"c","DT_MIPS_DELTA_CLASSSYM":"c","DT_MIPS_DELTA_CLASSSYM_NO":"c","DT_MIPS_DELTA_CLASS_NO":"c","DT_MIPS_DELTA_INSTANCE":"c","DT_MIPS_DELTA_INSTANCE_NO":"c","DT_MIPS_DELTA_RELOC":"c","DT_MIPS_DELTA_RELOC_NO":"c","DT_MIPS_DELTA_SYM":"c","DT_MIPS_DELTA_SYM_NO":"c","DT_MIPS_DYNSTR_ALIGN":"c","DT_MIPS_FLAGS":"c","DT_MIPS_GOTSYM":"c","DT_MIPS_GP_VALUE":"c","DT_MIPS_HIDDEN_GOTIDX":"c","DT_MIPS_HIPAGENO":"c","DT_MIPS_ICHECKSUM":"c","DT_MIPS_INTERFACE":"c","DT_MIPS_INTERFACE_SIZE":"c","DT_MIPS_IVERSION":"c","DT_MIPS_LIBLIST":"c","DT_MIPS_LIBLISTNO":"c","DT_MIPS_LOCALPAGE_GOTIDX":"c","DT_MIPS_LOCAL_GOTIDX":"c","DT_MIPS_LOCAL_GOTNO":"c","DT_MIPS_MSYM":"c","DT_MIPS_OPTIONS":"c","DT_MIPS_PERF_SUFFIX":"c","DT_MIPS_PIXIE_INIT":"c","DT_MIPS_PLTGOT":"c","DT_MIPS_PROTECTED_GOTIDX":"c","DT_MIPS_RLD_MAP":"c","DT_MIPS_RLD_MAP_REL":"c","DT_MIPS_RLD_TEXT_RESOLVE_ADDR":"c","DT_MIPS_RLD_VERSION":"c","DT_MIPS_RWPLT":"c","DT_MIPS_SYMBOL_LIB":"c","DT_MIPS_SYMTABNO":"c","DT_MIPS_TIME_STAMP":"c","DT_MIPS_UNREFEXTNO":"c","DT_MOVEENT":"c","DT_MOVESZ":"c","DT_MOVETAB":"c","DT_NEEDED":"c","DT_NULL":"c","DT_PLTGOT":"c","DT_PLTPAD":"c","DT_PLTPADSZ":"c","DT_PLTREL":"c","DT_PLTRELSZ":"c","DT_POSFLAG_1":"c","DT_PPC64_GLINK":"c","DT_PPC64_OPD":"c","DT_PPC64_OPDSZ":"c","DT_PPC64_OPT":"c","DT_PPC_GOT":"c","DT_PPC_OPT":"c","DT_PREINIT_ARRAY":"c","DT_PREINIT_ARRAYSZ":"c","DT_REL":"c","DT_RELA":"c","DT_RELACOUNT":"c","DT_RELAENT":"c","DT_RELASZ":"c","DT_RELCOUNT":"c","DT_RELENT":"c","DT_RELSZ":"c","DT_RPATH":"c","DT_RUNPATH":"c","DT_SONAME":"c","DT_SPARC_REGISTER":"c","DT_STRSZ":"c","DT_STRTAB":"c","DT_SYMBOLIC":"c","DT_SYMENT":"c","DT_SYMINENT":"c","DT_SYMINFO":"c","DT_SYMINSZ":"c","DT_SYMTAB":"c","DT_SYMTAB_SHNDX":"c","DT_TEXTREL":"c","DT_TLSDESC_GOT":"c","DT_TLSDESC_PLT":"c","DT_USED":"c","DT_VALRNGHI":"c","DT_VALRNGLO":"c","DT_VERDEF":"c","DT_VERDEFNUM":"c","DT_VERNEED":"c","DT_VERNEEDNUM":"c","DT_VERSYM":"c","Data":"t","Data.GoString":"m","Data.String":"m","Dyn32":"t","Dyn64":"t","DynFlag":"t","DynFlag.GoString":"m","DynFlag.String":"m","DynFlag1":"t","DynFlag1.GoString":"m","DynFlag1.String":"m","DynTag":"t","DynTag.GoString":"m","DynTag.String":"m","DynamicVersion":"t","DynamicVersionDep":"t","DynamicVersionFlag":"t","DynamicVersionNeed":"t","EI_ABIVERSION":"c","EI_CLASS":"c","EI_DATA":"c","EI_NIDENT":"c","EI_OSABI":"c","EI_PAD":"c","EI_VERSION":"c","ELFCLASS32":"c","ELFCLASS64":"c","ELFCLASSNONE":"c","ELFDATA2LSB":"c","ELFDATA2MSB":"c","ELFDATANONE":"c","ELFMAG":"c","ELFOSABI_86OPEN":"c","ELFOSABI_AIX":"c","ELFOSABI_ARM":"c","ELFOSABI_AROS":"c","ELFOSABI_CLOUDABI":"c","ELFOSABI_FENIXOS":"c","ELFOSABI_FREEBSD":"c","ELFOSABI_HPUX":"c","ELFOSABI_HURD":"c","ELFOSABI_IRIX":"c","ELFOSABI_LINUX":"c","ELFOSABI_MODESTO":"c","ELFOSABI_NETBSD":"c","ELFOSABI_NONE":"c","ELFOSABI_NSK":"c","ELFOSABI_OPENBSD":"c","ELFOSABI_OPENVMS":"c","ELFOSABI_SOLARIS":"c","ELFOSABI_STANDALONE":"c","ELFOSABI_TRU64":"c","EM_386":"c","EM_486":"c","EM_56800EX":"c","EM_68HC05":"c","EM_68HC08":"c","EM_68HC11":"c","EM_68HC12":"c","EM_68HC16":"c","EM_68K":"c","EM_78KOR":"c","EM_8051":"c","EM_860":"c","EM_88K":"c","EM_960":"c","EM_AARCH64":"c","EM_ALPHA":"c","EM_ALPHA_STD":"c","EM_ALTERA_NIOS2":"c","EM_AMDGPU":"c","EM_ARC":"c","EM_ARCA":"c","EM_ARC_COMPACT":"c","EM_ARC_COMPACT2":"c","EM_ARM":"c","EM_AVR":"c","EM_AVR32":"c","EM_BA1":"c","EM_BA2":"c","EM_BLACKFIN":"c","EM_BPF":"c","EM_C166":"c","EM_CDP":"c","EM_CE":"c","EM_CLOUDSHIELD":"c","EM_COGE":"c","EM_COLDFIRE":"c","EM_COOL":"c","EM_COREA_1ST":"c","EM_COREA_2ND":"c","EM_CR":"c","EM_CR16":"c","EM_CRAYNV2":"c","EM_CRIS":"c","EM_CRX":"c","EM_CSR_KALIMBA":"c","EM_CUDA":"c","EM_CYPRESS_M8C":"c","EM_D10V":"c","EM_D30V":"c","EM_DSP24":"c","EM_DSPIC30F":"c","EM_DXP":"c","EM_ECOG1":"c","EM_ECOG16":"c","EM_ECOG1X":"c","EM_ECOG2":"c","EM_ETPU":"c","EM_EXCESS":"c","EM_F2MC16":"c","EM_FIREPATH":"c","EM_FR20":"c","EM_FR30":"c","EM_FT32":"c","EM_FX66":"c","EM_H8S":"c","EM_H8_300":"c","EM_H8_300H":"c","EM_H8_500":"c","EM_HUANY":"c","EM_IA_64":"c","EM_INTEL205":"c","EM_INTEL206":"c","EM_INTEL207":"c","EM_INTEL208":"c","EM_INTEL209":"c","EM_IP2K":"c","EM_JAVELIN":"c","EM_K10M":"c","EM_KM32":"c","EM_KMX16":"c","EM_KMX32":"c","EM_KMX8":"c","EM_KVARC":"c","EM_L10M":"c","EM_LANAI":"c","EM_LATTICEMICO32":"c","EM_LOONGARCH":"c","EM_M16C":"c","EM_M32":"c","EM_M32C":"c","EM_M32R":"c","EM_MANIK":"c","EM_MAX":"c","EM_MAXQ30":"c","EM_MCHP_PIC":"c","EM_MCST_ELBRUS":"c","EM_ME16":"c","EM_METAG":"c","EM_MICROBLAZE":"c","EM_MIPS":"c","EM_MIPS_RS3_LE":"c","EM_MIPS_RS4_BE":"c","EM_MIPS_X":"c","EM_MMA":"c","EM_MMDSP_PLUS":"c","EM_MMIX":"c","EM_MN10200":"c","EM_MN10300":"c","EM_MOXIE":"c","EM_MSP430":"c","EM_NCPU":"c","EM_NDR1":"c","EM_NDS32":"c","EM_NONE":"c","EM_NORC":"c","EM_NS32K":"c","EM_OPEN8":"c","EM_OPENRISC":"c","EM_PARISC":"c","EM_PCP":"c","EM_PDP10":"c","EM_PDP11":"c","EM_PDSP":"c","EM_PJ":"c","EM_PPC":"c","EM_PPC64":"c","EM_PRISM":"c","EM_QDSP6":"c","EM_R32C":"c","EM_RCE":"c","EM_RH32":"c","EM_RISCV":"c","EM_RL78":"c","EM_RS08":"c","EM_RX":"c","EM_S370":"c","EM_S390":"c","EM_SCORE7":"c","EM_SEP":"c","EM_SE_C17":"c","EM_SE_C33":"c","EM_SH":"c","EM_SHARC":"c","EM_SLE9X":"c","EM_SNP1K":"c","EM_SPARC":"c","EM_SPARC32PLUS":"c","EM_SPARCV9":"c","EM_ST100":"c","EM_ST19":"c","EM_ST200":"c","EM_ST7":"c","EM_ST9PLUS":"c","EM_STARCORE":"c","EM_STM8":"c","EM_STXP7X":"c","EM_SVX":"c","EM_TILE64":"c","EM_TILEGX":"c","EM_TILEPRO":"c","EM_TINYJ":"c","EM_TI_ARP32":"c","EM_TI_C2000":"c","EM_TI_C5500":"c","EM_TI_C6000":"c","EM_TI_PRU":"c","EM_TMM_GPP":"c","EM_TPC":"c","EM_TRICORE":"c","EM_TRIMEDIA":"c","EM_TSK3000":"c","EM_UNICORE":"c","EM_V800":"c","EM_V850":"c","EM_VAX":"c","EM_VIDEOCORE":"c","EM_VIDEOCORE3":"c","EM_VIDEOCORE5":"c","EM_VISIUM":"c","EM_VPP500":"c","EM_X86_64":"c","EM_XCORE":"c","EM_XGATE":"c","EM_XIMO16":"c","EM_XTENSA":"c","EM_Z80":"c","EM_ZSP":"c","ET_CORE":"c","ET_DYN":"c","ET_EXEC":"c","ET_HIOS":"c","ET_HIPROC":"c","ET_LOOS":"c","ET_LOPROC":"c","ET_NONE":"c","ET_REL":"c","EV_CURRENT":"c","EV_NONE":"c","ErrNoSymbols":"v","File":"t","File.Close":"m","File.DWARF":"m","File.DynString":"m","File.DynValue":"m","File.DynamicSymbols":"m","File.DynamicVersionNeeds":"m","File.DynamicVersions":"m","File.ImportedLibraries":"m","File.ImportedSymbols":"m","File.Section":"m","File.SectionByType":"m","File.Symbols":"m","FileHeader":"t","FormatError":"t","FormatError.Error":"m","Header32":"t","Header64":"t","ImportedSymbol":"t","Machine":"t","Machine.GoString":"m","Machine.String":"m","NT_FPREGSET":"c","NT_PRPSINFO":"c","NT_PRSTATUS":"c","NType":"t","NType.GoString":"m","NType.String":"m","NewFile":"f","OSABI":"t","OSABI.GoString":"m","OSABI.String":"m","Open":"f","PF_MASKOS":"c","PF_MASKPROC":"c","PF_R":"c","PF_W":"c","PF_X":"c","PT_AARCH64_ARCHEXT":"c","PT_AARCH64_UNWIND":"c","PT_ARM_ARCHEXT":"c","PT_ARM_EXIDX":"c","PT_DYNAMIC":"c","PT_GNU_EH_FRAME":"c","PT_GNU_MBIND_HI":"c","PT_GNU_MBIND_LO":"c","PT_GNU_PROPERTY":"c","PT_GNU_RELRO":"c","PT_GNU_STACK":"c","PT_HIOS":"c","PT_HIPROC":"c","PT_INTERP":"c","PT_LOAD":"c","PT_LOOS":"c","PT_LOPROC":"c","PT_MIPS_ABIFLAGS":"c","PT_MIPS_OPTIONS":"c","PT_MIPS_REGINFO":"c","PT_MIPS_RTPROC":"c","PT_NOTE":"c","PT_NULL":"c","PT_OPENBSD_BOOTDATA":"c","PT_OPENBSD_NOBTCFI":"c","PT_OPENBSD_RANDOMIZE":"c","PT_OPENBSD_WXNEEDED":"c","PT_PAX_FLAGS":"c","PT_PHDR":"c","PT_RISCV_ATTRIBUTES":"c","PT_S390_PGSTE":"c","PT_SHLIB":"c","PT_SUNWSTACK":"c","PT_SUNW_EH_FRAME":"c","PT_TLS":"c","Prog":"t","Prog.Open":"m","Prog32":"t","Prog64":"t","ProgFlag":"t","ProgFlag.GoString":"m","ProgFlag.String":"m","ProgHeader":"t","ProgType":"t","ProgType.GoString":"m","ProgType.String":"m","R_386":"t","R_386.GoString":"m","R_386.String":"m","R_386_16":"c","R_386_32":"c","R_386_32PLT":"c","R_386_8":"c","R_386_COPY":"c","R_386_GLOB_DAT":"c","R_386_GOT32":"c","R_386_GOT32X":"c","R_386_GOTOFF":"c","R_386_GOTPC":"c","R_386_IRELATIVE":"c","R_386_JMP_SLOT":"c","R_386_NONE":"c","R_386_PC16":"c","R_386_PC32":"c","R_386_PC8":"c","R_386_PLT32":"c","R_386_RELATIVE":"c","R_386_SIZE32":"c","R_386_TLS_DESC":"c","R_386_TLS_DESC_CALL":"c","R_386_TLS_DTPMOD32":"c","R_386_TLS_DTPOFF32":"c","R_386_TLS_GD":"c","R_386_TLS_GD_32":"c","R_386_TLS_GD_CALL":"c","R_386_TLS_GD_POP":"c","R_386_TLS_GD_PUSH":"c","R_386_TLS_GOTDESC":"c","R_386_TLS_GOTIE":"c","R_386_TLS_IE":"c","R_386_TLS_IE_32":"c","R_386_TLS_LDM":"c","R_386_TLS_LDM_32":"c","R_386_TLS_LDM_CALL":"c","R_386_TLS_LDM_POP":"c","R_386_TLS_LDM_PUSH":"c","R_386_TLS_LDO_32":"c","R_386_TLS_LE":"c","R_386_TLS_LE_32":"c","R_386_TLS_TPOFF":"c","R_386_TLS_TPOFF32":"c","R_390":"t","R_390.GoString":"m","R_390.String":"m","R_390_12":"c","R_390_16":"c","R_390_20":"c","R_390_32":"c","R_390_64":"c","R_390_8":"c","R_390_COPY":"c","R_390_GLOB_DAT":"c","R_390_GOT12":"c","R_390_GOT16":"c","R_390_GOT20":"c","R_390_GOT32":"c","R_390_GOT64":"c","R_390_GOTENT":"c","R_390_GOTOFF":"c","R_390_GOTOFF16":"c","R_390_GOTOFF64":"c","R_390_GOTPC":"c","R_390_GOTPCDBL":"c","R_390_GOTPLT12":"c","R_390_GOTPLT16":"c","R_390_GOTPLT20":"c","R_390_GOTPLT32":"c","R_390_GOTPLT64":"c","R_390_GOTPLTENT":"c","R_390_GOTPLTOFF16":"c","R_390_GOTPLTOFF32":"c","R_390_GOTPLTOFF64":"c","R_390_JMP_SLOT":"c","R_390_NONE":"c","R_390_PC16":"c","R_390_PC16DBL":"c","R_390_PC32":"c","R_390_PC32DBL":"c","R_390_PC64":"c","R_390_PLT16DBL":"c","R_390_PLT32":"c","R_390_PLT32DBL":"c","R_390_PLT64":"c","R_390_RELATIVE":"c","R_390_TLS_DTPMOD":"c","R_390_TLS_DTPOFF":"c","R_390_TLS_GD32":"c","R_390_TLS_GD64":"c","R_390_TLS_GDCALL":"c","R_390_TLS_GOTIE12":"c","R_390_TLS_GOTIE20":"c","R_390_TLS_GOTIE32":"c","R_390_TLS_GOTIE64":"c","R_390_TLS_IE32":"c","R_390_TLS_IE64":"c","R_390_TLS_IEENT":"c","R_390_TLS_LDCALL":"c","R_390_TLS_LDM32":"c","R_390_TLS_LDM64":"c","R_390_TLS_LDO32":"c","R_390_TLS_LDO64":"c","R_390_TLS_LE32":"c","R_390_TLS_LE64":"c","R_390_TLS_LOAD":"c","R_390_TLS_TPOFF":"c","R_AARCH64":"t","R_AARCH64.GoString":"m","R_AARCH64.String":"m","R_AARCH64_ABS16":"c","R_AARCH64_ABS32":"c","R_AARCH64_ABS64":"c","R_AARCH64_ADD_ABS_LO12_NC":"c","R_AARCH64_ADR_GOT_PAGE":"c","R_AARCH64_ADR_PREL_LO21":"c","R_AARCH64_ADR_PREL_PG_HI21":"c","R_AARCH64_ADR_PREL_PG_HI21_NC":"c","R_AARCH64_CALL26":"c","R_AARCH64_CONDBR19":"c","R_AARCH64_COPY":"c","R_AARCH64_GLOB_DAT":"c","R_AARCH64_GOT_LD_PREL19":"c","R_AARCH64_IRELATIVE":"c","R_AARCH64_JUMP26":"c","R_AARCH64_JUMP_SLOT":"c","R_AARCH64_LD64_GOTOFF_LO15":"c","R_AARCH64_LD64_GOTPAGE_LO15":"c","R_AARCH64_LD64_GOT_LO12_NC":"c","R_AARCH64_LDST128_ABS_LO12_NC":"c","R_AARCH64_LDST16_ABS_LO12_NC":"c","R_AARCH64_LDST32_ABS_LO12_NC":"c","R_AARCH64_LDST64_ABS_LO12_NC":"c","R_AARCH64_LDST8_ABS_LO12_NC":"c","R_AARCH64_LD_PREL_LO19":"c","R_AARCH64_MOVW_SABS_G0":"c","R_AARCH64_MOVW_SABS_G1":"c","R_AARCH64_MOVW_SABS_G2":"c","R_AARCH64_MOVW_UABS_G0":"c","R_AARCH64_MOVW_UABS_G0_NC":"c","R_AARCH64_MOVW_UABS_G1":"c","R_AARCH64_MOVW_UABS_G1_NC":"c","R_AARCH64_MOVW_UABS_G2":"c","R_AARCH64_MOVW_UABS_G2_NC":"c","R_AARCH64_MOVW_UABS_G3":"c","R_AARCH64_NONE":"c","R_AARCH64_NULL":"c","R_AARCH64_P32_ABS16":"c","R_AARCH64_P32_ABS32":"c","R_AARCH64_P32_ADD_ABS_LO12_NC":"c","R_AARCH64_P32_ADR_GOT_PAGE":"c","R_AARCH64_P32_ADR_PREL_LO21":"c","R_AARCH64_P32_ADR_PREL_PG_HI21":"c","R_AARCH64_P32_CALL26":"c","R_AARCH64_P32_CONDBR19":"c","R_AARCH64_P32_COPY":"c","R_AARCH64_P32_GLOB_DAT":"c","R_AARCH64_P32_GOT_LD_PREL19":"c","R_AARCH64_P32_IRELATIVE":"c","R_AARCH64_P32_JUMP26":"c","R_AARCH64_P32_JUMP_SLOT":"c","R_AARCH64_P32_LD32_GOT_LO12_NC":"c","R_AARCH64_P32_LDST128_ABS_LO12_NC":"c","R_AARCH64_P32_LDST16_ABS_LO12_NC":"c","R_AARCH64_P32_LDST32_ABS_LO12_NC":"c","R_AARCH64_P32_LDST64_ABS_LO12_NC":"c","R_AARCH64_P32_LDST8_ABS_LO12_NC":"c","R_AARCH64_P32_LD_PREL_LO19":"c","R_AARCH64_P32_MOVW_SABS_G0":"c","R_AARCH64_P32_MOVW_UABS_G0":"c","R_AARCH64_P32_MOVW_UABS_G0_NC":"c","R_AARCH64_P32_MOVW_UABS_G1":"c","R_AARCH64_P32_PREL16":"c","R_AARCH64_P32_PREL32":"c","R_AARCH64_P32_RELATIVE":"c","R_AARCH64_P32_TLSDESC":"c","R_AARCH64_P32_TLSDESC_ADD_LO12_NC":"c","R_AARCH64_P32_TLSDESC_ADR_PAGE21":"c","R_AARCH64_P32_TLSDESC_ADR_PREL21":"c","R_AARCH64_P32_TLSDESC_CALL":"c","R_AARCH64_P32_TLSDESC_LD32_LO12_NC":"c","R_AARCH64_P32_TLSDESC_LD_PREL19":"c","R_AARCH64_P32_TLSGD_ADD_LO12_NC":"c","R_AARCH64_P32_TLSGD_ADR_PAGE21":"c","R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21":"c","R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC":"c","R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19":"c","R_AARCH64_P32_TLSLE_ADD_TPREL_HI12":"c","R_AARCH64_P32_TLSLE_ADD_TPREL_LO12":"c","R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC":"c","R_AARCH64_P32_TLSLE_MOVW_TPREL_G0":"c","R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC":"c","R_AARCH64_P32_TLSLE_MOVW_TPREL_G1":"c","R_AARCH64_P32_TLS_DTPMOD":"c","R_AARCH64_P32_TLS_DTPREL":"c","R_AARCH64_P32_TLS_TPREL":"c","R_AARCH64_P32_TSTBR14":"c","R_AARCH64_PREL16":"c","R_AARCH64_PREL32":"c","R_AARCH64_PREL64":"c","R_AARCH64_RELATIVE":"c","R_AARCH64_TLSDESC":"c","R_AARCH64_TLSDESC_ADD":"c","R_AARCH64_TLSDESC_ADD_LO12_NC":"c","R_AARCH64_TLSDESC_ADR_PAGE21":"c","R_AARCH64_TLSDESC_ADR_PREL21":"c","R_AARCH64_TLSDESC_CALL":"c","R_AARCH64_TLSDESC_LD64_LO12_NC":"c","R_AARCH64_TLSDESC_LDR":"c","R_AARCH64_TLSDESC_LD_PREL19":"c","R_AARCH64_TLSDESC_OFF_G0_NC":"c","R_AARCH64_TLSDESC_OFF_G1":"c","R_AARCH64_TLSGD_ADD_LO12_NC":"c","R_AARCH64_TLSGD_ADR_PAGE21":"c","R_AARCH64_TLSGD_ADR_PREL21":"c","R_AARCH64_TLSGD_MOVW_G0_NC":"c","R_AARCH64_TLSGD_MOVW_G1":"c","R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21":"c","R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC":"c","R_AARCH64_TLSIE_LD_GOTTPREL_PREL19":"c","R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC":"c","R_AARCH64_TLSIE_MOVW_GOTTPREL_G1":"c","R_AARCH64_TLSLD_ADR_PAGE21":"c","R_AARCH64_TLSLD_ADR_PREL21":"c","R_AARCH64_TLSLD_LDST128_DTPREL_LO12":"c","R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC":"c","R_AARCH64_TLSLE_ADD_TPREL_HI12":"c","R_AARCH64_TLSLE_ADD_TPREL_LO12":"c","R_AARCH64_TLSLE_ADD_TPREL_LO12_NC":"c","R_AARCH64_TLSLE_LDST128_TPREL_LO12":"c","R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC":"c","R_AARCH64_TLSLE_MOVW_TPREL_G0":"c","R_AARCH64_TLSLE_MOVW_TPREL_G0_NC":"c","R_AARCH64_TLSLE_MOVW_TPREL_G1":"c","R_AARCH64_TLSLE_MOVW_TPREL_G1_NC":"c","R_AARCH64_TLSLE_MOVW_TPREL_G2":"c","R_AARCH64_TLS_DTPMOD64":"c","R_AARCH64_TLS_DTPREL64":"c","R_AARCH64_TLS_TPREL64":"c","R_AARCH64_TSTBR14":"c","R_ALPHA":"t","R_ALPHA.GoString":"m","R_ALPHA.String":"m","R_ALPHA_BRADDR":"c","R_ALPHA_COPY":"c","R_ALPHA_GLOB_DAT":"c","R_ALPHA_GPDISP":"c","R_ALPHA_GPREL32":"c","R_ALPHA_GPRELHIGH":"c","R_ALPHA_GPRELLOW":"c","R_ALPHA_GPVALUE":"c","R_ALPHA_HINT":"c","R_ALPHA_IMMED_BR_HI32":"c","R_ALPHA_IMMED_GP_16":"c","R_ALPHA_IMMED_GP_HI32":"c","R_ALPHA_IMMED_LO32":"c","R_ALPHA_IMMED_SCN_HI32":"c","R_ALPHA_JMP_SLOT":"c","R_ALPHA_LITERAL":"c","R_ALPHA_LITUSE":"c","R_ALPHA_NONE":"c","R_ALPHA_OP_PRSHIFT":"c","R_ALPHA_OP_PSUB":"c","R_ALPHA_OP_PUSH":"c","R_ALPHA_OP_STORE":"c","R_ALPHA_REFLONG":"c","R_ALPHA_REFQUAD":"c","R_ALPHA_RELATIVE":"c","R_ALPHA_SREL16":"c","R_ALPHA_SREL32":"c","R_ALPHA_SREL64":"c","R_ARM":"t","R_ARM.GoString":"m","R_ARM.String":"m","R_ARM_ABS12":"c","R_ARM_ABS16":"c","R_ARM_ABS32":"c","R_ARM_ABS32_NOI":"c","R_ARM_ABS8":"c","R_ARM_ALU_PCREL_15_8":"c","R_ARM_ALU_PCREL_23_15":"c","R_ARM_ALU_PCREL_7_0":"c","R_ARM_ALU_PC_G0":"c","R_ARM_ALU_PC_G0_NC":"c","R_ARM_ALU_PC_G1":"c","R_ARM_ALU_PC_G1_NC":"c","R_ARM_ALU_PC_G2":"c","R_ARM_ALU_SBREL_19_12_NC":"c","R_ARM_ALU_SBREL_27_20_CK":"c","R_ARM_ALU_SB_G0":"c","R_ARM_ALU_SB_G0_NC":"c","R_ARM_ALU_SB_G1":"c","R_ARM_ALU_SB_G1_NC":"c","R_ARM_ALU_SB_G2":"c","R_ARM_AMP_VCALL9":"c","R_ARM_BASE_ABS":"c","R_ARM_CALL":"c","R_ARM_COPY":"c","R_ARM_GLOB_DAT":"c","R_ARM_GNU_VTENTRY":"c","R_ARM_GNU_VTINHERIT":"c","R_ARM_GOT32":"c","R_ARM_GOTOFF":"c","R_ARM_GOTOFF12":"c","R_ARM_GOTPC":"c","R_ARM_GOTRELAX":"c","R_ARM_GOT_ABS":"c","R_ARM_GOT_BREL12":"c","R_ARM_GOT_PREL":"c","R_ARM_IRELATIVE":"c","R_ARM_JUMP24":"c","R_ARM_JUMP_SLOT":"c","R_ARM_LDC_PC_G0":"c","R_ARM_LDC_PC_G1":"c","R_ARM_LDC_PC_G2":"c","R_ARM_LDC_SB_G0":"c","R_ARM_LDC_SB_G1":"c","R_ARM_LDC_SB_G2":"c","R_ARM_LDRS_PC_G0":"c","R_ARM_LDRS_PC_G1":"c","R_ARM_LDRS_PC_G2":"c","R_ARM_LDRS_SB_G0":"c","R_ARM_LDRS_SB_G1":"c","R_ARM_LDRS_SB_G2":"c","R_ARM_LDR_PC_G1":"c","R_ARM_LDR_PC_G2":"c","R_ARM_LDR_SBREL_11_10_NC":"c","R_ARM_LDR_SB_G0":"c","R_ARM_LDR_SB_G1":"c","R_ARM_LDR_SB_G2":"c","R_ARM_ME_TOO":"c","R_ARM_MOVT_ABS":"c","R_ARM_MOVT_BREL":"c","R_ARM_MOVT_PREL":"c","R_ARM_MOVW_ABS_NC":"c","R_ARM_MOVW_BREL":"c","R_ARM_MOVW_BREL_NC":"c","R_ARM_MOVW_PREL_NC":"c","R_ARM_NONE":"c","R_ARM_PC13":"c","R_ARM_PC24":"c","R_ARM_PLT32":"c","R_ARM_PLT32_ABS":"c","R_ARM_PREL31":"c","R_ARM_PRIVATE_0":"c","R_ARM_PRIVATE_1":"c","R_ARM_PRIVATE_10":"c","R_ARM_PRIVATE_11":"c","R_ARM_PRIVATE_12":"c","R_ARM_PRIVATE_13":"c","R_ARM_PRIVATE_14":"c","R_ARM_PRIVATE_15":"c","R_ARM_PRIVATE_2":"c","R_ARM_PRIVATE_3":"c","R_ARM_PRIVATE_4":"c","R_ARM_PRIVATE_5":"c","R_ARM_PRIVATE_6":"c","R_ARM_PRIVATE_7":"c","R_ARM_PRIVATE_8":"c","R_ARM_PRIVATE_9":"c","R_ARM_RABS32":"c","R_ARM_RBASE":"c","R_ARM_REL32":"c","R_ARM_REL32_NOI":"c","R_ARM_RELATIVE":"c","R_ARM_RPC24":"c","R_ARM_RREL32":"c","R_ARM_RSBREL32":"c","R_ARM_RXPC25":"c","R_ARM_SBREL31":"c","R_ARM_SBREL32":"c","R_ARM_SWI24":"c","R_ARM_TARGET1":"c","R_ARM_TARGET2":"c","R_ARM_THM_ABS5":"c","R_ARM_THM_ALU_ABS_G0_NC":"c","R_ARM_THM_ALU_ABS_G1_NC":"c","R_ARM_THM_ALU_ABS_G2_NC":"c","R_ARM_THM_ALU_ABS_G3":"c","R_ARM_THM_ALU_PREL_11_0":"c","R_ARM_THM_GOT_BREL12":"c","R_ARM_THM_JUMP11":"c","R_ARM_THM_JUMP19":"c","R_ARM_THM_JUMP24":"c","R_ARM_THM_JUMP6":"c","R_ARM_THM_JUMP8":"c","R_ARM_THM_MOVT_ABS":"c","R_ARM_THM_MOVT_BREL":"c","R_ARM_THM_MOVT_PREL":"c","R_ARM_THM_MOVW_ABS_NC":"c","R_ARM_THM_MOVW_BREL":"c","R_ARM_THM_MOVW_BREL_NC":"c","R_ARM_THM_MOVW_PREL_NC":"c","R_ARM_THM_PC12":"c","R_ARM_THM_PC22":"c","R_ARM_THM_PC8":"c","R_ARM_THM_RPC22":"c","R_ARM_THM_SWI8":"c","R_ARM_THM_TLS_CALL":"c","R_ARM_THM_TLS_DESCSEQ16":"c","R_ARM_THM_TLS_DESCSEQ32":"c","R_ARM_THM_XPC22":"c","R_ARM_TLS_CALL":"c","R_ARM_TLS_DESCSEQ":"c","R_ARM_TLS_DTPMOD32":"c","R_ARM_TLS_DTPOFF32":"c","R_ARM_TLS_GD32":"c","R_ARM_TLS_GOTDESC":"c","R_ARM_TLS_IE12GP":"c","R_ARM_TLS_IE32":"c","R_ARM_TLS_LDM32":"c","R_ARM_TLS_LDO12":"c","R_ARM_TLS_LDO32":"c","R_ARM_TLS_LE12":"c","R_ARM_TLS_LE32":"c","R_ARM_TLS_TPOFF32":"c","R_ARM_V4BX":"c","R_ARM_XPC25":"c","R_INFO":"f","R_INFO32":"f","R_LARCH":"t","R_LARCH.GoString":"m","R_LARCH.String":"m","R_LARCH_32":"c","R_LARCH_32_PCREL":"c","R_LARCH_64":"c","R_LARCH_64_PCREL":"c","R_LARCH_ABS64_HI12":"c","R_LARCH_ABS64_LO20":"c","R_LARCH_ABS_HI20":"c","R_LARCH_ABS_LO12":"c","R_LARCH_ADD16":"c","R_LARCH_ADD24":"c","R_LARCH_ADD32":"c","R_LARCH_ADD6":"c","R_LARCH_ADD64":"c","R_LARCH_ADD8":"c","R_LARCH_ADD_ULEB128":"c","R_LARCH_ALIGN":"c","R_LARCH_B16":"c","R_LARCH_B21":"c","R_LARCH_B26":"c","R_LARCH_CFA":"c","R_LARCH_COPY":"c","R_LARCH_DELETE":"c","R_LARCH_GNU_VTENTRY":"c","R_LARCH_GNU_VTINHERIT":"c","R_LARCH_GOT64_HI12":"c","R_LARCH_GOT64_LO20":"c","R_LARCH_GOT64_PC_HI12":"c","R_LARCH_GOT64_PC_LO20":"c","R_LARCH_GOT_HI20":"c","R_LARCH_GOT_LO12":"c","R_LARCH_GOT_PC_HI20":"c","R_LARCH_GOT_PC_LO12":"c","R_LARCH_IRELATIVE":"c","R_LARCH_JUMP_SLOT":"c","R_LARCH_MARK_LA":"c","R_LARCH_MARK_PCREL":"c","R_LARCH_NONE":"c","R_LARCH_PCALA64_HI12":"c","R_LARCH_PCALA64_LO20":"c","R_LARCH_PCALA_HI20":"c","R_LARCH_PCALA_LO12":"c","R_LARCH_PCREL20_S2":"c","R_LARCH_RELATIVE":"c","R_LARCH_RELAX":"c","R_LARCH_SOP_ADD":"c","R_LARCH_SOP_AND":"c","R_LARCH_SOP_ASSERT":"c","R_LARCH_SOP_IF_ELSE":"c","R_LARCH_SOP_NOT":"c","R_LARCH_SOP_POP_32_S_0_10_10_16_S2":"c","R_LARCH_SOP_POP_32_S_0_5_10_16_S2":"c","R_LARCH_SOP_POP_32_S_10_12":"c","R_LARCH_SOP_POP_32_S_10_16":"c","R_LARCH_SOP_POP_32_S_10_16_S2":"c","R_LARCH_SOP_POP_32_S_10_5":"c","R_LARCH_SOP_POP_32_S_5_20":"c","R_LARCH_SOP_POP_32_U":"c","R_LARCH_SOP_POP_32_U_10_12":"c","R_LARCH_SOP_PUSH_ABSOLUTE":"c","R_LARCH_SOP_PUSH_DUP":"c","R_LARCH_SOP_PUSH_GPREL":"c","R_LARCH_SOP_PUSH_PCREL":"c","R_LARCH_SOP_PUSH_PLT_PCREL":"c","R_LARCH_SOP_PUSH_TLS_GD":"c","R_LARCH_SOP_PUSH_TLS_GOT":"c","R_LARCH_SOP_PUSH_TLS_TPREL":"c","R_LARCH_SOP_SL":"c","R_LARCH_SOP_SR":"c","R_LARCH_SOP_SUB":"c","R_LARCH_SUB16":"c","R_LARCH_SUB24":"c","R_LARCH_SUB32":"c","R_LARCH_SUB6":"c","R_LARCH_SUB64":"c","R_LARCH_SUB8":"c","R_LARCH_SUB_ULEB128":"c","R_LARCH_TLS_DTPMOD32":"c","R_LARCH_TLS_DTPMOD64":"c","R_LARCH_TLS_DTPREL32":"c","R_LARCH_TLS_DTPREL64":"c","R_LARCH_TLS_GD_HI20":"c","R_LARCH_TLS_GD_PC_HI20":"c","R_LARCH_TLS_IE64_HI12":"c","R_LARCH_TLS_IE64_LO20":"c","R_LARCH_TLS_IE64_PC_HI12":"c","R_LARCH_TLS_IE64_PC_LO20":"c","R_LARCH_TLS_IE_HI20":"c","R_LARCH_TLS_IE_LO12":"c","R_LARCH_TLS_IE_PC_HI20":"c","R_LARCH_TLS_IE_PC_LO12":"c","R_LARCH_TLS_LD_HI20":"c","R_LARCH_TLS_LD_PC_HI20":"c","R_LARCH_TLS_LE64_HI12":"c","R_LARCH_TLS_LE64_LO20":"c","R_LARCH_TLS_LE_HI20":"c","R_LARCH_TLS_LE_LO12":"c","R_LARCH_TLS_TPREL32":"c","R_LARCH_TLS_TPREL64":"c","R_MIPS":"t","R_MIPS.GoString":"m","R_MIPS.String":"m","R_MIPS_16":"c","R_MIPS_26":"c","R_MIPS_32":"c","R_MIPS_64":"c","R_MIPS_ADD_IMMEDIATE":"c","R_MIPS_CALL16":"c","R_MIPS_CALL_HI16":"c","R_MIPS_CALL_LO16":"c","R_MIPS_DELETE":"c","R_MIPS_GOT16":"c","R_MIPS_GOT_DISP":"c","R_MIPS_GOT_HI16":"c","R_MIPS_GOT_LO16":"c","R_MIPS_GOT_OFST":"c","R_MIPS_GOT_PAGE":"c","R_MIPS_GPREL16":"c","R_MIPS_GPREL32":"c","R_MIPS_HI16":"c","R_MIPS_HIGHER":"c","R_MIPS_HIGHEST":"c","R_MIPS_INSERT_A":"c","R_MIPS_INSERT_B":"c","R_MIPS_JALR":"c","R_MIPS_LITERAL":"c","R_MIPS_LO16":"c","R_MIPS_NONE":"c","R_MIPS_PC16":"c","R_MIPS_PC32":"c","R_MIPS_PJUMP":"c","R_MIPS_REL16":"c","R_MIPS_REL32":"c","R_MIPS_RELGOT":"c","R_MIPS_SCN_DISP":"c","R_MIPS_SHIFT5":"c","R_MIPS_SHIFT6":"c","R_MIPS_SUB":"c","R_MIPS_TLS_DTPMOD32":"c","R_MIPS_TLS_DTPMOD64":"c","R_MIPS_TLS_DTPREL32":"c","R_MIPS_TLS_DTPREL64":"c","R_MIPS_TLS_DTPREL_HI16":"c","R_MIPS_TLS_DTPREL_LO16":"c","R_MIPS_TLS_GD":"c","R_MIPS_TLS_GOTTPREL":"c","R_MIPS_TLS_LDM":"c","R_MIPS_TLS_TPREL32":"c","R_MIPS_TLS_TPREL64":"c","R_MIPS_TLS_TPREL_HI16":"c","R_MIPS_TLS_TPREL_LO16":"c","R_PPC":"t","R_PPC.GoString":"m","R_PPC.String":"m","R_PPC64":"t","R_PPC64.GoString":"m","R_PPC64.String":"m","R_PPC64_ADDR14":"c","R_PPC64_ADDR14_BRNTAKEN":"c","R_PPC64_ADDR14_BRTAKEN":"c","R_PPC64_ADDR16":"c","R_PPC64_ADDR16_DS":"c","R_PPC64_ADDR16_HA":"c","R_PPC64_ADDR16_HI":"c","R_PPC64_ADDR16_HIGH":"c","R_PPC64_ADDR16_HIGHA":"c","R_PPC64_ADDR16_HIGHER":"c","R_PPC64_ADDR16_HIGHER34":"c","R_PPC64_ADDR16_HIGHERA":"c","R_PPC64_ADDR16_HIGHERA34":"c","R_PPC64_ADDR16_HIGHEST":"c","R_PPC64_ADDR16_HIGHEST34":"c","R_PPC64_ADDR16_HIGHESTA":"c","R_PPC64_ADDR16_HIGHESTA34":"c","R_PPC64_ADDR16_LO":"c","R_PPC64_ADDR16_LO_DS":"c","R_PPC64_ADDR24":"c","R_PPC64_ADDR32":"c","R_PPC64_ADDR64":"c","R_PPC64_ADDR64_LOCAL":"c","R_PPC64_COPY":"c","R_PPC64_D28":"c","R_PPC64_D34":"c","R_PPC64_D34_HA30":"c","R_PPC64_D34_HI30":"c","R_PPC64_D34_LO":"c","R_PPC64_DTPMOD64":"c","R_PPC64_DTPREL16":"c","R_PPC64_DTPREL16_DS":"c","R_PPC64_DTPREL16_HA":"c","R_PPC64_DTPREL16_HI":"c","R_PPC64_DTPREL16_HIGH":"c","R_PPC64_DTPREL16_HIGHA":"c","R_PPC64_DTPREL16_HIGHER":"c","R_PPC64_DTPREL16_HIGHERA":"c","R_PPC64_DTPREL16_HIGHEST":"c","R_PPC64_DTPREL16_HIGHESTA":"c","R_PPC64_DTPREL16_LO":"c","R_PPC64_DTPREL16_LO_DS":"c","R_PPC64_DTPREL34":"c","R_PPC64_DTPREL64":"c","R_PPC64_ENTRY":"c","R_PPC64_GLOB_DAT":"c","R_PPC64_GNU_VTENTRY":"c","R_PPC64_GNU_VTINHERIT":"c","R_PPC64_GOT16":"c","R_PPC64_GOT16_DS":"c","R_PPC64_GOT16_HA":"c","R_PPC64_GOT16_HI":"c","R_PPC64_GOT16_LO":"c","R_PPC64_GOT16_LO_DS":"c","R_PPC64_GOT_DTPREL16_DS":"c","R_PPC64_GOT_DTPREL16_HA":"c","R_PPC64_GOT_DTPREL16_HI":"c","R_PPC64_GOT_DTPREL16_LO_DS":"c","R_PPC64_GOT_DTPREL_PCREL34":"c","R_PPC64_GOT_PCREL34":"c","R_PPC64_GOT_TLSGD16":"c","R_PPC64_GOT_TLSGD16_HA":"c","R_PPC64_GOT_TLSGD16_HI":"c","R_PPC64_GOT_TLSGD16_LO":"c","R_PPC64_GOT_TLSGD_PCREL34":"c","R_PPC64_GOT_TLSLD16":"c","R_PPC64_GOT_TLSLD16_HA":"c","R_PPC64_GOT_TLSLD16_HI":"c","R_PPC64_GOT_TLSLD16_LO":"c","R_PPC64_GOT_TLSLD_PCREL34":"c","R_PPC64_GOT_TPREL16_DS":"c","R_PPC64_GOT_TPREL16_HA":"c","R_PPC64_GOT_TPREL16_HI":"c","R_PPC64_GOT_TPREL16_LO_DS":"c","R_PPC64_GOT_TPREL_PCREL34":"c","R_PPC64_IRELATIVE":"c","R_PPC64_JMP_IREL":"c","R_PPC64_JMP_SLOT":"c","R_PPC64_NONE":"c","R_PPC64_PCREL28":"c","R_PPC64_PCREL34":"c","R_PPC64_PCREL_OPT":"c","R_PPC64_PLT16_HA":"c","R_PPC64_PLT16_HI":"c","R_PPC64_PLT16_LO":"c","R_PPC64_PLT16_LO_DS":"c","R_PPC64_PLT32":"c","R_PPC64_PLT64":"c","R_PPC64_PLTCALL":"c","R_PPC64_PLTCALL_NOTOC":"c","R_PPC64_PLTGOT16":"c","R_PPC64_PLTGOT16_DS":"c","R_PPC64_PLTGOT16_HA":"c","R_PPC64_PLTGOT16_HI":"c","R_PPC64_PLTGOT16_LO":"c","R_PPC64_PLTGOT_LO_DS":"c","R_PPC64_PLTREL32":"c","R_PPC64_PLTREL64":"c","R_PPC64_PLTSEQ":"c","R_PPC64_PLTSEQ_NOTOC":"c","R_PPC64_PLT_PCREL34":"c","R_PPC64_PLT_PCREL34_NOTOC":"c","R_PPC64_REL14":"c","R_PPC64_REL14_BRNTAKEN":"c","R_PPC64_REL14_BRTAKEN":"c","R_PPC64_REL16":"c","R_PPC64_REL16DX_HA":"c","R_PPC64_REL16_HA":"c","R_PPC64_REL16_HI":"c","R_PPC64_REL16_HIGH":"c","R_PPC64_REL16_HIGHA":"c","R_PPC64_REL16_HIGHER":"c","R_PPC64_REL16_HIGHER34":"c","R_PPC64_REL16_HIGHERA":"c","R_PPC64_REL16_HIGHERA34":"c","R_PPC64_REL16_HIGHEST":"c","R_PPC64_REL16_HIGHEST34":"c","R_PPC64_REL16_HIGHESTA":"c","R_PPC64_REL16_HIGHESTA34":"c","R_PPC64_REL16_LO":"c","R_PPC64_REL24":"c","R_PPC64_REL24_NOTOC":"c","R_PPC64_REL24_P9NOTOC":"c","R_PPC64_REL30":"c","R_PPC64_REL32":"c","R_PPC64_REL64":"c","R_PPC64_RELATIVE":"c","R_PPC64_SECTOFF":"c","R_PPC64_SECTOFF_DS":"c","R_PPC64_SECTOFF_HA":"c","R_PPC64_SECTOFF_HI":"c","R_PPC64_SECTOFF_LO":"c","R_PPC64_SECTOFF_LO_DS":"c","R_PPC64_TLS":"c","R_PPC64_TLSGD":"c","R_PPC64_TLSLD":"c","R_PPC64_TOC":"c","R_PPC64_TOC16":"c","R_PPC64_TOC16_DS":"c","R_PPC64_TOC16_HA":"c","R_PPC64_TOC16_HI":"c","R_PPC64_TOC16_LO":"c","R_PPC64_TOC16_LO_DS":"c","R_PPC64_TOCSAVE":"c","R_PPC64_TPREL16":"c","R_PPC64_TPREL16_DS":"c","R_PPC64_TPREL16_HA":"c","R_PPC64_TPREL16_HI":"c","R_PPC64_TPREL16_HIGH":"c","R_PPC64_TPREL16_HIGHA":"c","R_PPC64_TPREL16_HIGHER":"c","R_PPC64_TPREL16_HIGHERA":"c","R_PPC64_TPREL16_HIGHEST":"c","R_PPC64_TPREL16_HIGHESTA":"c","R_PPC64_TPREL16_LO":"c","R_PPC64_TPREL16_LO_DS":"c","R_PPC64_TPREL34":"c","R_PPC64_TPREL64":"c","R_PPC64_UADDR16":"c","R_PPC64_UADDR32":"c","R_PPC64_UADDR64":"c","R_PPC_ADDR14":"c","R_PPC_ADDR14_BRNTAKEN":"c","R_PPC_ADDR14_BRTAKEN":"c","R_PPC_ADDR16":"c","R_PPC_ADDR16_HA":"c","R_PPC_ADDR16_HI":"c","R_PPC_ADDR16_LO":"c","R_PPC_ADDR24":"c","R_PPC_ADDR32":"c","R_PPC_COPY":"c","R_PPC_DTPMOD32":"c","R_PPC_DTPREL16":"c","R_PPC_DTPREL16_HA":"c","R_PPC_DTPREL16_HI":"c","R_PPC_DTPREL16_LO":"c","R_PPC_DTPREL32":"c","R_PPC_EMB_BIT_FLD":"c","R_PPC_EMB_MRKREF":"c","R_PPC_EMB_NADDR16":"c","R_PPC_EMB_NADDR16_HA":"c","R_PPC_EMB_NADDR16_HI":"c","R_PPC_EMB_NADDR16_LO":"c","R_PPC_EMB_NADDR32":"c","R_PPC_EMB_RELSDA":"c","R_PPC_EMB_RELSEC16":"c","R_PPC_EMB_RELST_HA":"c","R_PPC_EMB_RELST_HI":"c","R_PPC_EMB_RELST_LO":"c","R_PPC_EMB_SDA21":"c","R_PPC_EMB_SDA2I16":"c","R_PPC_EMB_SDA2REL":"c","R_PPC_EMB_SDAI16":"c","R_PPC_GLOB_DAT":"c","R_PPC_GOT16":"c","R_PPC_GOT16_HA":"c","R_PPC_GOT16_HI":"c","R_PPC_GOT16_LO":"c","R_PPC_GOT_TLSGD16":"c","R_PPC_GOT_TLSGD16_HA":"c","R_PPC_GOT_TLSGD16_HI":"c","R_PPC_GOT_TLSGD16_LO":"c","R_PPC_GOT_TLSLD16":"c","R_PPC_GOT_TLSLD16_HA":"c","R_PPC_GOT_TLSLD16_HI":"c","R_PPC_GOT_TLSLD16_LO":"c","R_PPC_GOT_TPREL16":"c","R_PPC_GOT_TPREL16_HA":"c","R_PPC_GOT_TPREL16_HI":"c","R_PPC_GOT_TPREL16_LO":"c","R_PPC_JMP_SLOT":"c","R_PPC_LOCAL24PC":"c","R_PPC_NONE":"c","R_PPC_PLT16_HA":"c","R_PPC_PLT16_HI":"c","R_PPC_PLT16_LO":"c","R_PPC_PLT32":"c","R_PPC_PLTREL24":"c","R_PPC_PLTREL32":"c","R_PPC_REL14":"c","R_PPC_REL14_BRNTAKEN":"c","R_PPC_REL14_BRTAKEN":"c","R_PPC_REL24":"c","R_PPC_REL32":"c","R_PPC_RELATIVE":"c","R_PPC_SDAREL16":"c","R_PPC_SECTOFF":"c","R_PPC_SECTOFF_HA":"c","R_PPC_SECTOFF_HI":"c","R_PPC_SECTOFF_LO":"c","R_PPC_TLS":"c","R_PPC_TPREL16":"c","R_PPC_TPREL16_HA":"c","R_PPC_TPREL16_HI":"c","R_PPC_TPREL16_LO":"c","R_PPC_TPREL32":"c","R_PPC_UADDR16":"c","R_PPC_UADDR32":"c","R_RISCV":"t","R_RISCV.GoString":"m","R_RISCV.String":"m","R_RISCV_32":"c","R_RISCV_32_PCREL":"c","R_RISCV_64":"c","R_RISCV_ADD16":"c","R_RISCV_ADD32":"c","R_RISCV_ADD64":"c","R_RISCV_ADD8":"c","R_RISCV_ALIGN":"c","R_RISCV_BRANCH":"c","R_RISCV_CALL":"c","R_RISCV_CALL_PLT":"c","R_RISCV_COPY":"c","R_RISCV_GNU_VTENTRY":"c","R_RISCV_GNU_VTINHERIT":"c","R_RISCV_GOT_HI20":"c","R_RISCV_GPREL_I":"c","R_RISCV_GPREL_S":"c","R_RISCV_HI20":"c","R_RISCV_JAL":"c","R_RISCV_JUMP_SLOT":"c","R_RISCV_LO12_I":"c","R_RISCV_LO12_S":"c","R_RISCV_NONE":"c","R_RISCV_PCREL_HI20":"c","R_RISCV_PCREL_LO12_I":"c","R_RISCV_PCREL_LO12_S":"c","R_RISCV_RELATIVE":"c","R_RISCV_RELAX":"c","R_RISCV_RVC_BRANCH":"c","R_RISCV_RVC_JUMP":"c","R_RISCV_RVC_LUI":"c","R_RISCV_SET16":"c","R_RISCV_SET32":"c","R_RISCV_SET6":"c","R_RISCV_SET8":"c","R_RISCV_SUB16":"c","R_RISCV_SUB32":"c","R_RISCV_SUB6":"c","R_RISCV_SUB64":"c","R_RISCV_SUB8":"c","R_RISCV_TLS_DTPMOD32":"c","R_RISCV_TLS_DTPMOD64":"c","R_RISCV_TLS_DTPREL32":"c","R_RISCV_TLS_DTPREL64":"c","R_RISCV_TLS_GD_HI20":"c","R_RISCV_TLS_GOT_HI20":"c","R_RISCV_TLS_TPREL32":"c","R_RISCV_TLS_TPREL64":"c","R_RISCV_TPREL_ADD":"c","R_RISCV_TPREL_HI20":"c","R_RISCV_TPREL_I":"c","R_RISCV_TPREL_LO12_I":"c","R_RISCV_TPREL_LO12_S":"c","R_RISCV_TPREL_S":"c","R_SPARC":"t","R_SPARC.GoString":"m","R_SPARC.String":"m","R_SPARC_10":"c","R_SPARC_11":"c","R_SPARC_13":"c","R_SPARC_16":"c","R_SPARC_22":"c","R_SPARC_32":"c","R_SPARC_5":"c","R_SPARC_6":"c","R_SPARC_64":"c","R_SPARC_7":"c","R_SPARC_8":"c","R_SPARC_COPY":"c","R_SPARC_DISP16":"c","R_SPARC_DISP32":"c","R_SPARC_DISP64":"c","R_SPARC_DISP8":"c","R_SPARC_GLOB_DAT":"c","R_SPARC_GLOB_JMP":"c","R_SPARC_GOT10":"c","R_SPARC_GOT13":"c","R_SPARC_GOT22":"c","R_SPARC_H44":"c","R_SPARC_HH22":"c","R_SPARC_HI22":"c","R_SPARC_HIPLT22":"c","R_SPARC_HIX22":"c","R_SPARC_HM10":"c","R_SPARC_JMP_SLOT":"c","R_SPARC_L44":"c","R_SPARC_LM22":"c","R_SPARC_LO10":"c","R_SPARC_LOPLT10":"c","R_SPARC_LOX10":"c","R_SPARC_M44":"c","R_SPARC_NONE":"c","R_SPARC_OLO10":"c","R_SPARC_PC10":"c","R_SPARC_PC22":"c","R_SPARC_PCPLT10":"c","R_SPARC_PCPLT22":"c","R_SPARC_PCPLT32":"c","R_SPARC_PC_HH22":"c","R_SPARC_PC_HM10":"c","R_SPARC_PC_LM22":"c","R_SPARC_PLT32":"c","R_SPARC_PLT64":"c","R_SPARC_REGISTER":"c","R_SPARC_RELATIVE":"c","R_SPARC_UA16":"c","R_SPARC_UA32":"c","R_SPARC_UA64":"c","R_SPARC_WDISP16":"c","R_SPARC_WDISP19":"c","R_SPARC_WDISP22":"c","R_SPARC_WDISP30":"c","R_SPARC_WPLT30":"c","R_SYM32":"f","R_SYM64":"f","R_TYPE32":"f","R_TYPE64":"f","R_X86_64":"t","R_X86_64.GoString":"m","R_X86_64.String":"m","R_X86_64_16":"c","R_X86_64_32":"c","R_X86_64_32S":"c","R_X86_64_64":"c","R_X86_64_8":"c","R_X86_64_COPY":"c","R_X86_64_DTPMOD64":"c","R_X86_64_DTPOFF32":"c","R_X86_64_DTPOFF64":"c","R_X86_64_GLOB_DAT":"c","R_X86_64_GOT32":"c","R_X86_64_GOT64":"c","R_X86_64_GOTOFF64":"c","R_X86_64_GOTPC32":"c","R_X86_64_GOTPC32_TLSDESC":"c","R_X86_64_GOTPC64":"c","R_X86_64_GOTPCREL":"c","R_X86_64_GOTPCREL64":"c","R_X86_64_GOTPCRELX":"c","R_X86_64_GOTPLT64":"c","R_X86_64_GOTTPOFF":"c","R_X86_64_IRELATIVE":"c","R_X86_64_JMP_SLOT":"c","R_X86_64_NONE":"c","R_X86_64_PC16":"c","R_X86_64_PC32":"c","R_X86_64_PC32_BND":"c","R_X86_64_PC64":"c","R_X86_64_PC8":"c","R_X86_64_PLT32":"c","R_X86_64_PLT32_BND":"c","R_X86_64_PLTOFF64":"c","R_X86_64_RELATIVE":"c","R_X86_64_RELATIVE64":"c","R_X86_64_REX_GOTPCRELX":"c","R_X86_64_SIZE32":"c","R_X86_64_SIZE64":"c","R_X86_64_TLSDESC":"c","R_X86_64_TLSDESC_CALL":"c","R_X86_64_TLSGD":"c","R_X86_64_TLSLD":"c","R_X86_64_TPOFF32":"c","R_X86_64_TPOFF64":"c","Rel32":"t","Rel64":"t","Rela32":"t","Rela64":"t","SHF_ALLOC":"c","SHF_COMPRESSED":"c","SHF_EXECINSTR":"c","SHF_GROUP":"c","SHF_INFO_LINK":"c","SHF_LINK_ORDER":"c","SHF_MASKOS":"c","SHF_MASKPROC":"c","SHF_MERGE":"c","SHF_OS_NONCONFORMING":"c","SHF_STRINGS":"c","SHF_TLS":"c","SHF_WRITE":"c","SHN_ABS":"c","SHN_COMMON":"c","SHN_HIOS":"c","SHN_HIPROC":"c","SHN_HIRESERVE":"c","SHN_LOOS":"c","SHN_LOPROC":"c","SHN_LORESERVE":"c","SHN_UNDEF":"c","SHN_XINDEX":"c","SHT_DYNAMIC":"c","SHT_DYNSYM":"c","SHT_FINI_ARRAY":"c","SHT_GNU_ATTRIBUTES":"c","SHT_GNU_HASH":"c","SHT_GNU_LIBLIST":"c","SHT_GNU_VERDEF":"c","SHT_GNU_VERNEED":"c","SHT_GNU_VERSYM":"c","SHT_GROUP":"c","SHT_HASH":"c","SHT_HIOS":"c","SHT_HIPROC":"c","SHT_HIUSER":"c","SHT_INIT_ARRAY":"c","SHT_LOOS":"c","SHT_LOPROC":"c","SHT_LOUSER":"c","SHT_MIPS_ABIFLAGS":"c","SHT_NOBITS":"c","SHT_NOTE":"c","SHT_NULL":"c","SHT_PREINIT_ARRAY":"c","SHT_PROGBITS":"c","SHT_REL":"c","SHT_RELA":"c","SHT_RISCV_ATTRIBUTES":"c","SHT_SHLIB":"c","SHT_STRTAB":"c","SHT_SYMTAB":"c","SHT_SYMTAB_SHNDX":"c","STB_GLOBAL":"c","STB_HIOS":"c","STB_HIPROC":"c","STB_LOCAL":"c","STB_LOOS":"c","STB_LOPROC":"c","STB_WEAK":"c","STT_COMMON":"c","STT_FILE":"c","STT_FUNC":"c","STT_GNU_IFUNC":"c","STT_HIOS":"c","STT_HIPROC":"c","STT_LOOS":"c","STT_LOPROC":"c","STT_NOTYPE":"c","STT_OBJECT":"c","STT_RELC":"c","STT_SECTION":"c","STT_SRELC":"c","STT_TLS":"c","STV_DEFAULT":"c","STV_HIDDEN":"c","STV_INTERNAL":"c","STV_PROTECTED":"c","ST_BIND":"f","ST_INFO":"f","ST_TYPE":"f","ST_VISIBILITY":"f","Section":"t","Section.Data":"m","Section.Open":"m","Section32":"t","Section64":"t","SectionFlag":"t","SectionFlag.GoString":"m","SectionFlag.String":"m","SectionHeader":"t","SectionIndex":"t","SectionIndex.GoString":"m","SectionIndex.String":"m","SectionType":"t","SectionType.GoString":"m","SectionType.String":"m","Sym32":"t","Sym32Size":"c","Sym64":"t","Sym64Size":"c","SymBind":"t","SymBind.GoString":"m","SymBind.String":"m","SymType":"t","SymType.GoString":"m","SymType.String":"m","SymVis":"t","SymVis.GoString":"m","SymVis.String":"m","Symbol":"t","Type":"t","Type.GoString":"m","Type.String":"m","VER_FLG_BASE":"c","VER_FLG_INFO":"c","VER_FLG_WEAK":"c","Version":"t","Version.GoString":"m","Version.String":"m","VersionIndex":"t","VersionIndex.Index":"m","VersionIndex.IsHidden":"m"}},"debug/gosym":{"path":"debug/gosym","name":"gosym","symbols":{"DecodingError":"t","DecodingError.Error":"m","Func":"t","LineTable":"t","LineTable.LineToPC":"m","LineTable.PCToLine":"m","NewLineTable":"f","NewTable":"f","Obj":"t","Sym":"t","Sym.BaseName":"m","Sym.PackageName":"m","Sym.ReceiverName":"m","Sym.Static":"m","Table":"t","Table.LineToPC":"m","Table.LookupFunc":"m","Table.LookupSym":"m","Table.PCToFunc":"m","Table.PCToLine":"m","Table.SymByAddr":"m","UnknownFileError":"t","UnknownFileError.Error":"m","UnknownLineError":"t","UnknownLineError.Error":"m"}},"debug/macho":{"path":"debug/macho","name":"macho","symbols":{"ARM64_RELOC_ADDEND":"c","ARM64_RELOC_BRANCH26":"c","ARM64_RELOC_GOT_LOAD_PAGE21":"c","ARM64_RELOC_GOT_LOAD_PAGEOFF12":"c","ARM64_RELOC_PAGE21":"c","ARM64_RELOC_PAGEOFF12":"c","ARM64_RELOC_POINTER_TO_GOT":"c","ARM64_RELOC_SUBTRACTOR":"c","ARM64_RELOC_TLVP_LOAD_PAGE21":"c","ARM64_RELOC_TLVP_LOAD_PAGEOFF12":"c","ARM64_RELOC_UNSIGNED":"c","ARM_RELOC_BR24":"c","ARM_RELOC_HALF":"c","ARM_RELOC_HALF_SECTDIFF":"c","ARM_RELOC_LOCAL_SECTDIFF":"c","ARM_RELOC_PAIR":"c","ARM_RELOC_PB_LA_PTR":"c","ARM_RELOC_SECTDIFF":"c","ARM_RELOC_VANILLA":"c","ARM_THUMB_32BIT_BRANCH":"c","ARM_THUMB_RELOC_BR22":"c","Cpu":"t","Cpu.GoString":"m","Cpu.String":"m","Cpu386":"c","CpuAmd64":"c","CpuArm":"c","CpuArm64":"c","CpuPpc":"c","CpuPpc64":"c","Dylib":"t","DylibCmd":"t","Dysymtab":"t","DysymtabCmd":"t","ErrNotFat":"v","FatArch":"t","FatArchHeader":"t","FatFile":"t","FatFile.Close":"m","File":"t","File.Close":"m","File.DWARF":"m","File.ImportedLibraries":"m","File.ImportedSymbols":"m","File.Section":"m","File.Segment":"m","FileHeader":"t","FlagAllModsBound":"c","FlagAllowStackExecution":"c","FlagAppExtensionSafe":"c","FlagBindAtLoad":"c","FlagBindsToWeak":"c","FlagCanonical":"c","FlagDeadStrippableDylib":"c","FlagDyldLink":"c","FlagForceFlat":"c","FlagHasTLVDescriptors":"c","FlagIncrLink":"c","FlagLazyInit":"c","FlagNoFixPrebinding":"c","FlagNoHeapExecution":"c","FlagNoMultiDefs":"c","FlagNoReexportedDylibs":"c","FlagNoUndefs":"c","FlagPIE":"c","FlagPrebindable":"c","FlagPrebound":"c","FlagRootSafe":"c","FlagSetuidSafe":"c","FlagSplitSegs":"c","FlagSubsectionsViaSymbols":"c","FlagTwoLevel":"c","FlagWeakDefines":"c","FormatError":"t","FormatError.Error":"m","GENERIC_RELOC_LOCAL_SECTDIFF":"c","GENERIC_RELOC_PAIR":"c","GENERIC_RELOC_PB_LA_PTR":"c","GENERIC_RELOC_SECTDIFF":"c","GENERIC_RELOC_TLV":"c","GENERIC_RELOC_VANILLA":"c","Load":"t","LoadBytes":"t","LoadBytes.Raw":"m","LoadCmd":"t","LoadCmd.GoString":"m","LoadCmd.String":"m","LoadCmdDylib":"c","LoadCmdDylinker":"c","LoadCmdDysymtab":"c","LoadCmdRpath":"c","LoadCmdSegment":"c","LoadCmdSegment64":"c","LoadCmdSymtab":"c","LoadCmdThread":"c","LoadCmdUnixThread":"c","Magic32":"c","Magic64":"c","MagicFat":"c","NewFatFile":"f","NewFile":"f","Nlist32":"t","Nlist64":"t","Open":"f","OpenFat":"f","Regs386":"t","RegsAMD64":"t","Reloc":"t","RelocTypeARM":"t","RelocTypeARM.GoString":"m","RelocTypeARM.String":"m","RelocTypeARM64":"t","RelocTypeARM64.GoString":"m","RelocTypeARM64.String":"m","RelocTypeGeneric":"t","RelocTypeGeneric.GoString":"m","RelocTypeGeneric.String":"m","RelocTypeX86_64":"t","RelocTypeX86_64.GoString":"m","RelocTypeX86_64.String":"m","Rpath":"t","RpathCmd":"t","Section":"t","Section.Data":"m","Section.Open":"m","Section32":"t","Section64":"t","SectionHeader":"t","Segment":"t","Segment.Data":"m","Segment.Open":"m","Segment32":"t","Segment64":"t","SegmentHeader":"t","Symbol":"t","Symtab":"t","SymtabCmd":"t","Thread":"t","Type":"t","Type.GoString":"m","Type.String":"m","TypeBundle":"c","TypeDylib":"c","TypeExec":"c","TypeObj":"c","X86_64_RELOC_BRANCH":"c","X86_64_RELOC_GOT":"c","X86_64_RELOC_GOT_LOAD":"c","X86_64_RELOC_SIGNED":"c","X86_64_RELOC_SIGNED_1":"c","X86_64_RELOC_SIGNED_2":"c","X86_64_RELOC_SIGNED_4":"c","X86_64_RELOC_SUBTRACTOR":"c","X86_64_RELOC_TLV":"c","X86_64_RELOC_UNSIGNED":"c"}},"debug/pe":{"path":"debug/pe","name":"pe","symbols":{"COFFSymbol":"t","COFFSymbol.FullName":"m","COFFSymbolAuxFormat5":"t","COFFSymbolSize":"c","DataDirectory":"t","File":"t","File.COFFSymbolReadSectionDefAux":"m","File.Close":"m","File.DWARF":"m","File.ImportedLibraries":"m","File.ImportedSymbols":"m","File.Section":"m","FileHeader":"t","FormatError":"t","FormatError.Error":"m","IMAGE_COMDAT_SELECT_ANY":"c","IMAGE_COMDAT_SELECT_ASSOCIATIVE":"c","IMAGE_COMDAT_SELECT_EXACT_MATCH":"c","IMAGE_COMDAT_SELECT_LARGEST":"c","IMAGE_COMDAT_SELECT_NODUPLICATES":"c","IMAGE_COMDAT_SELECT_SAME_SIZE":"c","IMAGE_DIRECTORY_ENTRY_ARCHITECTURE":"c","IMAGE_DIRECTORY_ENTRY_BASERELOC":"c","IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT":"c","IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR":"c","IMAGE_DIRECTORY_ENTRY_DEBUG":"c","IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT":"c","IMAGE_DIRECTORY_ENTRY_EXCEPTION":"c","IMAGE_DIRECTORY_ENTRY_EXPORT":"c","IMAGE_DIRECTORY_ENTRY_GLOBALPTR":"c","IMAGE_DIRECTORY_ENTRY_IAT":"c","IMAGE_DIRECTORY_ENTRY_IMPORT":"c","IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG":"c","IMAGE_DIRECTORY_ENTRY_RESOURCE":"c","IMAGE_DIRECTORY_ENTRY_SECURITY":"c","IMAGE_DIRECTORY_ENTRY_TLS":"c","IMAGE_DLLCHARACTERISTICS_APPCONTAINER":"c","IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE":"c","IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY":"c","IMAGE_DLLCHARACTERISTICS_GUARD_CF":"c","IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA":"c","IMAGE_DLLCHARACTERISTICS_NO_BIND":"c","IMAGE_DLLCHARACTERISTICS_NO_ISOLATION":"c","IMAGE_DLLCHARACTERISTICS_NO_SEH":"c","IMAGE_DLLCHARACTERISTICS_NX_COMPAT":"c","IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE":"c","IMAGE_DLLCHARACTERISTICS_WDM_DRIVER":"c","IMAGE_FILE_32BIT_MACHINE":"c","IMAGE_FILE_AGGRESIVE_WS_TRIM":"c","IMAGE_FILE_BYTES_REVERSED_HI":"c","IMAGE_FILE_BYTES_REVERSED_LO":"c","IMAGE_FILE_DEBUG_STRIPPED":"c","IMAGE_FILE_DLL":"c","IMAGE_FILE_EXECUTABLE_IMAGE":"c","IMAGE_FILE_LARGE_ADDRESS_AWARE":"c","IMAGE_FILE_LINE_NUMS_STRIPPED":"c","IMAGE_FILE_LOCAL_SYMS_STRIPPED":"c","IMAGE_FILE_MACHINE_AM33":"c","IMAGE_FILE_MACHINE_AMD64":"c","IMAGE_FILE_MACHINE_ARM":"c","IMAGE_FILE_MACHINE_ARM64":"c","IMAGE_FILE_MACHINE_ARMNT":"c","IMAGE_FILE_MACHINE_EBC":"c","IMAGE_FILE_MACHINE_I386":"c","IMAGE_FILE_MACHINE_IA64":"c","IMAGE_FILE_MACHINE_LOONGARCH32":"c","IMAGE_FILE_MACHINE_LOONGARCH64":"c","IMAGE_FILE_MACHINE_M32R":"c","IMAGE_FILE_MACHINE_MIPS16":"c","IMAGE_FILE_MACHINE_MIPSFPU":"c","IMAGE_FILE_MACHINE_MIPSFPU16":"c","IMAGE_FILE_MACHINE_POWERPC":"c","IMAGE_FILE_MACHINE_POWERPCFP":"c","IMAGE_FILE_MACHINE_R4000":"c","IMAGE_FILE_MACHINE_RISCV128":"c","IMAGE_FILE_MACHINE_RISCV32":"c","IMAGE_FILE_MACHINE_RISCV64":"c","IMAGE_FILE_MACHINE_SH3":"c","IMAGE_FILE_MACHINE_SH3DSP":"c","IMAGE_FILE_MACHINE_SH4":"c","IMAGE_FILE_MACHINE_SH5":"c","IMAGE_FILE_MACHINE_THUMB":"c","IMAGE_FILE_MACHINE_UNKNOWN":"c","IMAGE_FILE_MACHINE_WCEMIPSV2":"c","IMAGE_FILE_NET_RUN_FROM_SWAP":"c","IMAGE_FILE_RELOCS_STRIPPED":"c","IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP":"c","IMAGE_FILE_SYSTEM":"c","IMAGE_FILE_UP_SYSTEM_ONLY":"c","IMAGE_SCN_CNT_CODE":"c","IMAGE_SCN_CNT_INITIALIZED_DATA":"c","IMAGE_SCN_CNT_UNINITIALIZED_DATA":"c","IMAGE_SCN_LNK_COMDAT":"c","IMAGE_SCN_MEM_DISCARDABLE":"c","IMAGE_SCN_MEM_EXECUTE":"c","IMAGE_SCN_MEM_READ":"c","IMAGE_SCN_MEM_WRITE":"c","IMAGE_SUBSYSTEM_EFI_APPLICATION":"c","IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER":"c","IMAGE_SUBSYSTEM_EFI_ROM":"c","IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER":"c","IMAGE_SUBSYSTEM_NATIVE":"c","IMAGE_SUBSYSTEM_NATIVE_WINDOWS":"c","IMAGE_SUBSYSTEM_OS2_CUI":"c","IMAGE_SUBSYSTEM_POSIX_CUI":"c","IMAGE_SUBSYSTEM_UNKNOWN":"c","IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION":"c","IMAGE_SUBSYSTEM_WINDOWS_CE_GUI":"c","IMAGE_SUBSYSTEM_WINDOWS_CUI":"c","IMAGE_SUBSYSTEM_WINDOWS_GUI":"c","IMAGE_SUBSYSTEM_XBOX":"c","ImportDirectory":"t","NewFile":"f","Open":"f","OptionalHeader32":"t","OptionalHeader64":"t","Reloc":"t","Section":"t","Section.Data":"m","Section.Open":"m","SectionHeader":"t","SectionHeader32":"t","StringTable":"t","StringTable.String":"m","Symbol":"t"}},"debug/plan9obj":{"path":"debug/plan9obj","name":"plan9obj","symbols":{"ErrNoSymbols":"v","File":"t","File.Close":"m","File.Section":"m","File.Symbols":"m","FileHeader":"t","Magic386":"c","Magic64":"c","MagicAMD64":"c","MagicARM":"c","NewFile":"f","Open":"f","Section":"t","Section.Data":"m","Section.Open":"m","SectionHeader":"t","Sym":"t"}},"embed":{"path":"embed","name":"embed","symbols":{"FS":"t","FS.Open":"m","FS.ReadDir":"m","FS.ReadFile":"m"}},"encoding":{"path":"encoding","name":"encoding","symbols":{"BinaryAppender":"t","BinaryMarshaler":"t","BinaryUnmarshaler":"t","TextAppender":"t","TextMarshaler":"t","TextUnmarshaler":"t"}},"encoding/ascii85":{"path":"encoding/ascii85","name":"ascii85","symbols":{"CorruptInputError":"t","CorruptInputError.Error":"m","Decode":"f","Encode":"f","MaxEncodedLen":"f","NewDecoder":"f","NewEncoder":"f"}},"encoding/asn1":{"path":"encoding/asn1","name":"asn1","symbols":{"BitString":"t","BitString.At":"m","BitString.RightAlign":"m","ClassApplication":"c","ClassContextSpecific":"c","ClassPrivate":"c","ClassUniversal":"c","Enumerated":"t","Flag":"t","Marshal":"f","MarshalWithParams":"f","NullBytes":"v","NullRawValue":"v","ObjectIdentifier":"t","ObjectIdentifier.Equal":"m","ObjectIdentifier.String":"m","RawContent":"t","RawValue":"t","StructuralError":"t","StructuralError.Error":"m","SyntaxError":"t","SyntaxError.Error":"m","TagBMPString":"c","TagBitString":"c","TagBoolean":"c","TagEnum":"c","TagGeneralString":"c","TagGeneralizedTime":"c","TagIA5String":"c","TagInteger":"c","TagNull":"c","TagNumericString":"c","TagOID":"c","TagOctetString":"c","TagPrintableString":"c","TagSequence":"c","TagSet":"c","TagT61String":"c","TagUTCTime":"c","TagUTF8String":"c","Unmarshal":"f","UnmarshalWithParams":"f"}},"encoding/base32":{"path":"encoding/base32","name":"base32","symbols":{"CorruptInputError":"t","CorruptInputError.Error":"m","Encoding":"t","Encoding.AppendDecode":"m","Encoding.AppendEncode":"m","Encoding.Decode":"m","Encoding.DecodeString":"m","Encoding.DecodedLen":"m","Encoding.Encode":"m","Encoding.EncodeToString":"m","Encoding.EncodedLen":"m","Encoding.WithPadding":"m","HexEncoding":"v","NewDecoder":"f","NewEncoder":"f","NewEncoding":"f","NoPadding":"c","StdEncoding":"v","StdPadding":"c"}},"encoding/base64":{"path":"encoding/base64","name":"base64","symbols":{"CorruptInputError":"t","CorruptInputError.Error":"m","Encoding":"t","Encoding.AppendDecode":"m","Encoding.AppendEncode":"m","Encoding.Decode":"m","Encoding.DecodeString":"m","Encoding.DecodedLen":"m","Encoding.Encode":"m","Encoding.EncodeToString":"m","Encoding.EncodedLen":"m","Encoding.Strict":"m","Encoding.WithPadding":"m","NewDecoder":"f","NewEncoder":"f","NewEncoding":"f","NoPadding":"c","RawStdEncoding":"v","RawURLEncoding":"v","StdEncoding":"v","StdPadding":"c","URLEncoding":"v"}},"encoding/binary":{"path":"encoding/binary","name":"binary","symbols":{"Append":"f","AppendByteOrder":"t","AppendUvarint":"f","AppendVarint":"f","BigEndian":"v","ByteOrder":"t","Decode":"f","Encode":"f","LittleEndian":"v","MaxVarintLen16":"c","MaxVarintLen32":"c","MaxVarintLen64":"c","NativeEndian":"v","PutUvarint":"f","PutVarint":"f","Read":"f","ReadUvarint":"f","ReadVarint":"f","Size":"f","Uvarint":"f","Varint":"f","Write":"f"}},"encoding/csv":{"path":"encoding/csv","name":"csv","symbols":{"ErrBareQuote":"v","ErrFieldCount":"v","ErrQuote":"v","ErrTrailingComma":"v","NewReader":"f","NewWriter":"f","ParseError":"t","ParseError.Error":"m","ParseError.Unwrap":"m","Reader":"t","Reader.FieldPos":"m","Reader.InputOffset":"m","Reader.Read":"m","Reader.ReadAll":"m","Writer":"t","Writer.Error":"m","Writer.Flush":"m","Writer.Write":"m","Writer.WriteAll":"m"}},"encoding/gob":{"path":"encoding/gob","name":"gob","symbols":{"CommonType":"t","Decoder":"t","Decoder.Decode":"m","Decoder.DecodeValue":"m","Encoder":"t","Encoder.Encode":"m","Encoder.EncodeValue":"m","GobDecoder":"t","GobEncoder":"t","NewDecoder":"f","NewEncoder":"f","Register":"f","RegisterName":"f"}},"encoding/hex":{"path":"encoding/hex","name":"hex","symbols":{"AppendDecode":"f","AppendEncode":"f","Decode":"f","DecodeString":"f","DecodedLen":"f","Dump":"f","Dumper":"f","Encode":"f","EncodeToString":"f","EncodedLen":"f","ErrLength":"v","InvalidByteError":"t","InvalidByteError.Error":"m","NewDecoder":"f","NewEncoder":"f"}},"encoding/json":{"path":"encoding/json","name":"json","symbols":{"Compact":"f","Decoder":"t","Decoder.Buffered":"m","Decoder.Decode":"m","Decoder.DisallowUnknownFields":"m","Decoder.InputOffset":"m","Decoder.More":"m","Decoder.Token":"m","Decoder.UseNumber":"m","Delim":"t","Delim.String":"m","Encoder":"t","Encoder.Encode":"m","Encoder.SetEscapeHTML":"m","Encoder.SetIndent":"m","HTMLEscape":"f","Indent":"f","InvalidUTF8Error":"t","InvalidUTF8Error.Error":"m","InvalidUnmarshalError":"t","InvalidUnmarshalError.Error":"m","Marshal":"f","MarshalIndent":"f","Marshaler":"t","MarshalerError":"t","MarshalerError.Error":"m","MarshalerError.Unwrap":"m","NewDecoder":"f","NewEncoder":"f","Number":"t","Number.Float64":"m","Number.Int64":"m","Number.String":"m","RawMessage":"t","RawMessage.MarshalJSON":"m","RawMessage.UnmarshalJSON":"m","SyntaxError":"t","SyntaxError.Error":"m","Token":"t","Unmarshal":"f","UnmarshalFieldError":"t","UnmarshalFieldError.Error":"m","UnmarshalTypeError":"t","UnmarshalTypeError.Error":"m","Unmarshaler":"t","UnsupportedTypeError":"t","UnsupportedTypeError.Error":"m","UnsupportedValueError":"t","UnsupportedValueError.Error":"m","Valid":"f"}},"encoding/pem":{"path":"encoding/pem","name":"pem","symbols":{"Block":"t","Decode":"f","Encode":"f","EncodeToMemory":"f"}},"encoding/xml":{"path":"encoding/xml","name":"xml","symbols":{"Attr":"t","CharData":"t","CharData.Copy":"m","Comment":"t","Comment.Copy":"m","CopyToken":"f","Decoder":"t","Decoder.Decode":"m","Decoder.DecodeElement":"m","Decoder.InputOffset":"m","Decoder.InputPos":"m","Decoder.RawToken":"m","Decoder.Skip":"m","Decoder.Token":"m","Directive":"t","Directive.Copy":"m","Encoder":"t","Encoder.Close":"m","Encoder.Encode":"m","Encoder.EncodeElement":"m","Encoder.EncodeToken":"m","Encoder.Flush":"m","Encoder.Indent":"m","EndElement":"t","Escape":"f","EscapeText":"f","HTMLAutoClose":"v","HTMLEntity":"v","Header":"c","Marshal":"f","MarshalIndent":"f","Marshaler":"t","MarshalerAttr":"t","Name":"t","NewDecoder":"f","NewEncoder":"f","NewTokenDecoder":"f","ProcInst":"t","ProcInst.Copy":"m","StartElement":"t","StartElement.Copy":"m","StartElement.End":"m","SyntaxError":"t","SyntaxError.Error":"m","TagPathError":"t","TagPathError.Error":"m","Token":"t","TokenReader":"t","Unmarshal":"f","UnmarshalError":"t","UnmarshalError.Error":"m","Unmarshaler":"t","UnmarshalerAttr":"t","UnsupportedTypeError":"t","UnsupportedTypeError.Error":"m"}},"errors":{"path":"errors","name":"errors","symbols":{"As":"f","ErrUnsupported":"v","Is":"f","Join":"f","New":"f","Unwrap":"f"}},"expvar":{"path":"expvar","name":"expvar","symbols":{"Do":"f","Float":"t","Float.Add":"m","Float.Set":"m","Float.String":"m","Float.Value":"m","Func":"t","Func.String":"m","Func.Value":"m","Get":"f","Handler":"f","Int":"t","Int.Add":"m","Int.Set":"m","Int.String":"m","Int.Value":"m","KeyValue":"t","Map":"t","Map.Add":"m","Map.AddFloat":"m","Map.Delete":"m","Map.Do":"m","Map.Get":"m","Map.Init":"m","Map.Set":"m","Map.String":"m","NewFloat":"f","NewInt":"f","NewMap":"f","NewString":"f","Publish":"f","String":"t","String.Set":"m","String.String":"m","String.Value":"m","Var":"t"}},"flag":{"path":"flag","name":"flag","symbols":{"Arg":"f","Args":"f","Bool":"f","BoolFunc":"f","BoolVar":"f","CommandLine":"v","ContinueOnError":"c","Duration":"f","DurationVar":"f","ErrHelp":"v","ErrorHandling":"t","ExitOnError":"c","Flag":"t","FlagSet":"t","FlagSet.Arg":"m","FlagSet.Args":"m","FlagSet.Bool":"m","FlagSet.BoolFunc":"m","FlagSet.BoolVar":"m","FlagSet.Duration":"m","FlagSet.DurationVar":"m","FlagSet.ErrorHandling":"m","FlagSet.Float64":"m","FlagSet.Float64Var":"m","FlagSet.Func":"m","FlagSet.Init":"m","FlagSet.Int":"m","FlagSet.Int64":"m","FlagSet.Int64Var":"m","FlagSet.IntVar":"m","FlagSet.Lookup":"m","FlagSet.NArg":"m","FlagSet.NFlag":"m","FlagSet.Name":"m","FlagSet.Output":"m","FlagSet.Parse":"m","FlagSet.Parsed":"m","FlagSet.PrintDefaults":"m","FlagSet.Set":"m","FlagSet.SetOutput":"m","FlagSet.String":"m","FlagSet.StringVar":"m","FlagSet.TextVar":"m","FlagSet.Uint":"m","FlagSet.Uint64":"m","FlagSet.Uint64Var":"m","FlagSet.UintVar":"m","FlagSet.Var":"m","FlagSet.Visit":"m","FlagSet.VisitAll":"m","Float64":"f","Float64Var":"f","Func":"f","Getter":"t","Int":"f","Int64":"f","Int64Var":"f","IntVar":"f","Lookup":"f","NArg":"f","NFlag":"f","NewFlagSet":"f","PanicOnError":"c","Parse":"f","Parsed":"f","PrintDefaults":"f","Set":"f","String":"f","StringVar":"f","TextVar":"f","Uint":"f","Uint64":"f","Uint64Var":"f","UintVar":"f","UnquoteUsage":"f","Usage":"v","Value":"t","Var":"f","Visit":"f","VisitAll":"f"}},"fmt":{"path":"fmt","name":"fmt","symbols":{"Append":"f","Appendf":"f","Appendln":"f","Errorf":"f","FormatString":"f","Formatter":"t","Fprint":"f","Fprintf":"f","Fprintln":"f","Fscan":"f","Fscanf":"f","Fscanln":"f","GoStringer":"t","Print":"f","Printf":"f","Println":"f","Scan":"f","ScanState":"t","Scanf":"f","Scanln":"f","Scanner":"t","Sprint":"f","Sprintf":"f","Sprintln":"f","Sscan":"f","Sscanf":"f","Sscanln":"f","State":"t","Stringer":"t"}},"go/ast":{"path":"go/ast","name":"ast","symbols":{"ArrayType":"t","ArrayType.End":"m","ArrayType.Pos":"m","AssignStmt":"t","AssignStmt.End":"m","AssignStmt.Pos":"m","Bad":"c","BadDecl":"t","BadDecl.End":"m","BadDecl.Pos":"m","BadExpr":"t","BadExpr.End":"m","BadExpr.Pos":"m","BadStmt":"t","BadStmt.End":"m","BadStmt.Pos":"m","BasicLit":"t","BasicLit.End":"m","BasicLit.Pos":"m","BinaryExpr":"t","BinaryExpr.End":"m","BinaryExpr.Pos":"m","BlockStmt":"t","BlockStmt.End":"m","BlockStmt.Pos":"m","BranchStmt":"t","BranchStmt.End":"m","BranchStmt.Pos":"m","CallExpr":"t","CallExpr.End":"m","CallExpr.Pos":"m","CaseClause":"t","CaseClause.End":"m","CaseClause.Pos":"m","ChanDir":"t","ChanType":"t","ChanType.End":"m","ChanType.Pos":"m","CommClause":"t","CommClause.End":"m","CommClause.Pos":"m","Comment":"t","Comment.End":"m","Comment.Pos":"m","CommentGroup":"t","CommentGroup.End":"m","CommentGroup.Pos":"m","CommentGroup.Text":"m","CommentMap":"t","CommentMap.Comments":"m","CommentMap.Filter":"m","CommentMap.String":"m","CommentMap.Update":"m","CompositeLit":"t","CompositeLit.End":"m","CompositeLit.Pos":"m","Con":"c","Decl":"t","DeclStmt":"t","DeclStmt.End":"m","DeclStmt.Pos":"m","DeferStmt":"t","DeferStmt.End":"m","DeferStmt.Pos":"m","Ellipsis":"t","Ellipsis.End":"m","Ellipsis.Pos":"m","EmptyStmt":"t","EmptyStmt.End":"m","EmptyStmt.Pos":"m","Expr":"t","ExprStmt":"t","ExprStmt.End":"m","ExprStmt.Pos":"m","Field":"t","Field.End":"m","Field.Pos":"m","FieldFilter":"t","FieldList":"t","FieldList.End":"m","FieldList.NumFields":"m","FieldList.Pos":"m","File":"t","File.End":"m","File.Pos":"m","FileExports":"f","Filter":"t","FilterDecl":"f","FilterFile":"f","FilterFuncDuplicates":"c","FilterImportDuplicates":"c","FilterPackage":"f","FilterUnassociatedComments":"c","ForStmt":"t","ForStmt.End":"m","ForStmt.Pos":"m","Fprint":"f","Fun":"c","FuncDecl":"t","FuncDecl.End":"m","FuncDecl.Pos":"m","FuncLit":"t","FuncLit.End":"m","FuncLit.Pos":"m","FuncType":"t","FuncType.End":"m","FuncType.Pos":"m","GenDecl":"t","GenDecl.End":"m","GenDecl.Pos":"m","GoStmt":"t","GoStmt.End":"m","GoStmt.Pos":"m","Ident":"t","Ident.End":"m","Ident.IsExported":"m","Ident.Pos":"m","Ident.String":"m","IfStmt":"t","IfStmt.End":"m","IfStmt.Pos":"m","ImportSpec":"t","ImportSpec.End":"m","ImportSpec.Pos":"m","Importer":"t","IncDecStmt":"t","IncDecStmt.End":"m","IncDecStmt.Pos":"m","IndexExpr":"t","IndexExpr.End":"m","IndexExpr.Pos":"m","IndexListExpr":"t","IndexListExpr.End":"m","IndexListExpr.Pos":"m","Inspect":"f","InterfaceType":"t","InterfaceType.End":"m","InterfaceType.Pos":"m","IsExported":"f","IsGenerated":"f","KeyValueExpr":"t","KeyValueExpr.End":"m","KeyValueExpr.Pos":"m","LabeledStmt":"t","LabeledStmt.End":"m","LabeledStmt.Pos":"m","Lbl":"c","MapType":"t","MapType.End":"m","MapType.Pos":"m","MergeMode":"t","MergePackageFiles":"f","NewCommentMap":"f","NewIdent":"f","NewObj":"f","NewPackage":"f","NewScope":"f","Node":"t","NotNilFilter":"f","ObjKind":"t","ObjKind.String":"m","Object":"t","Object.Pos":"m","Package":"t","Package.End":"m","Package.Pos":"m","PackageExports":"f","ParenExpr":"t","ParenExpr.End":"m","ParenExpr.Pos":"m","Pkg":"c","Preorder":"f","PreorderStack":"f","Print":"f","RECV":"c","RangeStmt":"t","RangeStmt.End":"m","RangeStmt.Pos":"m","ReturnStmt":"t","ReturnStmt.End":"m","ReturnStmt.Pos":"m","SEND":"c","Scope":"t","Scope.Insert":"m","Scope.Lookup":"m","Scope.String":"m","SelectStmt":"t","SelectStmt.End":"m","SelectStmt.Pos":"m","SelectorExpr":"t","SelectorExpr.End":"m","SelectorExpr.Pos":"m","SendStmt":"t","SendStmt.End":"m","SendStmt.Pos":"m","SliceExpr":"t","SliceExpr.End":"m","SliceExpr.Pos":"m","SortImports":"f","Spec":"t","StarExpr":"t","StarExpr.End":"m","StarExpr.Pos":"m","Stmt":"t","StructType":"t","StructType.End":"m","StructType.Pos":"m","SwitchStmt":"t","SwitchStmt.End":"m","SwitchStmt.Pos":"m","Typ":"c","TypeAssertExpr":"t","TypeAssertExpr.End":"m","TypeAssertExpr.Pos":"m","TypeSpec":"t","TypeSpec.End":"m","TypeSpec.Pos":"m","TypeSwitchStmt":"t","TypeSwitchStmt.End":"m","TypeSwitchStmt.Pos":"m","UnaryExpr":"t","UnaryExpr.End":"m","UnaryExpr.Pos":"m","Unparen":"f","ValueSpec":"t","ValueSpec.End":"m","ValueSpec.Pos":"m","Var":"c","Visitor":"t","Walk":"f"}},"go/build":{"path":"go/build","name":"build","symbols":{"AllowBinary":"c","ArchChar":"f","Context":"t","Context.Import":"m","Context.ImportDir":"m","Context.MatchFile":"m","Context.SrcDirs":"m","Default":"v","Directive":"t","FindOnly":"c","IgnoreVendor":"c","Import":"f","ImportComment":"c","ImportDir":"f","ImportMode":"t","IsLocalImport":"f","MultiplePackageError":"t","MultiplePackageError.Error":"m","NoGoError":"t","NoGoError.Error":"m","Package":"t","Package.IsCommand":"m","ToolDir":"v"}},"go/build/constraint":{"path":"go/build/constraint","name":"constraint","symbols":{"AndExpr":"t","AndExpr.Eval":"m","AndExpr.String":"m","Expr":"t","GoVersion":"f","IsGoBuild":"f","IsPlusBuild":"f","NotExpr":"t","NotExpr.Eval":"m","NotExpr.String":"m","OrExpr":"t","OrExpr.Eval":"m","OrExpr.String":"m","Parse":"f","PlusBuildLines":"f","SyntaxError":"t","SyntaxError.Error":"m","TagExpr":"t","TagExpr.Eval":"m","TagExpr.String":"m"}},"go/constant":{"path":"go/constant","name":"constant","symbols":{"BinaryOp":"f","BitLen":"f","Bool":"c","BoolVal":"f","Bytes":"f","Compare":"f","Complex":"c","Denom":"f","Float":"c","Float32Val":"f","Float64Val":"f","Imag":"f","Int":"c","Int64Val":"f","Kind":"t","Kind.String":"m","Make":"f","MakeBool":"f","MakeFloat64":"f","MakeFromBytes":"f","MakeFromLiteral":"f","MakeImag":"f","MakeInt64":"f","MakeString":"f","MakeUint64":"f","MakeUnknown":"f","Num":"f","Real":"f","Shift":"f","Sign":"f","String":"c","StringVal":"f","ToComplex":"f","ToFloat":"f","ToInt":"f","Uint64Val":"f","UnaryOp":"f","Unknown":"c","Val":"f","Value":"t"}},"go/doc":{"path":"go/doc","name":"doc","symbols":{"AllDecls":"c","AllMethods":"c","Example":"t","Examples":"f","Filter":"t","Func":"t","IllegalPrefixes":"v","IsPredeclared":"f","Mode":"t","New":"f","NewFromFiles":"f","Note":"t","Package":"t","Package.Filter":"m","Package.HTML":"m","Package.Markdown":"m","Package.Parser":"m","Package.Printer":"m","Package.Synopsis":"m","Package.Text":"m","PreserveAST":"c","Synopsis":"f","ToHTML":"f","ToText":"f","Type":"t","Value":"t"}},"go/doc/comment":{"path":"go/doc/comment","name":"comment","symbols":{"Block":"t","Code":"t","DefaultLookupPackage":"f","Doc":"t","DocLink":"t","DocLink.DefaultURL":"m","Heading":"t","Heading.DefaultID":"m","Italic":"t","Link":"t","LinkDef":"t","List":"t","List.BlankBefore":"m","List.BlankBetween":"m","ListItem":"t","Paragraph":"t","Parser":"t","Parser.Parse":"m","Plain":"t","Printer":"t","Printer.Comment":"m","Printer.HTML":"m","Printer.Markdown":"m","Printer.Text":"m","Text":"t"}},"go/format":{"path":"go/format","name":"format","symbols":{"Node":"f","Source":"f"}},"go/importer":{"path":"go/importer","name":"importer","symbols":{"Default":"f","For":"f","ForCompiler":"f","Lookup":"t"}},"go/parser":{"path":"go/parser","name":"parser","symbols":{"AllErrors":"c","DeclarationErrors":"c","ImportsOnly":"c","Mode":"t","PackageClauseOnly":"c","ParseComments":"c","ParseDir":"f","ParseExpr":"f","ParseExprFrom":"f","ParseFile":"f","SkipObjectResolution":"c","SpuriousErrors":"c","Trace":"c"}},"go/printer":{"path":"go/printer","name":"printer","symbols":{"CommentedNode":"t","Config":"t","Config.Fprint":"m","Fprint":"f","Mode":"t","RawFormat":"c","SourcePos":"c","TabIndent":"c","UseSpaces":"c"}},"go/scanner":{"path":"go/scanner","name":"scanner","symbols":{"Error":"t","Error.Error":"m","ErrorHandler":"t","ErrorList":"t","ErrorList.Add":"m","ErrorList.Err":"m","ErrorList.Error":"m","ErrorList.Len":"m","ErrorList.Less":"m","ErrorList.RemoveMultiples":"m","ErrorList.Reset":"m","ErrorList.Sort":"m","ErrorList.Swap":"m","Mode":"t","PrintError":"f","ScanComments":"c","Scanner":"t","Scanner.Init":"m","Scanner.Scan":"m"}},"go/token":{"path":"go/token","name":"token","symbols":{"ADD":"c","ADD_ASSIGN":"c","AND":"c","AND_ASSIGN":"c","AND_NOT":"c","AND_NOT_ASSIGN":"c","ARROW":"c","ASSIGN":"c","BREAK":"c","CASE":"c","CHAN":"c","CHAR":"c","COLON":"c","COMMA":"c","COMMENT":"c","CONST":"c","CONTINUE":"c","DEC":"c","DEFAULT":"c","DEFER":"c","DEFINE":"c","ELLIPSIS":"c","ELSE":"c","EOF":"c","EQL":"c","FALLTHROUGH":"c","FLOAT":"c","FOR":"c","FUNC":"c","File":"t","File.AddLine":"m","File.AddLineColumnInfo":"m","File.AddLineInfo":"m","File.Base":"m","File.Line":"m","File.LineCount":"m","File.LineStart":"m","File.Lines":"m","File.MergeLine":"m","File.Name":"m","File.Offset":"m","File.Pos":"m","File.Position":"m","File.PositionFor":"m","File.SetLines":"m","File.SetLinesForContent":"m","File.Size":"m","FileSet":"t","FileSet.AddExistingFiles":"m","FileSet.AddFile":"m","FileSet.Base":"m","FileSet.File":"m","FileSet.Iterate":"m","FileSet.Position":"m","FileSet.PositionFor":"m","FileSet.Read":"m","FileSet.RemoveFile":"m","FileSet.Write":"m","GEQ":"c","GO":"c","GOTO":"c","GTR":"c","HighestPrec":"c","IDENT":"c","IF":"c","ILLEGAL":"c","IMAG":"c","IMPORT":"c","INC":"c","INT":"c","INTERFACE":"c","IsExported":"f","IsIdentifier":"f","IsKeyword":"f","LAND":"c","LBRACE":"c","LBRACK":"c","LEQ":"c","LOR":"c","LPAREN":"c","LSS":"c","Lookup":"f","LowestPrec":"c","MAP":"c","MUL":"c","MUL_ASSIGN":"c","NEQ":"c","NOT":"c","NewFileSet":"f","NoPos":"c","OR":"c","OR_ASSIGN":"c","PACKAGE":"c","PERIOD":"c","Pos":"t","Pos.IsValid":"m","Position":"t","Position.IsValid":"m","Position.String":"m","QUO":"c","QUO_ASSIGN":"c","RANGE":"c","RBRACE":"c","RBRACK":"c","REM":"c","REM_ASSIGN":"c","RETURN":"c","RPAREN":"c","SELECT":"c","SEMICOLON":"c","SHL":"c","SHL_ASSIGN":"c","SHR":"c","SHR_ASSIGN":"c","STRING":"c","STRUCT":"c","SUB":"c","SUB_ASSIGN":"c","SWITCH":"c","TILDE":"c","TYPE":"c","Token":"t","Token.IsKeyword":"m","Token.IsLiteral":"m","Token.IsOperator":"m","Token.Precedence":"m","Token.String":"m","UnaryPrec":"c","VAR":"c","XOR":"c","XOR_ASSIGN":"c"}},"go/types":{"path":"go/types","name":"types","symbols":{"Alias":"t","Alias.Obj":"m","Alias.Origin":"m","Alias.Rhs":"m","Alias.SetTypeParams":"m","Alias.String":"m","Alias.TypeArgs":"m","Alias.TypeParams":"m","Alias.Underlying":"m","ArgumentError":"t","ArgumentError.Error":"m","ArgumentError.Unwrap":"m","Array":"t","Array.Elem":"m","Array.Len":"m","Array.String":"m","Array.Underlying":"m","AssertableTo":"f","AssignableTo":"f","Basic":"t","Basic.Info":"m","Basic.Kind":"m","Basic.Name":"m","Basic.String":"m","Basic.Underlying":"m","BasicInfo":"t","BasicKind":"t","Bool":"c","Builtin":"t","Builtin.String":"m","Byte":"c","Chan":"t","Chan.Dir":"m","Chan.Elem":"m","Chan.String":"m","Chan.Underlying":"m","ChanDir":"t","CheckExpr":"f","Checker":"t","Checker.Files":"m","Comparable":"f","Complex128":"c","Complex64":"c","Config":"t","Config.Check":"m","Const":"t","Const.String":"m","Const.Val":"m","Context":"t","ConvertibleTo":"f","DefPredeclaredTestFuncs":"f","Default":"f","Error":"t","Error.Error":"m","Eval":"f","ExprString":"f","FieldVal":"c","FieldVar":"c","Float32":"c","Float64":"c","Func":"t","Func.FullName":"m","Func.Origin":"m","Func.Pkg":"m","Func.Scope":"m","Func.Signature":"m","Func.String":"m","Id":"f","Identical":"f","IdenticalIgnoreTags":"f","Implements":"f","ImportMode":"t","Importer":"t","ImporterFrom":"t","Info":"t","Info.ObjectOf":"m","Info.PkgNameOf":"m","Info.TypeOf":"m","Initializer":"t","Initializer.String":"m","Instance":"t","Instantiate":"f","Int":"c","Int16":"c","Int32":"c","Int64":"c","Int8":"c","Interface":"t","Interface.Complete":"m","Interface.Embedded":"m","Interface.EmbeddedType":"m","Interface.EmbeddedTypes":"m","Interface.Empty":"m","Interface.ExplicitMethod":"m","Interface.ExplicitMethods":"m","Interface.IsComparable":"m","Interface.IsImplicit":"m","Interface.IsMethodSet":"m","Interface.MarkImplicit":"m","Interface.Method":"m","Interface.Methods":"m","Interface.NumEmbeddeds":"m","Interface.NumExplicitMethods":"m","Interface.NumMethods":"m","Interface.String":"m","Interface.Underlying":"m","Invalid":"c","IsBoolean":"c","IsComplex":"c","IsConstType":"c","IsFloat":"c","IsInteger":"c","IsInterface":"f","IsNumeric":"c","IsOrdered":"c","IsString":"c","IsUnsigned":"c","IsUntyped":"c","Label":"t","Label.String":"m","LocalVar":"c","LookupFieldOrMethod":"f","LookupSelection":"f","Map":"t","Map.Elem":"m","Map.Key":"m","Map.String":"m","Map.Underlying":"m","MethodExpr":"c","MethodSet":"t","MethodSet.At":"m","MethodSet.Len":"m","MethodSet.Lookup":"m","MethodSet.Methods":"m","MethodSet.String":"m","MethodVal":"c","MissingMethod":"f","Named":"t","Named.AddMethod":"m","Named.Method":"m","Named.Methods":"m","Named.NumMethods":"m","Named.Obj":"m","Named.Origin":"m","Named.SetTypeParams":"m","Named.SetUnderlying":"m","Named.String":"m","Named.TypeArgs":"m","Named.TypeParams":"m","Named.Underlying":"m","NewAlias":"f","NewArray":"f","NewChan":"f","NewChecker":"f","NewConst":"f","NewContext":"f","NewField":"f","NewFunc":"f","NewInterface":"f","NewInterfaceType":"f","NewLabel":"f","NewMap":"f","NewMethodSet":"f","NewNamed":"f","NewPackage":"f","NewParam":"f","NewPkgName":"f","NewPointer":"f","NewScope":"f","NewSignature":"f","NewSignatureType":"f","NewSlice":"f","NewStruct":"f","NewTerm":"f","NewTuple":"f","NewTypeName":"f","NewTypeParam":"f","NewUnion":"f","NewVar":"f","Nil":"t","Nil.String":"m","Object":"t","ObjectString":"f","Package":"t","Package.Complete":"m","Package.GoVersion":"m","Package.Imports":"m","Package.MarkComplete":"m","Package.Name":"m","Package.Path":"m","Package.Scope":"m","Package.SetImports":"m","Package.SetName":"m","Package.String":"m","PackageVar":"c","ParamVar":"c","PkgName":"t","PkgName.Imported":"m","PkgName.String":"m","Pointer":"t","Pointer.Elem":"m","Pointer.String":"m","Pointer.Underlying":"m","Qualifier":"t","RecvOnly":"c","RecvVar":"c","RelativeTo":"f","ResultVar":"c","Rune":"c","Satisfies":"f","Scope":"t","Scope.Child":"m","Scope.Children":"m","Scope.Contains":"m","Scope.End":"m","Scope.Innermost":"m","Scope.Insert":"m","Scope.Len":"m","Scope.Lookup":"m","Scope.LookupParent":"m","Scope.Names":"m","Scope.NumChildren":"m","Scope.Parent":"m","Scope.Pos":"m","Scope.String":"m","Scope.WriteTo":"m","Selection":"t","Selection.Index":"m","Selection.Indirect":"m","Selection.Kind":"m","Selection.Obj":"m","Selection.Recv":"m","Selection.String":"m","Selection.Type":"m","SelectionKind":"t","SelectionString":"f","SendOnly":"c","SendRecv":"c","Signature":"t","Signature.Params":"m","Signature.Recv":"m","Signature.RecvTypeParams":"m","Signature.Results":"m","Signature.String":"m","Signature.TypeParams":"m","Signature.Underlying":"m","Signature.Variadic":"m","Sizes":"t","SizesFor":"f","Slice":"t","Slice.Elem":"m","Slice.String":"m","Slice.Underlying":"m","StdSizes":"t","StdSizes.Alignof":"m","StdSizes.Offsetsof":"m","StdSizes.Sizeof":"m","String":"c","Struct":"t","Struct.Field":"m","Struct.Fields":"m","Struct.NumFields":"m","Struct.String":"m","Struct.Tag":"m","Struct.Underlying":"m","Term":"t","Term.String":"m","Term.Tilde":"m","Term.Type":"m","Tuple":"t","Tuple.At":"m","Tuple.Len":"m","Tuple.String":"m","Tuple.Underlying":"m","Tuple.Variables":"m","Typ":"v","Type":"t","TypeAndValue":"t","TypeAndValue.Addressable":"m","TypeAndValue.Assignable":"m","TypeAndValue.HasOk":"m","TypeAndValue.IsBuiltin":"m","TypeAndValue.IsNil":"m","TypeAndValue.IsType":"m","TypeAndValue.IsValue":"m","TypeAndValue.IsVoid":"m","TypeList":"t","TypeList.At":"m","TypeList.Len":"m","TypeList.Types":"m","TypeName":"t","TypeName.IsAlias":"m","TypeName.String":"m","TypeParam":"t","TypeParam.Constraint":"m","TypeParam.Index":"m","TypeParam.Obj":"m","TypeParam.SetConstraint":"m","TypeParam.String":"m","TypeParam.Underlying":"m","TypeParamList":"t","TypeParamList.At":"m","TypeParamList.Len":"m","TypeParamList.TypeParams":"m","TypeString":"f","Uint":"c","Uint16":"c","Uint32":"c","Uint64":"c","Uint8":"c","Uintptr":"c","Unalias":"f","Union":"t","Union.Len":"m","Union.String":"m","Union.Term":"m","Union.Terms":"m","Union.Underlying":"m","Universe":"v","Unsafe":"v","UnsafePointer":"c","UntypedBool":"c","UntypedComplex":"c","UntypedFloat":"c","UntypedInt":"c","UntypedNil":"c","UntypedRune":"c","UntypedString":"c","Var":"t","Var.Anonymous":"m","Var.Embedded":"m","Var.IsField":"m","Var.Kind":"m","Var.Origin":"m","Var.SetKind":"m","Var.String":"m","VarKind":"t","VarKind.String":"m","WriteExpr":"f","WriteSignature":"f","WriteType":"f"}},"go/version":{"path":"go/version","name":"version","symbols":{"Compare":"f","IsValid":"f","Lang":"f"}},"hash":{"path":"hash","name":"hash","symbols":{"Cloner":"t","Hash":"t","Hash32":"t","Hash64":"t","XOF":"t"}},"hash/adler32":{"path":"hash/adler32","name":"adler32","symbols":{"Checksum":"f","New":"f","Size":"c"}},"hash/crc32":{"path":"hash/crc32","name":"crc32","symbols":{"Castagnoli":"c","Checksum":"f","ChecksumIEEE":"f","IEEE":"c","IEEETable":"v","Koopman":"c","MakeTable":"f","New":"f","NewIEEE":"f","Size":"c","Table":"t","Update":"f"}},"hash/crc64":{"path":"hash/crc64","name":"crc64","symbols":{"Checksum":"f","ECMA":"c","ISO":"c","MakeTable":"f","New":"f","Size":"c","Table":"t","Update":"f"}},"hash/fnv":{"path":"hash/fnv","name":"fnv","symbols":{"New128":"f","New128a":"f","New32":"f","New32a":"f","New64":"f","New64a":"f"}},"hash/maphash":{"path":"hash/maphash","name":"maphash","symbols":{"Bytes":"f","Comparable":"f","Hash":"t","Hash.BlockSize":"m","Hash.Clone":"m","Hash.Reset":"m","Hash.Seed":"m","Hash.SetSeed":"m","Hash.Size":"m","Hash.Sum":"m","Hash.Sum64":"m","Hash.Write":"m","Hash.WriteByte":"m","Hash.WriteString":"m","MakeSeed":"f","Seed":"t","String":"f","WriteComparable":"f"}},"html":{"path":"html","name":"html","symbols":{"EscapeString":"f","UnescapeString":"f"}},"html/template":{"path":"html/template","name":"template","symbols":{"CSS":"t","ErrAmbigContext":"c","ErrBadHTML":"c","ErrBranchEnd":"c","ErrEndContext":"c","ErrJSTemplate":"c","ErrNoSuchTemplate":"c","ErrOutputContext":"c","ErrPartialCharset":"c","ErrPartialEscape":"c","ErrPredefinedEscaper":"c","ErrRangeLoopReentry":"c","ErrSlashAmbig":"c","Error":"t","Error.Error":"m","ErrorCode":"t","FuncMap":"t","HTML":"t","HTMLAttr":"t","HTMLEscape":"f","HTMLEscapeString":"f","HTMLEscaper":"f","IsTrue":"f","JS":"t","JSEscape":"f","JSEscapeString":"f","JSEscaper":"f","JSStr":"t","Must":"f","New":"f","OK":"c","ParseFS":"f","ParseFiles":"f","ParseGlob":"f","Srcset":"t","Template":"t","Template.AddParseTree":"m","Template.Clone":"m","Template.DefinedTemplates":"m","Template.Delims":"m","Template.Execute":"m","Template.ExecuteTemplate":"m","Template.Funcs":"m","Template.Lookup":"m","Template.Name":"m","Template.New":"m","Template.Option":"m","Template.Parse":"m","Template.ParseFS":"m","Template.ParseFiles":"m","Template.ParseGlob":"m","Template.Templates":"m","URL":"t","URLQueryEscaper":"f"}},"image":{"path":"image","name":"image","symbols":{"Alpha":"t","Alpha.AlphaAt":"m","Alpha.At":"m","Alpha.Bounds":"m","Alpha.ColorModel":"m","Alpha.Opaque":"m","Alpha.PixOffset":"m","Alpha.RGBA64At":"m","Alpha.Set":"m","Alpha.SetAlpha":"m","Alpha.SetRGBA64":"m","Alpha.SubImage":"m","Alpha16":"t","Alpha16.Alpha16At":"m","Alpha16.At":"m","Alpha16.Bounds":"m","Alpha16.ColorModel":"m","Alpha16.Opaque":"m","Alpha16.PixOffset":"m","Alpha16.RGBA64At":"m","Alpha16.Set":"m","Alpha16.SetAlpha16":"m","Alpha16.SetRGBA64":"m","Alpha16.SubImage":"m","Black":"v","CMYK":"t","CMYK.At":"m","CMYK.Bounds":"m","CMYK.CMYKAt":"m","CMYK.ColorModel":"m","CMYK.Opaque":"m","CMYK.PixOffset":"m","CMYK.RGBA64At":"m","CMYK.Set":"m","CMYK.SetCMYK":"m","CMYK.SetRGBA64":"m","CMYK.SubImage":"m","Config":"t","Decode":"f","DecodeConfig":"f","ErrFormat":"v","Gray":"t","Gray.At":"m","Gray.Bounds":"m","Gray.ColorModel":"m","Gray.GrayAt":"m","Gray.Opaque":"m","Gray.PixOffset":"m","Gray.RGBA64At":"m","Gray.Set":"m","Gray.SetGray":"m","Gray.SetRGBA64":"m","Gray.SubImage":"m","Gray16":"t","Gray16.At":"m","Gray16.Bounds":"m","Gray16.ColorModel":"m","Gray16.Gray16At":"m","Gray16.Opaque":"m","Gray16.PixOffset":"m","Gray16.RGBA64At":"m","Gray16.Set":"m","Gray16.SetGray16":"m","Gray16.SetRGBA64":"m","Gray16.SubImage":"m","Image":"t","NRGBA":"t","NRGBA.At":"m","NRGBA.Bounds":"m","NRGBA.ColorModel":"m","NRGBA.NRGBAAt":"m","NRGBA.Opaque":"m","NRGBA.PixOffset":"m","NRGBA.RGBA64At":"m","NRGBA.Set":"m","NRGBA.SetNRGBA":"m","NRGBA.SetRGBA64":"m","NRGBA.SubImage":"m","NRGBA64":"t","NRGBA64.At":"m","NRGBA64.Bounds":"m","NRGBA64.ColorModel":"m","NRGBA64.NRGBA64At":"m","NRGBA64.Opaque":"m","NRGBA64.PixOffset":"m","NRGBA64.RGBA64At":"m","NRGBA64.Set":"m","NRGBA64.SetNRGBA64":"m","NRGBA64.SetRGBA64":"m","NRGBA64.SubImage":"m","NYCbCrA":"t","NYCbCrA.AOffset":"m","NYCbCrA.At":"m","NYCbCrA.ColorModel":"m","NYCbCrA.NYCbCrAAt":"m","NYCbCrA.Opaque":"m","NYCbCrA.RGBA64At":"m","NYCbCrA.SubImage":"m","NewAlpha":"f","NewAlpha16":"f","NewCMYK":"f","NewGray":"f","NewGray16":"f","NewNRGBA":"f","NewNRGBA64":"f","NewNYCbCrA":"f","NewPaletted":"f","NewRGBA":"f","NewRGBA64":"f","NewUniform":"f","NewYCbCr":"f","Opaque":"v","Paletted":"t","Paletted.At":"m","Paletted.Bounds":"m","Paletted.ColorIndexAt":"m","Paletted.ColorModel":"m","Paletted.Opaque":"m","Paletted.PixOffset":"m","Paletted.RGBA64At":"m","Paletted.Set":"m","Paletted.SetColorIndex":"m","Paletted.SetRGBA64":"m","Paletted.SubImage":"m","PalettedImage":"t","Point":"t","Point.Add":"m","Point.Div":"m","Point.Eq":"m","Point.In":"m","Point.Mod":"m","Point.Mul":"m","Point.String":"m","Point.Sub":"m","Pt":"f","RGBA":"t","RGBA.At":"m","RGBA.Bounds":"m","RGBA.ColorModel":"m","RGBA.Opaque":"m","RGBA.PixOffset":"m","RGBA.RGBA64At":"m","RGBA.RGBAAt":"m","RGBA.Set":"m","RGBA.SetRGBA":"m","RGBA.SetRGBA64":"m","RGBA.SubImage":"m","RGBA64":"t","RGBA64.At":"m","RGBA64.Bounds":"m","RGBA64.ColorModel":"m","RGBA64.Opaque":"m","RGBA64.PixOffset":"m","RGBA64.RGBA64At":"m","RGBA64.Set":"m","RGBA64.SetRGBA64":"m","RGBA64.SubImage":"m","RGBA64Image":"t","Rect":"f","Rectangle":"t","Rectangle.Add":"m","Rectangle.At":"m","Rectangle.Bounds":"m","Rectangle.Canon":"m","Rectangle.ColorModel":"m","Rectangle.Dx":"m","Rectangle.Dy":"m","Rectangle.Empty":"m","Rectangle.Eq":"m","Rectangle.In":"m","Rectangle.Inset":"m","Rectangle.Intersect":"m","Rectangle.Overlaps":"m","Rectangle.RGBA64At":"m","Rectangle.Size":"m","Rectangle.String":"m","Rectangle.Sub":"m","Rectangle.Union":"m","RegisterFormat":"f","Transparent":"v","Uniform":"t","Uniform.At":"m","Uniform.Bounds":"m","Uniform.ColorModel":"m","Uniform.Convert":"m","Uniform.Opaque":"m","Uniform.RGBA":"m","Uniform.RGBA64At":"m","White":"v","YCbCr":"t","YCbCr.At":"m","YCbCr.Bounds":"m","YCbCr.COffset":"m","YCbCr.ColorModel":"m","YCbCr.Opaque":"m","YCbCr.RGBA64At":"m","YCbCr.SubImage":"m","YCbCr.YCbCrAt":"m","YCbCr.YOffset":"m","YCbCrSubsampleRatio":"t","YCbCrSubsampleRatio.String":"m","YCbCrSubsampleRatio410":"c","YCbCrSubsampleRatio411":"c","YCbCrSubsampleRatio420":"c","YCbCrSubsampleRatio422":"c","YCbCrSubsampleRatio440":"c","YCbCrSubsampleRatio444":"c","ZP":"v","ZR":"v"}},"image/color":{"path":"image/color","name":"color","symbols":{"Alpha":"t","Alpha.RGBA":"m","Alpha16":"t","Alpha16.RGBA":"m","Alpha16Model":"v","AlphaModel":"v","Black":"v","CMYK":"t","CMYK.RGBA":"m","CMYKModel":"v","CMYKToRGB":"f","Color":"t","Gray":"t","Gray.RGBA":"m","Gray16":"t","Gray16.RGBA":"m","Gray16Model":"v","GrayModel":"v","Model":"t","ModelFunc":"f","NRGBA":"t","NRGBA.RGBA":"m","NRGBA64":"t","NRGBA64.RGBA":"m","NRGBA64Model":"v","NRGBAModel":"v","NYCbCrA":"t","NYCbCrA.RGBA":"m","NYCbCrAModel":"v","Opaque":"v","Palette":"t","Palette.Convert":"m","Palette.Index":"m","RGBA":"t","RGBA.RGBA":"m","RGBA64":"t","RGBA64.RGBA":"m","RGBA64Model":"v","RGBAModel":"v","RGBToCMYK":"f","RGBToYCbCr":"f","Transparent":"v","White":"v","YCbCr":"t","YCbCr.RGBA":"m","YCbCrModel":"v","YCbCrToRGB":"f"}},"image/color/palette":{"path":"image/color/palette","name":"palette","symbols":{"Plan9":"v","WebSafe":"v"}},"image/draw":{"path":"image/draw","name":"draw","symbols":{"Draw":"f","DrawMask":"f","Drawer":"t","FloydSteinberg":"v","Image":"t","Op":"t","Op.Draw":"m","Over":"c","Quantizer":"t","RGBA64Image":"t","Src":"c"}},"image/gif":{"path":"image/gif","name":"gif","symbols":{"Decode":"f","DecodeAll":"f","DecodeConfig":"f","DisposalBackground":"c","DisposalNone":"c","DisposalPrevious":"c","Encode":"f","EncodeAll":"f","GIF":"t","Options":"t"}},"image/jpeg":{"path":"image/jpeg","name":"jpeg","symbols":{"Decode":"f","DecodeConfig":"f","DefaultQuality":"c","Encode":"f","FormatError":"t","FormatError.Error":"m","Options":"t","Reader":"t","UnsupportedError":"t","UnsupportedError.Error":"m"}},"image/png":{"path":"image/png","name":"png","symbols":{"BestCompression":"c","BestSpeed":"c","CompressionLevel":"t","Decode":"f","DecodeConfig":"f","DefaultCompression":"c","Encode":"f","Encoder":"t","Encoder.Encode":"m","EncoderBuffer":"t","EncoderBufferPool":"t","FormatError":"t","FormatError.Error":"m","NoCompression":"c","UnsupportedError":"t","UnsupportedError.Error":"m"}},"index/suffixarray":{"path":"index/suffixarray","name":"suffixarray","symbols":{"Index":"t","Index.Bytes":"m","Index.FindAllIndex":"m","Index.Lookup":"m","Index.Read":"m","Index.Write":"m","New":"f"}},"io":{"path":"io","name":"io","symbols":{"ByteReader":"t","ByteScanner":"t","ByteWriter":"t","Closer":"t","Copy":"f","CopyBuffer":"f","CopyN":"f","Discard":"v","EOF":"v","ErrClosedPipe":"v","ErrNoProgress":"v","ErrShortBuffer":"v","ErrShortWrite":"v","ErrUnexpectedEOF":"v","LimitReader":"f","LimitedReader":"t","LimitedReader.Read":"m","MultiReader":"f","MultiWriter":"f","NewOffsetWriter":"f","NewSectionReader":"f","NopCloser":"f","OffsetWriter":"t","OffsetWriter.Seek":"m","OffsetWriter.Write":"m","OffsetWriter.WriteAt":"m","Pipe":"f","PipeReader":"t","PipeReader.Close":"m","PipeReader.CloseWithError":"m","PipeReader.Read":"m","PipeWriter":"t","PipeWriter.Close":"m","PipeWriter.CloseWithError":"m","PipeWriter.Write":"m","ReadAll":"f","ReadAtLeast":"f","ReadCloser":"t","ReadFull":"f","ReadSeekCloser":"t","ReadSeeker":"t","ReadWriteCloser":"t","ReadWriteSeeker":"t","ReadWriter":"t","Reader":"t","ReaderAt":"t","ReaderFrom":"t","RuneReader":"t","RuneScanner":"t","SectionReader":"t","SectionReader.Outer":"m","SectionReader.Read":"m","SectionReader.ReadAt":"m","SectionReader.Seek":"m","SectionReader.Size":"m","SeekCurrent":"c","SeekEnd":"c","SeekStart":"c","Seeker":"t","StringWriter":"t","TeeReader":"f","WriteCloser":"t","WriteSeeker":"t","WriteString":"f","Writer":"t","WriterAt":"t","WriterTo":"t"}},"io/fs":{"path":"io/fs","name":"fs","symbols":{"DirEntry":"t","ErrClosed":"v","ErrExist":"v","ErrInvalid":"v","ErrNotExist":"v","ErrPermission":"v","FS":"t","File":"t","FileInfo":"t","FileInfoToDirEntry":"f","FileMode":"t","FileMode.IsDir":"m","FileMode.IsRegular":"m","FileMode.Perm":"m","FileMode.String":"m","FileMode.Type":"m","FormatDirEntry":"f","FormatFileInfo":"f","Glob":"f","GlobFS":"t","Lstat":"f","ModeAppend":"c","ModeCharDevice":"c","ModeDevice":"c","ModeDir":"c","ModeExclusive":"c","ModeIrregular":"c","ModeNamedPipe":"c","ModePerm":"c","ModeSetgid":"c","ModeSetuid":"c","ModeSocket":"c","ModeSticky":"c","ModeSymlink":"c","ModeTemporary":"c","ModeType":"c","PathError":"t","PathError.Error":"m","PathError.Timeout":"m","PathError.Unwrap":"m","ReadDir":"f","ReadDirFS":"t","ReadDirFile":"t","ReadFile":"f","ReadFileFS":"t","ReadLink":"f","ReadLinkFS":"t","SkipAll":"v","SkipDir":"v","Stat":"f","StatFS":"t","Sub":"f","SubFS":"t","ValidPath":"f","WalkDir":"f","WalkDirFunc":"t"}},"io/ioutil":{"path":"io/ioutil","name":"ioutil","symbols":{"Discard":"v","NopCloser":"f","ReadAll":"f","ReadDir":"f","ReadFile":"f","TempDir":"f","TempFile":"f","WriteFile":"f"}},"iter":{"path":"iter","name":"iter","symbols":{"Pull":"f","Pull2":"f","Seq":"t","Seq2":"t"}},"log":{"path":"log","name":"log","symbols":{"Default":"f","Fatal":"f","Fatalf":"f","Fatalln":"f","Flags":"f","LUTC":"c","Ldate":"c","Llongfile":"c","Lmicroseconds":"c","Lmsgprefix":"c","Logger":"t","Logger.Fatal":"m","Logger.Fatalf":"m","Logger.Fatalln":"m","Logger.Flags":"m","Logger.Output":"m","Logger.Panic":"m","Logger.Panicf":"m","Logger.Panicln":"m","Logger.Prefix":"m","Logger.Print":"m","Logger.Printf":"m","Logger.Println":"m","Logger.SetFlags":"m","Logger.SetOutput":"m","Logger.SetPrefix":"m","Logger.Writer":"m","Lshortfile":"c","LstdFlags":"c","Ltime":"c","New":"f","Output":"f","Panic":"f","Panicf":"f","Panicln":"f","Prefix":"f","Print":"f","Printf":"f","Println":"f","SetFlags":"f","SetOutput":"f","SetPrefix":"f","Writer":"f"}},"log/slog":{"path":"log/slog","name":"slog","symbols":{"Any":"f","AnyValue":"f","Attr":"t","Attr.Equal":"m","Attr.String":"m","Bool":"f","BoolValue":"f","Debug":"f","DebugContext":"f","Default":"f","DiscardHandler":"v","Duration":"f","DurationValue":"f","Error":"f","ErrorContext":"f","Float64":"f","Float64Value":"f","Group":"f","GroupAttrs":"f","GroupValue":"f","Handler":"t","HandlerOptions":"t","Info":"f","InfoContext":"f","Int":"f","Int64":"f","Int64Value":"f","IntValue":"f","JSONHandler":"t","JSONHandler.Enabled":"m","JSONHandler.Handle":"m","JSONHandler.WithAttrs":"m","JSONHandler.WithGroup":"m","Kind":"t","Kind.String":"m","KindAny":"c","KindBool":"c","KindDuration":"c","KindFloat64":"c","KindGroup":"c","KindInt64":"c","KindLogValuer":"c","KindString":"c","KindTime":"c","KindUint64":"c","Level":"t","Level.AppendText":"m","Level.Level":"m","Level.MarshalJSON":"m","Level.MarshalText":"m","Level.String":"m","Level.UnmarshalJSON":"m","Level.UnmarshalText":"m","LevelDebug":"c","LevelError":"c","LevelInfo":"c","LevelKey":"c","LevelVar":"t","LevelVar.AppendText":"m","LevelVar.Level":"m","LevelVar.MarshalText":"m","LevelVar.Set":"m","LevelVar.String":"m","LevelVar.UnmarshalText":"m","LevelWarn":"c","Leveler":"t","Log":"f","LogAttrs":"f","LogValuer":"t","Logger":"t","Logger.Debug":"m","Logger.DebugContext":"m","Logger.Enabled":"m","Logger.Error":"m","Logger.ErrorContext":"m","Logger.Handler":"m","Logger.Info":"m","Logger.InfoContext":"m","Logger.Log":"m","Logger.LogAttrs":"m","Logger.Warn":"m","Logger.WarnContext":"m","Logger.With":"m","Logger.WithGroup":"m","MessageKey":"c","New":"f","NewJSONHandler":"f","NewLogLogger":"f","NewRecord":"f","NewTextHandler":"f","Record":"t","Record.Add":"m","Record.AddAttrs":"m","Record.Attrs":"m","Record.Clone":"m","Record.NumAttrs":"m","Record.Source":"m","SetDefault":"f","SetLogLoggerLevel":"f","Source":"t","SourceKey":"c","String":"f","StringValue":"f","TextHandler":"t","TextHandler.Enabled":"m","TextHandler.Handle":"m","TextHandler.WithAttrs":"m","TextHandler.WithGroup":"m","Time":"f","TimeKey":"c","TimeValue":"f","Uint64":"f","Uint64Value":"f","Value":"t","Value.Any":"m","Value.Bool":"m","Value.Duration":"m","Value.Equal":"m","Value.Float64":"m","Value.Group":"m","Value.Int64":"m","Value.Kind":"m","Value.LogValuer":"m","Value.Resolve":"m","Value.String":"m","Value.Time":"m","Value.Uint64":"m","Warn":"f","WarnContext":"f","With":"f"}},"log/syslog":{"path":"log/syslog","name":"syslog","symbols":{"Dial":"f","LOG_ALERT":"c","LOG_AUTH":"c","LOG_AUTHPRIV":"c","LOG_CRIT":"c","LOG_CRON":"c","LOG_DAEMON":"c","LOG_DEBUG":"c","LOG_EMERG":"c","LOG_ERR":"c","LOG_FTP":"c","LOG_INFO":"c","LOG_KERN":"c","LOG_LOCAL0":"c","LOG_LOCAL1":"c","LOG_LOCAL2":"c","LOG_LOCAL3":"c","LOG_LOCAL4":"c","LOG_LOCAL5":"c","LOG_LOCAL6":"c","LOG_LOCAL7":"c","LOG_LPR":"c","LOG_MAIL":"c","LOG_NEWS":"c","LOG_NOTICE":"c","LOG_SYSLOG":"c","LOG_USER":"c","LOG_UUCP":"c","LOG_WARNING":"c","New":"f","NewLogger":"f","Priority":"t","Writer":"t","Writer.Alert":"m","Writer.Close":"m","Writer.Crit":"m","Writer.Debug":"m","Writer.Emerg":"m","Writer.Err":"m","Writer.Info":"m","Writer.Notice":"m","Writer.Warning":"m","Writer.Write":"m"}},"maps":{"path":"maps","name":"maps","symbols":{"All":"f","Clone":"f","Collect":"f","Copy":"f","DeleteFunc":"f","Equal":"f","EqualFunc":"f","Insert":"f","Keys":"f","Values":"f"}},"math":{"path":"math","name":"math","symbols":{"Abs":"f","Acos":"f","Acosh":"f","Asin":"f","Asinh":"f","Atan":"f","Atan2":"f","Atanh":"f","Cbrt":"f","Ceil":"f","Copysign":"f","Cos":"f","Cosh":"f","Dim":"f","E":"c","Erf":"f","Erfc":"f","Erfcinv":"f","Erfinv":"f","Exp":"f","Exp2":"f","Expm1":"f","FMA":"f","Float32bits":"f","Float32frombits":"f","Float64bits":"f","Float64frombits":"f","Floor":"f","Frexp":"f","Gamma":"f","Hypot":"f","Ilogb":"f","Inf":"f","IsInf":"f","IsNaN":"f","J0":"f","J1":"f","Jn":"f","Ldexp":"f","Lgamma":"f","Ln10":"c","Ln2":"c","Log":"f","Log10":"f","Log10E":"c","Log1p":"f","Log2":"f","Log2E":"c","Logb":"f","Max":"f","MaxFloat32":"c","MaxFloat64":"c","MaxInt":"c","MaxInt16":"c","MaxInt32":"c","MaxInt64":"c","MaxInt8":"c","MaxUint":"c","MaxUint16":"c","MaxUint32":"c","MaxUint64":"c","MaxUint8":"c","Min":"f","MinInt":"c","MinInt16":"c","MinInt32":"c","MinInt64":"c","MinInt8":"c","Mod":"f","Modf":"f","NaN":"f","Nextafter":"f","Nextafter32":"f","Phi":"c","Pi":"c","Pow":"f","Pow10":"f","Remainder":"f","Round":"f","RoundToEven":"f","Signbit":"f","Sin":"f","Sincos":"f","Sinh":"f","SmallestNonzeroFloat32":"c","SmallestNonzeroFloat64":"c","Sqrt":"f","Sqrt2":"c","SqrtE":"c","SqrtPhi":"c","SqrtPi":"c","Tan":"f","Tanh":"f","Trunc":"f","Y0":"f","Y1":"f","Yn":"f"}},"math/big":{"path":"math/big","name":"big","symbols":{"Above":"c","Accuracy":"t","Accuracy.String":"m","AwayFromZero":"c","Below":"c","ErrNaN":"t","ErrNaN.Error":"m","Exact":"c","Float":"t","Float.Abs":"m","Float.Acc":"m","Float.Add":"m","Float.Append":"m","Float.AppendText":"m","Float.Cmp":"m","Float.Copy":"m","Float.Float32":"m","Float.Float64":"m","Float.Format":"m","Float.GobDecode":"m","Float.GobEncode":"m","Float.Int":"m","Float.Int64":"m","Float.IsInf":"m","Float.IsInt":"m","Float.MantExp":"m","Float.MarshalText":"m","Float.MinPrec":"m","Float.Mode":"m","Float.Mul":"m","Float.Neg":"m","Float.Parse":"m","Float.Prec":"m","Float.Quo":"m","Float.Rat":"m","Float.Scan":"m","Float.Set":"m","Float.SetFloat64":"m","Float.SetInf":"m","Float.SetInt":"m","Float.SetInt64":"m","Float.SetMantExp":"m","Float.SetMode":"m","Float.SetPrec":"m","Float.SetRat":"m","Float.SetString":"m","Float.SetUint64":"m","Float.Sign":"m","Float.Signbit":"m","Float.Sqrt":"m","Float.String":"m","Float.Sub":"m","Float.Text":"m","Float.Uint64":"m","Float.UnmarshalText":"m","Int":"t","Int.Abs":"m","Int.Add":"m","Int.And":"m","Int.AndNot":"m","Int.Append":"m","Int.AppendText":"m","Int.Binomial":"m","Int.Bit":"m","Int.BitLen":"m","Int.Bits":"m","Int.Bytes":"m","Int.Cmp":"m","Int.CmpAbs":"m","Int.Div":"m","Int.DivMod":"m","Int.Exp":"m","Int.FillBytes":"m","Int.Float64":"m","Int.Format":"m","Int.GCD":"m","Int.GobDecode":"m","Int.GobEncode":"m","Int.Int64":"m","Int.IsInt64":"m","Int.IsUint64":"m","Int.Lsh":"m","Int.MarshalJSON":"m","Int.MarshalText":"m","Int.Mod":"m","Int.ModInverse":"m","Int.ModSqrt":"m","Int.Mul":"m","Int.MulRange":"m","Int.Neg":"m","Int.Not":"m","Int.Or":"m","Int.ProbablyPrime":"m","Int.Quo":"m","Int.QuoRem":"m","Int.Rand":"m","Int.Rem":"m","Int.Rsh":"m","Int.Scan":"m","Int.Set":"m","Int.SetBit":"m","Int.SetBits":"m","Int.SetBytes":"m","Int.SetInt64":"m","Int.SetString":"m","Int.SetUint64":"m","Int.Sign":"m","Int.Sqrt":"m","Int.String":"m","Int.Sub":"m","Int.Text":"m","Int.TrailingZeroBits":"m","Int.Uint64":"m","Int.UnmarshalJSON":"m","Int.UnmarshalText":"m","Int.Xor":"m","Jacobi":"f","MaxBase":"c","MaxExp":"c","MaxPrec":"c","MinExp":"c","NewFloat":"f","NewInt":"f","NewRat":"f","ParseFloat":"f","Rat":"t","Rat.Abs":"m","Rat.Add":"m","Rat.AppendText":"m","Rat.Cmp":"m","Rat.Denom":"m","Rat.Float32":"m","Rat.Float64":"m","Rat.FloatPrec":"m","Rat.FloatString":"m","Rat.GobDecode":"m","Rat.GobEncode":"m","Rat.Inv":"m","Rat.IsInt":"m","Rat.MarshalText":"m","Rat.Mul":"m","Rat.Neg":"m","Rat.Num":"m","Rat.Quo":"m","Rat.RatString":"m","Rat.Scan":"m","Rat.Set":"m","Rat.SetFloat64":"m","Rat.SetFrac":"m","Rat.SetFrac64":"m","Rat.SetInt":"m","Rat.SetInt64":"m","Rat.SetString":"m","Rat.SetUint64":"m","Rat.Sign":"m","Rat.String":"m","Rat.Sub":"m","Rat.UnmarshalText":"m","RoundingMode":"t","RoundingMode.String":"m","ToNearestAway":"c","ToNearestEven":"c","ToNegativeInf":"c","ToPositiveInf":"c","ToZero":"c","Word":"t"}},"math/bits":{"path":"math/bits","name":"bits","symbols":{"Add":"f","Add32":"f","Add64":"f","Div":"f","Div32":"f","Div64":"f","LeadingZeros":"f","LeadingZeros16":"f","LeadingZeros32":"f","LeadingZeros64":"f","LeadingZeros8":"f","Len":"f","Len16":"f","Len32":"f","Len64":"f","Len8":"f","Mul":"f","Mul32":"f","Mul64":"f","OnesCount":"f","OnesCount16":"f","OnesCount32":"f","OnesCount64":"f","OnesCount8":"f","Rem":"f","Rem32":"f","Rem64":"f","Reverse":"f","Reverse16":"f","Reverse32":"f","Reverse64":"f","Reverse8":"f","ReverseBytes":"f","ReverseBytes16":"f","ReverseBytes32":"f","ReverseBytes64":"f","RotateLeft":"f","RotateLeft16":"f","RotateLeft32":"f","RotateLeft64":"f","RotateLeft8":"f","Sub":"f","Sub32":"f","Sub64":"f","TrailingZeros":"f","TrailingZeros16":"f","TrailingZeros32":"f","TrailingZeros64":"f","TrailingZeros8":"f","UintSize":"c"}},"math/cmplx":{"path":"math/cmplx","name":"cmplx","symbols":{"Abs":"f","Acos":"f","Acosh":"f","Asin":"f","Asinh":"f","Atan":"f","Atanh":"f","Conj":"f","Cos":"f","Cosh":"f","Cot":"f","Exp":"f","Inf":"f","IsInf":"f","IsNaN":"f","Log":"f","Log10":"f","NaN":"f","Phase":"f","Polar":"f","Pow":"f","Rect":"f","Sin":"f","Sinh":"f","Sqrt":"f","Tan":"f","Tanh":"f"}},"math/rand":{"path":"math/rand","name":"rand","symbols":{"ExpFloat64":"f","Float32":"f","Float64":"f","Int":"f","Int31":"f","Int31n":"f","Int63":"f","Int63n":"f","Intn":"f","New":"f","NewSource":"f","NewZipf":"f","NormFloat64":"f","Perm":"f","Rand":"t","Rand.ExpFloat64":"m","Rand.Float32":"m","Rand.Float64":"m","Rand.Int":"m","Rand.Int31":"m","Rand.Int31n":"m","Rand.Int63":"m","Rand.Int63n":"m","Rand.Intn":"m","Rand.NormFloat64":"m","Rand.Perm":"m","Rand.Read":"m","Rand.Seed":"m","Rand.Shuffle":"m","Rand.Uint32":"m","Rand.Uint64":"m","Read":"f","Seed":"f","Shuffle":"f","Source":"t","Source64":"t","Uint32":"f","Uint64":"f","Zipf":"t","Zipf.Uint64":"m"}},"math/rand/v2":{"path":"math/rand/v2","name":"rand","symbols":{"ChaCha8":"t","ChaCha8.AppendBinary":"m","ChaCha8.MarshalBinary":"m","ChaCha8.Read":"m","ChaCha8.Seed":"m","ChaCha8.Uint64":"m","ChaCha8.UnmarshalBinary":"m","ExpFloat64":"f","Float32":"f","Float64":"f","Int":"f","Int32":"f","Int32N":"f","Int64":"f","Int64N":"f","IntN":"f","N":"f","New":"f","NewChaCha8":"f","NewPCG":"f","NewZipf":"f","NormFloat64":"f","PCG":"t","PCG.AppendBinary":"m","PCG.MarshalBinary":"m","PCG.Seed":"m","PCG.Uint64":"m","PCG.UnmarshalBinary":"m","Perm":"f","Rand":"t","Rand.ExpFloat64":"m","Rand.Float32":"m","Rand.Float64":"m","Rand.Int":"m","Rand.Int32":"m","Rand.Int32N":"m","Rand.Int64":"m","Rand.Int64N":"m","Rand.IntN":"m","Rand.NormFloat64":"m","Rand.Perm":"m","Rand.Shuffle":"m","Rand.Uint":"m","Rand.Uint32":"m","Rand.Uint32N":"m","Rand.Uint64":"m","Rand.Uint64N":"m","Rand.UintN":"m","Shuffle":"f","Source":"t","Uint":"f","Uint32":"f","Uint32N":"f","Uint64":"f","Uint64N":"f","UintN":"f","Zipf":"t","Zipf.Uint64":"m"}},"mime":{"path":"mime","name":"mime","symbols":{"AddExtensionType":"f","BEncoding":"c","ErrInvalidMediaParameter":"v","ExtensionsByType":"f","FormatMediaType":"f","ParseMediaType":"f","QEncoding":"c","TypeByExtension":"f","WordDecoder":"t","WordDecoder.Decode":"m","WordDecoder.DecodeHeader":"m","WordEncoder":"t","WordEncoder.Encode":"m"}},"mime/multipart":{"path":"mime/multipart","name":"multipart","symbols":{"ErrMessageTooLarge":"v","File":"t","FileContentDisposition":"f","FileHeader":"t","FileHeader.Open":"m","Form":"t","Form.RemoveAll":"m","NewReader":"f","NewWriter":"f","Part":"t","Part.Close":"m","Part.FileName":"m","Part.FormName":"m","Part.Read":"m","Reader":"t","Reader.NextPart":"m","Reader.NextRawPart":"m","Reader.ReadForm":"m","Writer":"t","Writer.Boundary":"m","Writer.Close":"m","Writer.CreateFormField":"m","Writer.CreateFormFile":"m","Writer.CreatePart":"m","Writer.FormDataContentType":"m","Writer.SetBoundary":"m","Writer.WriteField":"m"}},"mime/quotedprintable":{"path":"mime/quotedprintable","name":"quotedprintable","symbols":{"NewReader":"f","NewWriter":"f","Reader":"t","Reader.Read":"m","Writer":"t","Writer.Close":"m","Writer.Write":"m"}},"net":{"path":"net","name":"net","symbols":{"Addr":"t","AddrError":"t","AddrError.Error":"m","AddrError.Temporary":"m","AddrError.Timeout":"m","Buffers":"t","Buffers.Read":"m","Buffers.WriteTo":"m","CIDRMask":"f","Conn":"t","DNSConfigError":"t","DNSConfigError.Error":"m","DNSConfigError.Temporary":"m","DNSConfigError.Timeout":"m","DNSConfigError.Unwrap":"m","DNSError":"t","DNSError.Error":"m","DNSError.Temporary":"m","DNSError.Timeout":"m","DNSError.Unwrap":"m","DefaultResolver":"v","Dial":"f","DialIP":"f","DialTCP":"f","DialTimeout":"f","DialUDP":"f","DialUnix":"f","Dialer":"t","Dialer.Dial":"m","Dialer.DialContext":"m","Dialer.MultipathTCP":"m","Dialer.SetMultipathTCP":"m","ErrClosed":"v","ErrWriteToConnected":"v","Error":"t","FileConn":"f","FileListener":"f","FilePacketConn":"f","FlagBroadcast":"c","FlagLoopback":"c","FlagMulticast":"c","FlagPointToPoint":"c","FlagRunning":"c","FlagUp":"c","Flags":"t","Flags.String":"m","HardwareAddr":"t","HardwareAddr.String":"m","IP":"t","IP.AppendText":"m","IP.DefaultMask":"m","IP.Equal":"m","IP.IsGlobalUnicast":"m","IP.IsInterfaceLocalMulticast":"m","IP.IsLinkLocalMulticast":"m","IP.IsLinkLocalUnicast":"m","IP.IsLoopback":"m","IP.IsMulticast":"m","IP.IsPrivate":"m","IP.IsUnspecified":"m","IP.MarshalText":"m","IP.Mask":"m","IP.String":"m","IP.To16":"m","IP.To4":"m","IP.UnmarshalText":"m","IPAddr":"t","IPAddr.Network":"m","IPAddr.String":"m","IPConn":"t","IPConn.ReadFrom":"m","IPConn.ReadFromIP":"m","IPConn.ReadMsgIP":"m","IPConn.SyscallConn":"m","IPConn.WriteMsgIP":"m","IPConn.WriteTo":"m","IPConn.WriteToIP":"m","IPMask":"t","IPMask.Size":"m","IPMask.String":"m","IPNet":"t","IPNet.Contains":"m","IPNet.Network":"m","IPNet.String":"m","IPv4":"f","IPv4Mask":"f","IPv4allrouter":"v","IPv4allsys":"v","IPv4bcast":"v","IPv4len":"c","IPv4zero":"v","IPv6interfacelocalallnodes":"v","IPv6len":"c","IPv6linklocalallnodes":"v","IPv6linklocalallrouters":"v","IPv6loopback":"v","IPv6unspecified":"v","IPv6zero":"v","Interface":"t","Interface.Addrs":"m","Interface.MulticastAddrs":"m","InterfaceAddrs":"f","InterfaceByIndex":"f","InterfaceByName":"f","Interfaces":"f","InvalidAddrError":"t","InvalidAddrError.Error":"m","InvalidAddrError.Temporary":"m","InvalidAddrError.Timeout":"m","JoinHostPort":"f","KeepAliveConfig":"t","Listen":"f","ListenConfig":"t","ListenConfig.Listen":"m","ListenConfig.ListenPacket":"m","ListenConfig.MultipathTCP":"m","ListenConfig.SetMultipathTCP":"m","ListenIP":"f","ListenMulticastUDP":"f","ListenPacket":"f","ListenTCP":"f","ListenUDP":"f","ListenUnix":"f","ListenUnixgram":"f","Listener":"t","LookupAddr":"f","LookupCNAME":"f","LookupHost":"f","LookupIP":"f","LookupMX":"f","LookupNS":"f","LookupPort":"f","LookupSRV":"f","LookupTXT":"f","MX":"t","NS":"t","OpError":"t","OpError.Error":"m","OpError.Temporary":"m","OpError.Timeout":"m","OpError.Unwrap":"m","PacketConn":"t","ParseCIDR":"f","ParseError":"t","ParseError.Error":"m","ParseError.Temporary":"m","ParseError.Timeout":"m","ParseIP":"f","ParseMAC":"f","Pipe":"f","ResolveIPAddr":"f","ResolveTCPAddr":"f","ResolveUDPAddr":"f","ResolveUnixAddr":"f","Resolver":"t","Resolver.LookupAddr":"m","Resolver.LookupCNAME":"m","Resolver.LookupHost":"m","Resolver.LookupIP":"m","Resolver.LookupIPAddr":"m","Resolver.LookupMX":"m","Resolver.LookupNS":"m","Resolver.LookupNetIP":"m","Resolver.LookupPort":"m","Resolver.LookupSRV":"m","Resolver.LookupTXT":"m","SRV":"t","SplitHostPort":"f","TCPAddr":"t","TCPAddr.AddrPort":"m","TCPAddr.Network":"m","TCPAddr.String":"m","TCPAddrFromAddrPort":"f","TCPConn":"t","TCPConn.CloseRead":"m","TCPConn.CloseWrite":"m","TCPConn.MultipathTCP":"m","TCPConn.ReadFrom":"m","TCPConn.SetKeepAlive":"m","TCPConn.SetKeepAliveConfig":"m","TCPConn.SetKeepAlivePeriod":"m","TCPConn.SetLinger":"m","TCPConn.SetNoDelay":"m","TCPConn.SyscallConn":"m","TCPConn.WriteTo":"m","TCPListener":"t","TCPListener.Accept":"m","TCPListener.AcceptTCP":"m","TCPListener.Addr":"m","TCPListener.Close":"m","TCPListener.File":"m","TCPListener.SetDeadline":"m","TCPListener.SyscallConn":"m","UDPAddr":"t","UDPAddr.AddrPort":"m","UDPAddr.Network":"m","UDPAddr.String":"m","UDPAddrFromAddrPort":"f","UDPConn":"t","UDPConn.ReadFrom":"m","UDPConn.ReadFromUDP":"m","UDPConn.ReadFromUDPAddrPort":"m","UDPConn.ReadMsgUDP":"m","UDPConn.ReadMsgUDPAddrPort":"m","UDPConn.SyscallConn":"m","UDPConn.WriteMsgUDP":"m","UDPConn.WriteMsgUDPAddrPort":"m","UDPConn.WriteTo":"m","UDPConn.WriteToUDP":"m","UDPConn.WriteToUDPAddrPort":"m","UnixAddr":"t","UnixAddr.Network":"m","UnixAddr.String":"m","UnixConn":"t","UnixConn.CloseRead":"m","UnixConn.CloseWrite":"m","UnixConn.ReadFrom":"m","UnixConn.ReadFromUnix":"m","UnixConn.ReadMsgUnix":"m","UnixConn.SyscallConn":"m","UnixConn.WriteMsgUnix":"m","UnixConn.WriteTo":"m","UnixConn.WriteToUnix":"m","UnixListener":"t","UnixListener.Accept":"m","UnixListener.AcceptUnix":"m","UnixListener.Addr":"m","UnixListener.Close":"m","UnixListener.File":"m","UnixListener.SetDeadline":"m","UnixListener.SetUnlinkOnClose":"m","UnixListener.SyscallConn":"m","UnknownNetworkError":"t","UnknownNetworkError.Error":"m","UnknownNetworkError.Temporary":"m","UnknownNetworkError.Timeout":"m"}},"net/http":{"path":"net/http","name":"http","symbols":{"AllowQuerySemicolons":"f","CanonicalHeaderKey":"f","Client":"t","Client.CloseIdleConnections":"m","Client.Do":"m","Client.Get":"m","Client.Head":"m","Client.Post":"m","Client.PostForm":"m","CloseNotifier":"t","ConnState":"t","ConnState.String":"m","Cookie":"t","Cookie.String":"m","Cookie.Valid":"m","CookieJar":"t","CrossOriginProtection":"t","CrossOriginProtection.AddInsecureBypassPattern":"m","CrossOriginProtection.AddTrustedOrigin":"m","CrossOriginProtection.Check":"m","CrossOriginProtection.Handler":"m","CrossOriginProtection.SetDenyHandler":"m","DefaultClient":"v","DefaultMaxHeaderBytes":"c","DefaultMaxIdleConnsPerHost":"c","DefaultServeMux":"v","DefaultTransport":"v","DetectContentType":"f","Dir":"t","Dir.Open":"m","ErrAbortHandler":"v","ErrBodyNotAllowed":"v","ErrBodyReadAfterClose":"v","ErrContentLength":"v","ErrHandlerTimeout":"v","ErrHeaderTooLong":"v","ErrHijacked":"v","ErrLineTooLong":"v","ErrMissingBoundary":"v","ErrMissingContentLength":"v","ErrMissingFile":"v","ErrNoCookie":"v","ErrNoLocation":"v","ErrNotMultipart":"v","ErrNotSupported":"v","ErrSchemeMismatch":"v","ErrServerClosed":"v","ErrShortBody":"v","ErrSkipAltProtocol":"v","ErrUnexpectedTrailer":"v","ErrUseLastResponse":"v","ErrWriteAfterFlush":"v","Error":"f","FS":"f","File":"t","FileServer":"f","FileServerFS":"f","FileSystem":"t","Flusher":"t","Get":"f","HTTP2Config":"t","Handle":"f","HandleFunc":"f","Handler":"t","HandlerFunc":"t","HandlerFunc.ServeHTTP":"m","Head":"f","Header":"t","Header.Add":"m","Header.Clone":"m","Header.Del":"m","Header.Get":"m","Header.Set":"m","Header.Values":"m","Header.Write":"m","Header.WriteSubset":"m","Hijacker":"t","ListenAndServe":"f","ListenAndServeTLS":"f","LocalAddrContextKey":"v","MaxBytesError":"t","MaxBytesError.Error":"m","MaxBytesHandler":"f","MaxBytesReader":"f","MethodConnect":"c","MethodDelete":"c","MethodGet":"c","MethodHead":"c","MethodOptions":"c","MethodPatch":"c","MethodPost":"c","MethodPut":"c","MethodTrace":"c","NewCrossOriginProtection":"f","NewFileTransport":"f","NewFileTransportFS":"f","NewRequest":"f","NewRequestWithContext":"f","NewResponseController":"f","NewServeMux":"f","NoBody":"v","NotFound":"f","NotFoundHandler":"f","ParseCookie":"f","ParseHTTPVersion":"f","ParseSetCookie":"f","ParseTime":"f","Post":"f","PostForm":"f","ProtocolError":"t","ProtocolError.Error":"m","ProtocolError.Is":"m","Protocols":"t","Protocols.HTTP1":"m","Protocols.HTTP2":"m","Protocols.SetHTTP1":"m","Protocols.SetHTTP2":"m","Protocols.SetUnencryptedHTTP2":"m","Protocols.String":"m","Protocols.UnencryptedHTTP2":"m","ProxyFromEnvironment":"f","ProxyURL":"f","PushOptions":"t","Pusher":"t","ReadRequest":"f","ReadResponse":"f","Redirect":"f","RedirectHandler":"f","Request":"t","Request.AddCookie":"m","Request.BasicAuth":"m","Request.Clone":"m","Request.Context":"m","Request.Cookie":"m","Request.Cookies":"m","Request.CookiesNamed":"m","Request.FormFile":"m","Request.FormValue":"m","Request.MultipartReader":"m","Request.ParseForm":"m","Request.ParseMultipartForm":"m","Request.PathValue":"m","Request.PostFormValue":"m","Request.ProtoAtLeast":"m","Request.Referer":"m","Request.SetBasicAuth":"m","Request.SetPathValue":"m","Request.UserAgent":"m","Request.WithContext":"m","Request.Write":"m","Request.WriteProxy":"m","Response":"t","Response.Cookies":"m","Response.Location":"m","Response.ProtoAtLeast":"m","Response.Write":"m","ResponseController":"t","ResponseController.EnableFullDuplex":"m","ResponseController.Flush":"m","ResponseController.Hijack":"m","ResponseController.SetReadDeadline":"m","ResponseController.SetWriteDeadline":"m","ResponseWriter":"t","RoundTripper":"t","SameSite":"t","SameSiteDefaultMode":"c","SameSiteLaxMode":"c","SameSiteNoneMode":"c","SameSiteStrictMode":"c","Serve":"f","ServeContent":"f","ServeFile":"f","ServeFileFS":"f","ServeMux":"t","ServeMux.Handle":"m","ServeMux.HandleFunc":"m","ServeMux.Handler":"m","ServeMux.ServeHTTP":"m","ServeTLS":"f","Server":"t","Server.Close":"m","Server.ListenAndServe":"m","Server.ListenAndServeTLS":"m","Server.RegisterOnShutdown":"m","Server.Serve":"m","Server.ServeTLS":"m","Server.SetKeepAlivesEnabled":"m","Server.Shutdown":"m","ServerContextKey":"v","SetCookie":"f","StateActive":"c","StateClosed":"c","StateHijacked":"c","StateIdle":"c","StateNew":"c","StatusAccepted":"c","StatusAlreadyReported":"c","StatusBadGateway":"c","StatusBadRequest":"c","StatusConflict":"c","StatusContinue":"c","StatusCreated":"c","StatusEarlyHints":"c","StatusExpectationFailed":"c","StatusFailedDependency":"c","StatusForbidden":"c","StatusFound":"c","StatusGatewayTimeout":"c","StatusGone":"c","StatusHTTPVersionNotSupported":"c","StatusIMUsed":"c","StatusInsufficientStorage":"c","StatusInternalServerError":"c","StatusLengthRequired":"c","StatusLocked":"c","StatusLoopDetected":"c","StatusMethodNotAllowed":"c","StatusMisdirectedRequest":"c","StatusMovedPermanently":"c","StatusMultiStatus":"c","StatusMultipleChoices":"c","StatusNetworkAuthenticationRequired":"c","StatusNoContent":"c","StatusNonAuthoritativeInfo":"c","StatusNotAcceptable":"c","StatusNotExtended":"c","StatusNotFound":"c","StatusNotImplemented":"c","StatusNotModified":"c","StatusOK":"c","StatusPartialContent":"c","StatusPaymentRequired":"c","StatusPermanentRedirect":"c","StatusPreconditionFailed":"c","StatusPreconditionRequired":"c","StatusProcessing":"c","StatusProxyAuthRequired":"c","StatusRequestEntityTooLarge":"c","StatusRequestHeaderFieldsTooLarge":"c","StatusRequestTimeout":"c","StatusRequestURITooLong":"c","StatusRequestedRangeNotSatisfiable":"c","StatusResetContent":"c","StatusSeeOther":"c","StatusServiceUnavailable":"c","StatusSwitchingProtocols":"c","StatusTeapot":"c","StatusTemporaryRedirect":"c","StatusText":"f","StatusTooEarly":"c","StatusTooManyRequests":"c","StatusUnauthorized":"c","StatusUnavailableForLegalReasons":"c","StatusUnprocessableEntity":"c","StatusUnsupportedMediaType":"c","StatusUpgradeRequired":"c","StatusUseProxy":"c","StatusVariantAlsoNegotiates":"c","StripPrefix":"f","TimeFormat":"c","TimeoutHandler":"f","TrailerPrefix":"c","Transport":"t","Transport.CancelRequest":"m","Transport.Clone":"m","Transport.CloseIdleConnections":"m","Transport.RegisterProtocol":"m","Transport.RoundTrip":"m"}},"net/http/cgi":{"path":"net/http/cgi","name":"cgi","symbols":{"Handler":"t","Handler.ServeHTTP":"m","Request":"f","RequestFromMap":"f","Serve":"f"}},"net/http/cookiejar":{"path":"net/http/cookiejar","name":"cookiejar","symbols":{"Jar":"t","Jar.Cookies":"m","Jar.SetCookies":"m","New":"f","Options":"t","PublicSuffixList":"t"}},"net/http/fcgi":{"path":"net/http/fcgi","name":"fcgi","symbols":{"ErrConnClosed":"v","ErrRequestAborted":"v","ProcessEnv":"f","Serve":"f"}},"net/http/httptest":{"path":"net/http/httptest","name":"httptest","symbols":{"DefaultRemoteAddr":"c","NewRecorder":"f","NewRequest":"f","NewRequestWithContext":"f","NewServer":"f","NewTLSServer":"f","NewUnstartedServer":"f","ResponseRecorder":"t","ResponseRecorder.Flush":"m","ResponseRecorder.Header":"m","ResponseRecorder.Result":"m","ResponseRecorder.Write":"m","ResponseRecorder.WriteHeader":"m","ResponseRecorder.WriteString":"m","Server":"t","Server.Certificate":"m","Server.Client":"m","Server.Close":"m","Server.CloseClientConnections":"m","Server.Start":"m","Server.StartTLS":"m"}},"net/http/httptrace":{"path":"net/http/httptrace","name":"httptrace","symbols":{"ClientTrace":"t","ContextClientTrace":"f","DNSDoneInfo":"t","DNSStartInfo":"t","GotConnInfo":"t","WithClientTrace":"f","WroteRequestInfo":"t"}},"net/http/httputil":{"path":"net/http/httputil","name":"httputil","symbols":{"BufferPool":"t","ClientConn":"t","ClientConn.Close":"m","ClientConn.Do":"m","ClientConn.Hijack":"m","ClientConn.Pending":"m","ClientConn.Read":"m","ClientConn.Write":"m","DumpRequest":"f","DumpRequestOut":"f","DumpResponse":"f","ErrClosed":"v","ErrLineTooLong":"v","ErrPersistEOF":"v","ErrPipeline":"v","NewChunkedReader":"f","NewChunkedWriter":"f","NewClientConn":"f","NewProxyClientConn":"f","NewServerConn":"f","NewSingleHostReverseProxy":"f","ProxyRequest":"t","ProxyRequest.SetURL":"m","ProxyRequest.SetXForwarded":"m","ReverseProxy":"t","ReverseProxy.ServeHTTP":"m","ServerConn":"t","ServerConn.Close":"m","ServerConn.Hijack":"m","ServerConn.Pending":"m","ServerConn.Read":"m","ServerConn.Write":"m"}},"net/http/pprof":{"path":"net/http/pprof","name":"pprof","symbols":{"Cmdline":"f","Handler":"f","Index":"f","Profile":"f","Symbol":"f","Trace":"f"}},"net/mail":{"path":"net/mail","name":"mail","symbols":{"Address":"t","Address.String":"m","AddressParser":"t","AddressParser.Parse":"m","AddressParser.ParseList":"m","ErrHeaderNotPresent":"v","Header":"t","Header.AddressList":"m","Header.Date":"m","Header.Get":"m","Message":"t","ParseAddress":"f","ParseAddressList":"f","ParseDate":"f","ReadMessage":"f"}},"net/netip":{"path":"net/netip","name":"netip","symbols":{"Addr":"t","Addr.AppendBinary":"m","Addr.AppendText":"m","Addr.AppendTo":"m","Addr.As16":"m","Addr.As4":"m","Addr.AsSlice":"m","Addr.BitLen":"m","Addr.Compare":"m","Addr.Is4":"m","Addr.Is4In6":"m","Addr.Is6":"m","Addr.IsGlobalUnicast":"m","Addr.IsInterfaceLocalMulticast":"m","Addr.IsLinkLocalMulticast":"m","Addr.IsLinkLocalUnicast":"m","Addr.IsLoopback":"m","Addr.IsMulticast":"m","Addr.IsPrivate":"m","Addr.IsUnspecified":"m","Addr.IsValid":"m","Addr.Less":"m","Addr.MarshalBinary":"m","Addr.MarshalText":"m","Addr.Next":"m","Addr.Prefix":"m","Addr.Prev":"m","Addr.String":"m","Addr.StringExpanded":"m","Addr.Unmap":"m","Addr.UnmarshalBinary":"m","Addr.UnmarshalText":"m","Addr.WithZone":"m","Addr.Zone":"m","AddrFrom16":"f","AddrFrom4":"f","AddrFromSlice":"f","AddrPort":"t","AddrPort.Addr":"m","AddrPort.AppendBinary":"m","AddrPort.AppendText":"m","AddrPort.AppendTo":"m","AddrPort.Compare":"m","AddrPort.IsValid":"m","AddrPort.MarshalBinary":"m","AddrPort.MarshalText":"m","AddrPort.Port":"m","AddrPort.String":"m","AddrPort.UnmarshalBinary":"m","AddrPort.UnmarshalText":"m","AddrPortFrom":"f","IPv4Unspecified":"f","IPv6LinkLocalAllNodes":"f","IPv6LinkLocalAllRouters":"f","IPv6Loopback":"f","IPv6Unspecified":"f","MustParseAddr":"f","MustParseAddrPort":"f","MustParsePrefix":"f","ParseAddr":"f","ParseAddrPort":"f","ParsePrefix":"f","Prefix":"t","Prefix.Addr":"m","Prefix.AppendBinary":"m","Prefix.AppendText":"m","Prefix.AppendTo":"m","Prefix.Bits":"m","Prefix.Contains":"m","Prefix.IsSingleIP":"m","Prefix.IsValid":"m","Prefix.MarshalBinary":"m","Prefix.MarshalText":"m","Prefix.Masked":"m","Prefix.Overlaps":"m","Prefix.String":"m","Prefix.UnmarshalBinary":"m","Prefix.UnmarshalText":"m","PrefixFrom":"f"}},"net/rpc":{"path":"net/rpc","name":"rpc","symbols":{"Accept":"f","Call":"t","Client":"t","Client.Call":"m","Client.Close":"m","Client.Go":"m","ClientCodec":"t","DefaultDebugPath":"c","DefaultRPCPath":"c","DefaultServer":"v","Dial":"f","DialHTTP":"f","DialHTTPPath":"f","ErrShutdown":"v","HandleHTTP":"f","NewClient":"f","NewClientWithCodec":"f","NewServer":"f","Register":"f","RegisterName":"f","Request":"t","Response":"t","ServeCodec":"f","ServeConn":"f","ServeRequest":"f","Server":"t","Server.Accept":"m","Server.HandleHTTP":"m","Server.Register":"m","Server.RegisterName":"m","Server.ServeCodec":"m","Server.ServeConn":"m","Server.ServeHTTP":"m","Server.ServeRequest":"m","ServerCodec":"t","ServerError":"t","ServerError.Error":"m"}},"net/rpc/jsonrpc":{"path":"net/rpc/jsonrpc","name":"jsonrpc","symbols":{"Dial":"f","NewClient":"f","NewClientCodec":"f","NewServerCodec":"f","ServeConn":"f"}},"net/smtp":{"path":"net/smtp","name":"smtp","symbols":{"Auth":"t","CRAMMD5Auth":"f","Client":"t","Client.Auth":"m","Client.Close":"m","Client.Data":"m","Client.Extension":"m","Client.Hello":"m","Client.Mail":"m","Client.Noop":"m","Client.Quit":"m","Client.Rcpt":"m","Client.Reset":"m","Client.StartTLS":"m","Client.TLSConnectionState":"m","Client.Verify":"m","Dial":"f","NewClient":"f","PlainAuth":"f","SendMail":"f","ServerInfo":"t"}},"net/textproto":{"path":"net/textproto","name":"textproto","symbols":{"CanonicalMIMEHeaderKey":"f","Conn":"t","Conn.Close":"m","Conn.Cmd":"m","Dial":"f","Error":"t","Error.Error":"m","MIMEHeader":"t","MIMEHeader.Add":"m","MIMEHeader.Del":"m","MIMEHeader.Get":"m","MIMEHeader.Set":"m","MIMEHeader.Values":"m","NewConn":"f","NewReader":"f","NewWriter":"f","Pipeline":"t","Pipeline.EndRequest":"m","Pipeline.EndResponse":"m","Pipeline.Next":"m","Pipeline.StartRequest":"m","Pipeline.StartResponse":"m","ProtocolError":"t","ProtocolError.Error":"m","Reader":"t","Reader.DotReader":"m","Reader.ReadCodeLine":"m","Reader.ReadContinuedLine":"m","Reader.ReadContinuedLineBytes":"m","Reader.ReadDotBytes":"m","Reader.ReadDotLines":"m","Reader.ReadLine":"m","Reader.ReadLineBytes":"m","Reader.ReadMIMEHeader":"m","Reader.ReadResponse":"m","TrimBytes":"f","TrimString":"f","Writer":"t","Writer.DotWriter":"m","Writer.PrintfLine":"m"}},"net/url":{"path":"net/url","name":"url","symbols":{"Error":"t","Error.Error":"m","Error.Temporary":"m","Error.Timeout":"m","Error.Unwrap":"m","EscapeError":"t","EscapeError.Error":"m","InvalidHostError":"t","InvalidHostError.Error":"m","JoinPath":"f","Parse":"f","ParseQuery":"f","ParseRequestURI":"f","PathEscape":"f","PathUnescape":"f","QueryEscape":"f","QueryUnescape":"f","URL":"t","URL.AppendBinary":"m","URL.EscapedFragment":"m","URL.EscapedPath":"m","URL.Hostname":"m","URL.IsAbs":"m","URL.JoinPath":"m","URL.MarshalBinary":"m","URL.Parse":"m","URL.Port":"m","URL.Query":"m","URL.Redacted":"m","URL.RequestURI":"m","URL.ResolveReference":"m","URL.String":"m","URL.UnmarshalBinary":"m","User":"f","UserPassword":"f","Userinfo":"t","Userinfo.Password":"m","Userinfo.String":"m","Userinfo.Username":"m","Values":"t","Values.Add":"m","Values.Del":"m","Values.Encode":"m","Values.Get":"m","Values.Has":"m","Values.Set":"m"}},"os":{"path":"os","name":"os","symbols":{"Args":"v","Chdir":"f","Chmod":"f","Chown":"f","Chtimes":"f","Clearenv":"f","CopyFS":"f","Create":"f","CreateTemp":"f","DevNull":"c","DirEntry":"t","DirFS":"f","Environ":"f","ErrClosed":"v","ErrDeadlineExceeded":"v","ErrExist":"v","ErrInvalid":"v","ErrNoDeadline":"v","ErrNotExist":"v","ErrPermission":"v","ErrProcessDone":"v","Executable":"f","Exit":"f","Expand":"f","ExpandEnv":"f","File":"t","File.Chdir":"m","File.Chmod":"m","File.Chown":"m","File.Close":"m","File.Fd":"m","File.Name":"m","File.Read":"m","File.ReadAt":"m","File.ReadDir":"m","File.ReadFrom":"m","File.Readdir":"m","File.Readdirnames":"m","File.Seek":"m","File.SetDeadline":"m","File.SetReadDeadline":"m","File.SetWriteDeadline":"m","File.Stat":"m","File.Sync":"m","File.SyscallConn":"m","File.Truncate":"m","File.Write":"m","File.WriteAt":"m","File.WriteString":"m","File.WriteTo":"m","FileInfo":"t","FileMode":"t","FindProcess":"f","Getegid":"f","Getenv":"f","Geteuid":"f","Getgid":"f","Getgroups":"f","Getpagesize":"f","Getpid":"f","Getppid":"f","Getuid":"f","Getwd":"f","Hostname":"f","Interrupt":"v","IsExist":"f","IsNotExist":"f","IsPathSeparator":"f","IsPermission":"f","IsTimeout":"f","Kill":"v","Lchown":"f","Link":"f","LinkError":"t","LinkError.Error":"m","LinkError.Unwrap":"m","LookupEnv":"f","Lstat":"f","Mkdir":"f","MkdirAll":"f","MkdirTemp":"f","ModeAppend":"c","ModeCharDevice":"c","ModeDevice":"c","ModeDir":"c","ModeExclusive":"c","ModeIrregular":"c","ModeNamedPipe":"c","ModePerm":"c","ModeSetgid":"c","ModeSetuid":"c","ModeSocket":"c","ModeSticky":"c","ModeSymlink":"c","ModeTemporary":"c","ModeType":"c","NewFile":"f","NewSyscallError":"f","O_APPEND":"c","O_CREATE":"c","O_EXCL":"c","O_RDONLY":"c","O_RDWR":"c","O_SYNC":"c","O_TRUNC":"c","O_WRONLY":"c","Open":"f","OpenFile":"f","OpenInRoot":"f","OpenRoot":"f","PathError":"t","PathListSeparator":"c","PathSeparator":"c","Pipe":"f","ProcAttr":"t","Process":"t","Process.Kill":"m","Process.Release":"m","Process.Signal":"m","Process.Wait":"m","ProcessState":"t","ProcessState.ExitCode":"m","ProcessState.Exited":"m","ProcessState.Pid":"m","ProcessState.String":"m","ProcessState.Success":"m","ProcessState.Sys":"m","ProcessState.SysUsage":"m","ProcessState.SystemTime":"m","ProcessState.UserTime":"m","ReadDir":"f","ReadFile":"f","Readlink":"f","Remove":"f","RemoveAll":"f","Rename":"f","Root":"t","Root.Chmod":"m","Root.Chown":"m","Root.Chtimes":"m","Root.Close":"m","Root.Create":"m","Root.FS":"m","Root.Lchown":"m","Root.Link":"m","Root.Lstat":"m","Root.Mkdir":"m","Root.MkdirAll":"m","Root.Name":"m","Root.Open":"m","Root.OpenFile":"m","Root.OpenRoot":"m","Root.ReadFile":"m","Root.Readlink":"m","Root.Remove":"m","Root.RemoveAll":"m","Root.Rename":"m","Root.Stat":"m","Root.Symlink":"m","Root.WriteFile":"m","SEEK_CUR":"c","SEEK_END":"c","SEEK_SET":"c","SameFile":"f","Setenv":"f","Signal":"t","StartProcess":"f","Stat":"f","Stderr":"v","Stdin":"v","Stdout":"v","Symlink":"f","SyscallError":"t","SyscallError.Error":"m","SyscallError.Timeout":"m","SyscallError.Unwrap":"m","TempDir":"f","Truncate":"f","Unsetenv":"f","UserCacheDir":"f","UserConfigDir":"f","UserHomeDir":"f","WriteFile":"f"}},"os/exec":{"path":"os/exec","name":"exec","symbols":{"Cmd":"t","Cmd.CombinedOutput":"m","Cmd.Environ":"m","Cmd.Output":"m","Cmd.Run":"m","Cmd.Start":"m","Cmd.StderrPipe":"m","Cmd.StdinPipe":"m","Cmd.StdoutPipe":"m","Cmd.String":"m","Cmd.Wait":"m","Command":"f","CommandContext":"f","ErrDot":"v","ErrNotFound":"v","ErrWaitDelay":"v","Error":"t","Error.Error":"m","Error.Unwrap":"m","ExitError":"t","ExitError.Error":"m","LookPath":"f"}},"os/signal":{"path":"os/signal","name":"signal","symbols":{"Ignore":"f","Ignored":"f","Notify":"f","NotifyContext":"f","Reset":"f","Stop":"f"}},"os/user":{"path":"os/user","name":"user","symbols":{"Current":"f","Group":"t","Lookup":"f","LookupGroup":"f","LookupGroupId":"f","LookupId":"f","UnknownGroupError":"t","UnknownGroupError.Error":"m","UnknownGroupIdError":"t","UnknownGroupIdError.Error":"m","UnknownUserError":"t","UnknownUserError.Error":"m","UnknownUserIdError":"t","UnknownUserIdError.Error":"m","User":"t","User.GroupIds":"m"}},"path":{"path":"path","name":"path","symbols":{"Base":"f","Clean":"f","Dir":"f","ErrBadPattern":"v","Ext":"f","IsAbs":"f","Join":"f","Match":"f","Split":"f"}},"path/filepath":{"path":"path/filepath","name":"filepath","symbols":{"Abs":"f","Base":"f","Clean":"f","Dir":"f","ErrBadPattern":"v","EvalSymlinks":"f","Ext":"f","FromSlash":"f","Glob":"f","HasPrefix":"f","IsAbs":"f","IsLocal":"f","Join":"f","ListSeparator":"c","Localize":"f","Match":"f","Rel":"f","Separator":"c","SkipAll":"v","SkipDir":"v","Split":"f","SplitList":"f","ToSlash":"f","VolumeName":"f","Walk":"f","WalkDir":"f","WalkFunc":"t"}},"plugin":{"path":"plugin","name":"plugin","symbols":{"Open":"f","Plugin":"t","Plugin.Lookup":"m","Symbol":"t"}},"reflect":{"path":"reflect","name":"reflect","symbols":{"Append":"f","AppendSlice":"f","Array":"c","ArrayOf":"f","Bool":"c","BothDir":"c","Chan":"c","ChanDir":"t","ChanDir.String":"m","ChanOf":"f","Complex128":"c","Complex64":"c","Copy":"f","DeepEqual":"f","Float32":"c","Float64":"c","Func":"c","FuncOf":"f","Indirect":"f","Int":"c","Int16":"c","Int32":"c","Int64":"c","Int8":"c","Interface":"c","Invalid":"c","Kind":"t","Kind.String":"m","MakeChan":"f","MakeFunc":"f","MakeMap":"f","MakeMapWithSize":"f","MakeSlice":"f","Map":"c","MapIter":"t","MapIter.Key":"m","MapIter.Next":"m","MapIter.Reset":"m","MapIter.Value":"m","MapOf":"f","Method":"t","Method.IsExported":"m","New":"f","NewAt":"f","Pointer":"c","PointerTo":"f","Ptr":"c","PtrTo":"f","RecvDir":"c","Select":"f","SelectCase":"t","SelectDefault":"c","SelectDir":"t","SelectRecv":"c","SelectSend":"c","SendDir":"c","Slice":"c","SliceAt":"f","SliceHeader":"t","SliceOf":"f","String":"c","StringHeader":"t","Struct":"c","StructField":"t","StructField.IsExported":"m","StructOf":"f","StructTag":"t","StructTag.Get":"m","StructTag.Lookup":"m","Swapper":"f","Type":"t","TypeAssert":"f","TypeFor":"f","TypeOf":"f","Uint":"c","Uint16":"c","Uint32":"c","Uint64":"c","Uint8":"c","Uintptr":"c","UnsafePointer":"c","Value":"t","Value.Addr":"m","Value.Bool":"m","Value.Bytes":"m","Value.Call":"m","Value.CallSlice":"m","Value.CanAddr":"m","Value.CanComplex":"m","Value.CanConvert":"m","Value.CanFloat":"m","Value.CanInt":"m","Value.CanInterface":"m","Value.CanSet":"m","Value.CanUint":"m","Value.Cap":"m","Value.Clear":"m","Value.Close":"m","Value.Comparable":"m","Value.Complex":"m","Value.Convert":"m","Value.Elem":"m","Value.Equal":"m","Value.Field":"m","Value.FieldByIndex":"m","Value.FieldByIndexErr":"m","Value.FieldByName":"m","Value.FieldByNameFunc":"m","Value.Float":"m","Value.Grow":"m","Value.Index":"m","Value.Int":"m","Value.Interface":"m","Value.InterfaceData":"m","Value.IsNil":"m","Value.IsValid":"m","Value.IsZero":"m","Value.Kind":"m","Value.Len":"m","Value.MapIndex":"m","Value.MapKeys":"m","Value.MapRange":"m","Value.Method":"m","Value.MethodByName":"m","Value.NumField":"m","Value.NumMethod":"m","Value.OverflowComplex":"m","Value.OverflowFloat":"m","Value.OverflowInt":"m","Value.OverflowUint":"m","Value.Pointer":"m","Value.Recv":"m","Value.Send":"m","Value.Seq":"m","Value.Seq2":"m","Value.Set":"m","Value.SetBool":"m","Value.SetBytes":"m","Value.SetCap":"m","Value.SetComplex":"m","Value.SetFloat":"m","Value.SetInt":"m","Value.SetIterKey":"m","Value.SetIterValue":"m","Value.SetLen":"m","Value.SetMapIndex":"m","Value.SetPointer":"m","Value.SetString":"m","Value.SetUint":"m","Value.SetZero":"m","Value.Slice":"m","Value.Slice3":"m","Value.String":"m","Value.TryRecv":"m","Value.TrySend":"m","Value.Type":"m","Value.Uint":"m","Value.UnsafeAddr":"m","Value.UnsafePointer":"m","ValueError":"t","ValueError.Error":"m","ValueOf":"f","VisibleFields":"f","Zero":"f"}},"regexp":{"path":"regexp","name":"regexp","symbols":{"Compile":"f","CompilePOSIX":"f","Match":"f","MatchReader":"f","MatchString":"f","MustCompile":"f","MustCompilePOSIX":"f","QuoteMeta":"f","Regexp":"t","Regexp.AppendText":"m","Regexp.Copy":"m","Regexp.Expand":"m","Regexp.ExpandString":"m","Regexp.Find":"m","Regexp.FindAll":"m","Regexp.FindAllIndex":"m","Regexp.FindAllString":"m","Regexp.FindAllStringIndex":"m","Regexp.FindAllStringSubmatch":"m","Regexp.FindAllStringSubmatchIndex":"m","Regexp.FindAllSubmatch":"m","Regexp.FindAllSubmatchIndex":"m","Regexp.FindIndex":"m","Regexp.FindReaderIndex":"m","Regexp.FindReaderSubmatchIndex":"m","Regexp.FindString":"m","Regexp.FindStringIndex":"m","Regexp.FindStringSubmatch":"m","Regexp.FindStringSubmatchIndex":"m","Regexp.FindSubmatch":"m","Regexp.FindSubmatchIndex":"m","Regexp.LiteralPrefix":"m","Regexp.Longest":"m","Regexp.MarshalText":"m","Regexp.Match":"m","Regexp.MatchReader":"m","Regexp.MatchString":"m","Regexp.NumSubexp":"m","Regexp.ReplaceAll":"m","Regexp.ReplaceAllFunc":"m","Regexp.ReplaceAllLiteral":"m","Regexp.ReplaceAllLiteralString":"m","Regexp.ReplaceAllString":"m","Regexp.ReplaceAllStringFunc":"m","Regexp.Split":"m","Regexp.String":"m","Regexp.SubexpIndex":"m","Regexp.SubexpNames":"m","Regexp.UnmarshalText":"m"}},"regexp/syntax":{"path":"regexp/syntax","name":"syntax","symbols":{"ClassNL":"c","Compile":"f","DotNL":"c","EmptyBeginLine":"c","EmptyBeginText":"c","EmptyEndLine":"c","EmptyEndText":"c","EmptyNoWordBoundary":"c","EmptyOp":"t","EmptyOpContext":"f","EmptyWordBoundary":"c","ErrInternalError":"c","ErrInvalidCharClass":"c","ErrInvalidCharRange":"c","ErrInvalidEscape":"c","ErrInvalidNamedCapture":"c","ErrInvalidPerlOp":"c","ErrInvalidRepeatOp":"c","ErrInvalidRepeatSize":"c","ErrInvalidUTF8":"c","ErrLarge":"c","ErrMissingBracket":"c","ErrMissingParen":"c","ErrMissingRepeatArgument":"c","ErrNestingDepth":"c","ErrTrailingBackslash":"c","ErrUnexpectedParen":"c","Error":"t","Error.Error":"m","ErrorCode":"t","ErrorCode.String":"m","Flags":"t","FoldCase":"c","Inst":"t","Inst.MatchEmptyWidth":"m","Inst.MatchRune":"m","Inst.MatchRunePos":"m","Inst.String":"m","InstAlt":"c","InstAltMatch":"c","InstCapture":"c","InstEmptyWidth":"c","InstFail":"c","InstMatch":"c","InstNop":"c","InstOp":"t","InstOp.String":"m","InstRune":"c","InstRune1":"c","InstRuneAny":"c","InstRuneAnyNotNL":"c","IsWordChar":"f","Literal":"c","MatchNL":"c","NonGreedy":"c","OneLine":"c","Op":"t","Op.String":"m","OpAlternate":"c","OpAnyChar":"c","OpAnyCharNotNL":"c","OpBeginLine":"c","OpBeginText":"c","OpCapture":"c","OpCharClass":"c","OpConcat":"c","OpEmptyMatch":"c","OpEndLine":"c","OpEndText":"c","OpLiteral":"c","OpNoMatch":"c","OpNoWordBoundary":"c","OpPlus":"c","OpQuest":"c","OpRepeat":"c","OpStar":"c","OpWordBoundary":"c","POSIX":"c","Parse":"f","Perl":"c","PerlX":"c","Prog":"t","Prog.Prefix":"m","Prog.StartCond":"m","Prog.String":"m","Regexp":"t","Regexp.CapNames":"m","Regexp.Equal":"m","Regexp.MaxCap":"m","Regexp.Simplify":"m","Regexp.String":"m","Simple":"c","UnicodeGroups":"c","WasDollar":"c"}},"runtime":{"path":"runtime","name":"runtime","symbols":{"AddCleanup":"f","BlockProfile":"f","BlockProfileRecord":"t","Breakpoint":"f","CPUProfile":"f","Caller":"f","Callers":"f","CallersFrames":"f","Cleanup":"t","Cleanup.Stop":"m","Compiler":"c","Error":"t","Frame":"t","Frames":"t","Frames.Next":"m","Func":"t","Func.Entry":"m","Func.FileLine":"m","Func.Name":"m","FuncForPC":"f","GC":"f","GOARCH":"c","GOMAXPROCS":"f","GOOS":"c","GOROOT":"f","Goexit":"f","GoroutineProfile":"f","Gosched":"f","KeepAlive":"f","LockOSThread":"f","MemProfile":"f","MemProfileRate":"v","MemProfileRecord":"t","MemProfileRecord.InUseBytes":"m","MemProfileRecord.InUseObjects":"m","MemProfileRecord.Stack":"m","MemStats":"t","MutexProfile":"f","NumCPU":"f","NumCgoCall":"f","NumGoroutine":"f","PanicNilError":"t","PanicNilError.Error":"m","PanicNilError.RuntimeError":"m","Pinner":"t","Pinner.Pin":"m","Pinner.Unpin":"m","ReadMemStats":"f","ReadTrace":"f","SetBlockProfileRate":"f","SetCPUProfileRate":"f","SetCgoTraceback":"f","SetDefaultGOMAXPROCS":"f","SetFinalizer":"f","SetMutexProfileFraction":"f","Stack":"f","StackRecord":"t","StackRecord.Stack":"m","StartTrace":"f","StopTrace":"f","ThreadCreateProfile":"f","TypeAssertionError":"t","TypeAssertionError.Error":"m","TypeAssertionError.RuntimeError":"m","UnlockOSThread":"f","Version":"f"}},"runtime/cgo":{"path":"runtime/cgo","name":"cgo","symbols":{"Handle":"t","Handle.Delete":"m","Handle.Value":"m","Incomplete":"t","NewHandle":"f"}},"runtime/coverage":{"path":"runtime/coverage","name":"coverage","symbols":{"ClearCounters":"f","WriteCounters":"f","WriteCountersDir":"f","WriteMeta":"f","WriteMetaDir":"f"}},"runtime/debug":{"path":"runtime/debug","name":"debug","symbols":{"BuildInfo":"t","BuildInfo.String":"m","BuildSetting":"t","CrashOptions":"t","FreeOSMemory":"f","GCStats":"t","Module":"t","ParseBuildInfo":"f","PrintStack":"f","ReadBuildInfo":"f","ReadGCStats":"f","SetCrashOutput":"f","SetGCPercent":"f","SetMaxStack":"f","SetMaxThreads":"f","SetMemoryLimit":"f","SetPanicOnFault":"f","SetTraceback":"f","Stack":"f","WriteHeapDump":"f"}},"runtime/metrics":{"path":"runtime/metrics","name":"metrics","symbols":{"All":"f","Description":"t","Float64Histogram":"t","KindBad":"c","KindFloat64":"c","KindFloat64Histogram":"c","KindUint64":"c","Read":"f","Sample":"t","Value":"t","Value.Float64":"m","Value.Float64Histogram":"m","Value.Kind":"m","Value.Uint64":"m","ValueKind":"t"}},"runtime/pprof":{"path":"runtime/pprof","name":"pprof","symbols":{"Do":"f","ForLabels":"f","Label":"f","LabelSet":"t","Labels":"f","Lookup":"f","NewProfile":"f","Profile":"t","Profile.Add":"m","Profile.Count":"m","Profile.Name":"m","Profile.Remove":"m","Profile.WriteTo":"m","Profiles":"f","SetGoroutineLabels":"f","StartCPUProfile":"f","StopCPUProfile":"f","WithLabels":"f","WriteHeapProfile":"f"}},"runtime/trace":{"path":"runtime/trace","name":"trace","symbols":{"FlightRecorder":"t","FlightRecorder.Enabled":"m","FlightRecorder.Start":"m","FlightRecorder.Stop":"m","FlightRecorder.WriteTo":"m","FlightRecorderConfig":"t","IsEnabled":"f","Log":"f","Logf":"f","NewFlightRecorder":"f","NewTask":"f","Region":"t","Region.End":"m","Start":"f","StartRegion":"f","Stop":"f","Task":"t","Task.End":"m","WithRegion":"f"}},"slices":{"path":"slices","name":"slices","symbols":{"All":"f","AppendSeq":"f","Backward":"f","BinarySearch":"f","BinarySearchFunc":"f","Chunk":"f","Clip":"f","Clone":"f","Collect":"f","Compact":"f","CompactFunc":"f","Compare":"f","CompareFunc":"f","Concat":"f","Contains":"f","ContainsFunc":"f","Delete":"f","DeleteFunc":"f","Equal":"f","EqualFunc":"f","Grow":"f","Index":"f","IndexFunc":"f","Insert":"f","IsSorted":"f","IsSortedFunc":"f","Max":"f","MaxFunc":"f","Min":"f","MinFunc":"f","Repeat":"f","Replace":"f","Reverse":"f","Sort":"f","SortFunc":"f","SortStableFunc":"f","Sorted":"f","SortedFunc":"f","SortedStableFunc":"f","Values":"f"}},"sort":{"path":"sort","name":"sort","symbols":{"Find":"f","Float64Slice":"t","Float64Slice.Len":"m","Float64Slice.Less":"m","Float64Slice.Search":"m","Float64Slice.Sort":"m","Float64Slice.Swap":"m","Float64s":"f","Float64sAreSorted":"f","IntSlice":"t","IntSlice.Len":"m","IntSlice.Less":"m","IntSlice.Search":"m","IntSlice.Sort":"m","IntSlice.Swap":"m","Interface":"t","Ints":"f","IntsAreSorted":"f","IsSorted":"f","Reverse":"f","Search":"f","SearchFloat64s":"f","SearchInts":"f","SearchStrings":"f","Slice":"f","SliceIsSorted":"f","SliceStable":"f","Sort":"f","Stable":"f","StringSlice":"t","StringSlice.Len":"m","StringSlice.Less":"m","StringSlice.Search":"m","StringSlice.Sort":"m","StringSlice.Swap":"m","Strings":"f","StringsAreSorted":"f"}},"strconv":{"path":"strconv","name":"strconv","symbols":{"AppendBool":"f","AppendFloat":"f","AppendInt":"f","AppendQuote":"f","AppendQuoteRune":"f","AppendQuoteRuneToASCII":"f","AppendQuoteRuneToGraphic":"f","AppendQuoteToASCII":"f","AppendQuoteToGraphic":"f","AppendUint":"f","Atoi":"f","CanBackquote":"f","ErrRange":"v","ErrSyntax":"v","FormatBool":"f","FormatComplex":"f","FormatFloat":"f","FormatInt":"f","FormatUint":"f","IntSize":"c","IsGraphic":"f","IsPrint":"f","Itoa":"f","NumError":"t","NumError.Error":"m","NumError.Unwrap":"m","ParseBool":"f","ParseComplex":"f","ParseFloat":"f","ParseInt":"f","ParseUint":"f","Quote":"f","QuoteRune":"f","QuoteRuneToASCII":"f","QuoteRuneToGraphic":"f","QuoteToASCII":"f","QuoteToGraphic":"f","QuotedPrefix":"f","Unquote":"f","UnquoteChar":"f"}},"strings":{"path":"strings","name":"strings","symbols":{"Builder":"t","Builder.Cap":"m","Builder.Grow":"m","Builder.Len":"m","Builder.Reset":"m","Builder.String":"m","Builder.Write":"m","Builder.WriteByte":"m","Builder.WriteRune":"m","Builder.WriteString":"m","Clone":"f","Compare":"f","Contains":"f","ContainsAny":"f","ContainsFunc":"f","ContainsRune":"f","Count":"f","Cut":"f","CutPrefix":"f","CutSuffix":"f","EqualFold":"f","Fields":"f","FieldsFunc":"f","FieldsFuncSeq":"f","FieldsSeq":"f","HasPrefix":"f","HasSuffix":"f","Index":"f","IndexAny":"f","IndexByte":"f","IndexFunc":"f","IndexRune":"f","Join":"f","LastIndex":"f","LastIndexAny":"f","LastIndexByte":"f","LastIndexFunc":"f","Lines":"f","Map":"f","NewReader":"f","NewReplacer":"f","Reader":"t","Reader.Len":"m","Reader.Read":"m","Reader.ReadAt":"m","Reader.ReadByte":"m","Reader.ReadRune":"m","Reader.Reset":"m","Reader.Seek":"m","Reader.Size":"m","Reader.UnreadByte":"m","Reader.UnreadRune":"m","Reader.WriteTo":"m","Repeat":"f","Replace":"f","ReplaceAll":"f","Replacer":"t","Replacer.Replace":"m","Replacer.WriteString":"m","Split":"f","SplitAfter":"f","SplitAfterN":"f","SplitAfterSeq":"f","SplitN":"f","SplitSeq":"f","Title":"f","ToLower":"f","ToLowerSpecial":"f","ToTitle":"f","ToTitleSpecial":"f","ToUpper":"f","ToUpperSpecial":"f","ToValidUTF8":"f","Trim":"f","TrimFunc":"f","TrimLeft":"f","TrimLeftFunc":"f","TrimPrefix":"f","TrimRight":"f","TrimRightFunc":"f","TrimSpace":"f","TrimSuffix":"f"}},"structs":{"path":"structs","name":"structs","symbols":{"HostLayout":"t"}},"sync":{"path":"sync","name":"sync","symbols":{"Cond":"t","Cond.Broadcast":"m","Cond.Signal":"m","Cond.Wait":"m","Locker":"t","Map":"t","Map.Clear":"m","Map.CompareAndDelete":"m","Map.CompareAndSwap":"m","Map.Delete":"m","Map.Load":"m","Map.LoadAndDelete":"m","Map.LoadOrStore":"m","Map.Range":"m","Map.Store":"m","Map.Swap":"m","Mutex":"t","Mutex.Lock":"m","Mutex.TryLock":"m","Mutex.Unlock":"m","NewCond":"f","Once":"t","Once.Do":"m","OnceFunc":"f","OnceValue":"f","OnceValues":"f","Pool":"t","Pool.Get":"m","Pool.Put":"m","RWMutex":"t","RWMutex.Lock":"m","RWMutex.RLock":"m","RWMutex.RLocker":"m","RWMutex.RUnlock":"m","RWMutex.TryLock":"m","RWMutex.TryRLock":"m","RWMutex.Unlock":"m","WaitGroup":"t","WaitGroup.Add":"m","WaitGroup.Done":"m","WaitGroup.Go":"m","WaitGroup.Wait":"m"}},"sync/atomic":{"path":"sync/atomic","name":"atomic","symbols":{"AddInt32":"f","AddInt64":"f","AddUint32":"f","AddUint64":"f","AddUintptr":"f","AndInt32":"f","AndInt64":"f","AndUint32":"f","AndUint64":"f","AndUintptr":"f","Bool":"t","Bool.CompareAndSwap":"m","Bool.Load":"m","Bool.Store":"m","Bool.Swap":"m","CompareAndSwapInt32":"f","CompareAndSwapInt64":"f","CompareAndSwapPointer":"f","CompareAndSwapUint32":"f","CompareAndSwapUint64":"f","CompareAndSwapUintptr":"f","Int32":"t","Int32.Add":"m","Int32.And":"m","Int32.CompareAndSwap":"m","Int32.Load":"m","Int32.Or":"m","Int32.Store":"m","Int32.Swap":"m","Int64":"t","Int64.Add":"m","Int64.And":"m","Int64.CompareAndSwap":"m","Int64.Load":"m","Int64.Or":"m","Int64.Store":"m","Int64.Swap":"m","LoadInt32":"f","LoadInt64":"f","LoadPointer":"f","LoadUint32":"f","LoadUint64":"f","LoadUintptr":"f","OrInt32":"f","OrInt64":"f","OrUint32":"f","OrUint64":"f","OrUintptr":"f","Pointer":"t","StoreInt32":"f","StoreInt64":"f","StorePointer":"f","StoreUint32":"f","StoreUint64":"f","StoreUintptr":"f","SwapInt32":"f","SwapInt64":"f","SwapPointer":"f","SwapUint32":"f","SwapUint64":"f","SwapUintptr":"f","Uint32":"t","Uint32.Add":"m","Uint32.And":"m","Uint32.CompareAndSwap":"m","Uint32.Load":"m","Uint32.Or":"m","Uint32.Store":"m","Uint32.Swap":"m","Uint64":"t","Uint64.Add":"m","Uint64.And":"m","Uint64.CompareAndSwap":"m","Uint64.Load":"m","Uint64.Or":"m","Uint64.Store":"m","Uint64.Swap":"m","Uintptr":"t","Uintptr.Add":"m","Uintptr.And":"m","Uintptr.CompareAndSwap":"m","Uintptr.Load":"m","Uintptr.Or":"m","Uintptr.Store":"m","Uintptr.Swap":"m","Value":"t","Value.CompareAndSwap":"m","Value.Load":"m","Value.Store":"m","Value.Swap":"m"}},"syscall":{"path":"syscall","name":"syscall","symbols":{"AF_ALG":"c","AF_APPLETALK":"c","AF_ASH":"c","AF_ATMPVC":"c","AF_ATMSVC":"c","AF_AX25":"c","AF_BLUETOOTH":"c","AF_BRIDGE":"c","AF_CAIF":"c","AF_CAN":"c","AF_DECnet":"c","AF_ECONET":"c","AF_FILE":"c","AF_IEEE802154":"c","AF_INET":"c","AF_INET6":"c","AF_IPX":"c","AF_IRDA":"c","AF_ISDN":"c","AF_IUCV":"c","AF_KEY":"c","AF_LLC":"c","AF_LOCAL":"c","AF_MAX":"c","AF_NETBEUI":"c","AF_NETLINK":"c","AF_NETROM":"c","AF_PACKET":"c","AF_PHONET":"c","AF_PPPOX":"c","AF_RDS":"c","AF_ROSE":"c","AF_ROUTE":"c","AF_RXRPC":"c","AF_SECURITY":"c","AF_SNA":"c","AF_TIPC":"c","AF_UNIX":"c","AF_UNSPEC":"c","AF_WANPIPE":"c","AF_X25":"c","ARPHRD_ADAPT":"c","ARPHRD_APPLETLK":"c","ARPHRD_ARCNET":"c","ARPHRD_ASH":"c","ARPHRD_ATM":"c","ARPHRD_AX25":"c","ARPHRD_BIF":"c","ARPHRD_CHAOS":"c","ARPHRD_CISCO":"c","ARPHRD_CSLIP":"c","ARPHRD_CSLIP6":"c","ARPHRD_DDCMP":"c","ARPHRD_DLCI":"c","ARPHRD_ECONET":"c","ARPHRD_EETHER":"c","ARPHRD_ETHER":"c","ARPHRD_EUI64":"c","ARPHRD_FCAL":"c","ARPHRD_FCFABRIC":"c","ARPHRD_FCPL":"c","ARPHRD_FCPP":"c","ARPHRD_FDDI":"c","ARPHRD_FRAD":"c","ARPHRD_HDLC":"c","ARPHRD_HIPPI":"c","ARPHRD_HWX25":"c","ARPHRD_IEEE1394":"c","ARPHRD_IEEE802":"c","ARPHRD_IEEE80211":"c","ARPHRD_IEEE80211_PRISM":"c","ARPHRD_IEEE80211_RADIOTAP":"c","ARPHRD_IEEE802154":"c","ARPHRD_IEEE802154_PHY":"c","ARPHRD_IEEE802_TR":"c","ARPHRD_INFINIBAND":"c","ARPHRD_IPDDP":"c","ARPHRD_IPGRE":"c","ARPHRD_IRDA":"c","ARPHRD_LAPB":"c","ARPHRD_LOCALTLK":"c","ARPHRD_LOOPBACK":"c","ARPHRD_METRICOM":"c","ARPHRD_NETROM":"c","ARPHRD_NONE":"c","ARPHRD_PIMREG":"c","ARPHRD_PPP":"c","ARPHRD_PRONET":"c","ARPHRD_RAWHDLC":"c","ARPHRD_ROSE":"c","ARPHRD_RSRVD":"c","ARPHRD_SIT":"c","ARPHRD_SKIP":"c","ARPHRD_SLIP":"c","ARPHRD_SLIP6":"c","ARPHRD_TUNNEL":"c","ARPHRD_TUNNEL6":"c","ARPHRD_VOID":"c","ARPHRD_X25":"c","Accept":"f","Accept4":"f","Access":"f","Acct":"f","Adjtimex":"f","AllThreadsSyscall":"f","AllThreadsSyscall6":"f","AttachLsf":"f","B0":"c","B1000000":"c","B110":"c","B115200":"c","B1152000":"c","B1200":"c","B134":"c","B150":"c","B1500000":"c","B1800":"c","B19200":"c","B200":"c","B2000000":"c","B230400":"c","B2400":"c","B2500000":"c","B300":"c","B3000000":"c","B3500000":"c","B38400":"c","B4000000":"c","B460800":"c","B4800":"c","B50":"c","B500000":"c","B57600":"c","B576000":"c","B600":"c","B75":"c","B921600":"c","B9600":"c","BPF_A":"c","BPF_ABS":"c","BPF_ADD":"c","BPF_ALU":"c","BPF_AND":"c","BPF_B":"c","BPF_DIV":"c","BPF_H":"c","BPF_IMM":"c","BPF_IND":"c","BPF_JA":"c","BPF_JEQ":"c","BPF_JGE":"c","BPF_JGT":"c","BPF_JMP":"c","BPF_JSET":"c","BPF_K":"c","BPF_LD":"c","BPF_LDX":"c","BPF_LEN":"c","BPF_LSH":"c","BPF_MAJOR_VERSION":"c","BPF_MAXINSNS":"c","BPF_MEM":"c","BPF_MEMWORDS":"c","BPF_MINOR_VERSION":"c","BPF_MISC":"c","BPF_MSH":"c","BPF_MUL":"c","BPF_NEG":"c","BPF_OR":"c","BPF_RET":"c","BPF_RSH":"c","BPF_ST":"c","BPF_STX":"c","BPF_SUB":"c","BPF_TAX":"c","BPF_TXA":"c","BPF_W":"c","BPF_X":"c","BRKINT":"c","Bind":"f","BindToDevice":"f","BytePtrFromString":"f","ByteSliceFromString":"f","CLOCAL":"c","CLONE_CHILD_CLEARTID":"c","CLONE_CHILD_SETTID":"c","CLONE_CLEAR_SIGHAND":"c","CLONE_DETACHED":"c","CLONE_FILES":"c","CLONE_FS":"c","CLONE_INTO_CGROUP":"c","CLONE_IO":"c","CLONE_NEWCGROUP":"c","CLONE_NEWIPC":"c","CLONE_NEWNET":"c","CLONE_NEWNS":"c","CLONE_NEWPID":"c","CLONE_NEWTIME":"c","CLONE_NEWUSER":"c","CLONE_NEWUTS":"c","CLONE_PARENT":"c","CLONE_PARENT_SETTID":"c","CLONE_PIDFD":"c","CLONE_PTRACE":"c","CLONE_SETTLS":"c","CLONE_SIGHAND":"c","CLONE_SYSVSEM":"c","CLONE_THREAD":"c","CLONE_UNTRACED":"c","CLONE_VFORK":"c","CLONE_VM":"c","CREAD":"c","CS5":"c","CS6":"c","CS7":"c","CS8":"c","CSIZE":"c","CSTOPB":"c","Chdir":"f","Chmod":"f","Chown":"f","Chroot":"f","Clearenv":"f","Close":"f","CloseOnExec":"f","CmsgLen":"f","CmsgSpace":"f","Cmsghdr":"t","Cmsghdr.SetLen":"m","Conn":"t","Connect":"f","Creat":"f","Credential":"t","DT_BLK":"c","DT_CHR":"c","DT_DIR":"c","DT_FIFO":"c","DT_LNK":"c","DT_REG":"c","DT_SOCK":"c","DT_UNKNOWN":"c","DT_WHT":"c","DetachLsf":"f","Dirent":"t","Dup":"f","Dup2":"f","Dup3":"f","E2BIG":"c","EACCES":"c","EADDRINUSE":"c","EADDRNOTAVAIL":"c","EADV":"c","EAFNOSUPPORT":"c","EAGAIN":"c","EALREADY":"c","EBADE":"c","EBADF":"c","EBADFD":"c","EBADMSG":"c","EBADR":"c","EBADRQC":"c","EBADSLT":"c","EBFONT":"c","EBUSY":"c","ECANCELED":"c","ECHILD":"c","ECHO":"c","ECHOCTL":"c","ECHOE":"c","ECHOK":"c","ECHOKE":"c","ECHONL":"c","ECHOPRT":"c","ECHRNG":"c","ECOMM":"c","ECONNABORTED":"c","ECONNREFUSED":"c","ECONNRESET":"c","EDEADLK":"c","EDEADLOCK":"c","EDESTADDRREQ":"c","EDOM":"c","EDOTDOT":"c","EDQUOT":"c","EEXIST":"c","EFAULT":"c","EFBIG":"c","EHOSTDOWN":"c","EHOSTUNREACH":"c","EIDRM":"c","EILSEQ":"c","EINPROGRESS":"c","EINTR":"c","EINVAL":"c","EIO":"c","EISCONN":"c","EISDIR":"c","EISNAM":"c","EKEYEXPIRED":"c","EKEYREJECTED":"c","EKEYREVOKED":"c","EL2HLT":"c","EL2NSYNC":"c","EL3HLT":"c","EL3RST":"c","ELIBACC":"c","ELIBBAD":"c","ELIBEXEC":"c","ELIBMAX":"c","ELIBSCN":"c","ELNRNG":"c","ELOOP":"c","EMEDIUMTYPE":"c","EMFILE":"c","EMLINK":"c","EMSGSIZE":"c","EMULTIHOP":"c","ENAMETOOLONG":"c","ENAVAIL":"c","ENETDOWN":"c","ENETRESET":"c","ENETUNREACH":"c","ENFILE":"c","ENOANO":"c","ENOBUFS":"c","ENOCSI":"c","ENODATA":"c","ENODEV":"c","ENOENT":"c","ENOEXEC":"c","ENOKEY":"c","ENOLCK":"c","ENOLINK":"c","ENOMEDIUM":"c","ENOMEM":"c","ENOMSG":"c","ENONET":"c","ENOPKG":"c","ENOPROTOOPT":"c","ENOSPC":"c","ENOSR":"c","ENOSTR":"c","ENOSYS":"c","ENOTBLK":"c","ENOTCONN":"c","ENOTDIR":"c","ENOTEMPTY":"c","ENOTNAM":"c","ENOTRECOVERABLE":"c","ENOTSOCK":"c","ENOTSUP":"c","ENOTTY":"c","ENOTUNIQ":"c","ENXIO":"c","EOPNOTSUPP":"c","EOVERFLOW":"c","EOWNERDEAD":"c","EPERM":"c","EPFNOSUPPORT":"c","EPIPE":"c","EPOLLERR":"c","EPOLLET":"c","EPOLLHUP":"c","EPOLLIN":"c","EPOLLMSG":"c","EPOLLONESHOT":"c","EPOLLOUT":"c","EPOLLPRI":"c","EPOLLRDBAND":"c","EPOLLRDHUP":"c","EPOLLRDNORM":"c","EPOLLWRBAND":"c","EPOLLWRNORM":"c","EPOLL_CLOEXEC":"c","EPOLL_CTL_ADD":"c","EPOLL_CTL_DEL":"c","EPOLL_CTL_MOD":"c","EPOLL_NONBLOCK":"c","EPROTO":"c","EPROTONOSUPPORT":"c","EPROTOTYPE":"c","ERANGE":"c","EREMCHG":"c","EREMOTE":"c","EREMOTEIO":"c","ERESTART":"c","ERFKILL":"c","EROFS":"c","ESHUTDOWN":"c","ESOCKTNOSUPPORT":"c","ESPIPE":"c","ESRCH":"c","ESRMNT":"c","ESTALE":"c","ESTRPIPE":"c","ETH_P_1588":"c","ETH_P_8021Q":"c","ETH_P_802_2":"c","ETH_P_802_3":"c","ETH_P_AARP":"c","ETH_P_ALL":"c","ETH_P_AOE":"c","ETH_P_ARCNET":"c","ETH_P_ARP":"c","ETH_P_ATALK":"c","ETH_P_ATMFATE":"c","ETH_P_ATMMPOA":"c","ETH_P_AX25":"c","ETH_P_BPQ":"c","ETH_P_CAIF":"c","ETH_P_CAN":"c","ETH_P_CONTROL":"c","ETH_P_CUST":"c","ETH_P_DDCMP":"c","ETH_P_DEC":"c","ETH_P_DIAG":"c","ETH_P_DNA_DL":"c","ETH_P_DNA_RC":"c","ETH_P_DNA_RT":"c","ETH_P_DSA":"c","ETH_P_ECONET":"c","ETH_P_EDSA":"c","ETH_P_FCOE":"c","ETH_P_FIP":"c","ETH_P_HDLC":"c","ETH_P_IEEE802154":"c","ETH_P_IEEEPUP":"c","ETH_P_IEEEPUPAT":"c","ETH_P_IP":"c","ETH_P_IPV6":"c","ETH_P_IPX":"c","ETH_P_IRDA":"c","ETH_P_LAT":"c","ETH_P_LINK_CTL":"c","ETH_P_LOCALTALK":"c","ETH_P_LOOP":"c","ETH_P_MOBITEX":"c","ETH_P_MPLS_MC":"c","ETH_P_MPLS_UC":"c","ETH_P_PAE":"c","ETH_P_PAUSE":"c","ETH_P_PHONET":"c","ETH_P_PPPTALK":"c","ETH_P_PPP_DISC":"c","ETH_P_PPP_MP":"c","ETH_P_PPP_SES":"c","ETH_P_PUP":"c","ETH_P_PUPAT":"c","ETH_P_RARP":"c","ETH_P_SCA":"c","ETH_P_SLOW":"c","ETH_P_SNAP":"c","ETH_P_TEB":"c","ETH_P_TIPC":"c","ETH_P_TRAILER":"c","ETH_P_TR_802_2":"c","ETH_P_WAN_PPP":"c","ETH_P_WCCP":"c","ETH_P_X25":"c","ETIME":"c","ETIMEDOUT":"c","ETOOMANYREFS":"c","ETXTBSY":"c","EUCLEAN":"c","EUNATCH":"c","EUSERS":"c","EWOULDBLOCK":"c","EXDEV":"c","EXFULL":"c","Environ":"f","EpollCreate":"f","EpollCreate1":"f","EpollCtl":"f","EpollEvent":"t","EpollWait":"f","Errno":"t","Errno.Error":"m","Errno.Is":"m","Errno.Temporary":"m","Errno.Timeout":"m","Exec":"f","Exit":"f","FD_CLOEXEC":"c","FD_SETSIZE":"c","FLUSHO":"c","F_DUPFD":"c","F_DUPFD_CLOEXEC":"c","F_EXLCK":"c","F_GETFD":"c","F_GETFL":"c","F_GETLEASE":"c","F_GETLK":"c","F_GETLK64":"c","F_GETOWN":"c","F_GETOWN_EX":"c","F_GETPIPE_SZ":"c","F_GETSIG":"c","F_LOCK":"c","F_NOTIFY":"c","F_OK":"c","F_RDLCK":"c","F_SETFD":"c","F_SETFL":"c","F_SETLEASE":"c","F_SETLK":"c","F_SETLK64":"c","F_SETLKW":"c","F_SETLKW64":"c","F_SETOWN":"c","F_SETOWN_EX":"c","F_SETPIPE_SZ":"c","F_SETSIG":"c","F_SHLCK":"c","F_TEST":"c","F_TLOCK":"c","F_ULOCK":"c","F_UNLCK":"c","F_WRLCK":"c","Faccessat":"f","Fallocate":"f","Fchdir":"f","Fchmod":"f","Fchmodat":"f","Fchown":"f","Fchownat":"f","FcntlFlock":"f","FdSet":"t","Fdatasync":"f","Flock":"f","Flock_t":"t","ForkExec":"f","ForkLock":"v","Fsid":"t","Fstat":"f","Fstatfs":"f","Fsync":"f","Ftruncate":"f","Futimes":"f","Futimesat":"f","Getcwd":"f","Getdents":"f","Getegid":"f","Getenv":"f","Geteuid":"f","Getgid":"f","Getgroups":"f","Getpagesize":"f","Getpeername":"f","Getpgid":"f","Getpgrp":"f","Getpid":"f","Getppid":"f","Getpriority":"f","Getrlimit":"f","Getrusage":"f","Getsockname":"f","GetsockoptICMPv6Filter":"f","GetsockoptIPMreq":"f","GetsockoptIPMreqn":"f","GetsockoptIPv6MTUInfo":"f","GetsockoptIPv6Mreq":"f","GetsockoptInet4Addr":"f","GetsockoptInt":"f","GetsockoptUcred":"f","Gettid":"f","Gettimeofday":"f","Getuid":"f","Getwd":"f","Getxattr":"f","HUPCL":"c","ICANON":"c","ICMPV6_FILTER":"c","ICMPv6Filter":"t","ICRNL":"c","IEXTEN":"c","IFA_ADDRESS":"c","IFA_ANYCAST":"c","IFA_BROADCAST":"c","IFA_CACHEINFO":"c","IFA_F_DADFAILED":"c","IFA_F_DEPRECATED":"c","IFA_F_HOMEADDRESS":"c","IFA_F_NODAD":"c","IFA_F_OPTIMISTIC":"c","IFA_F_PERMANENT":"c","IFA_F_SECONDARY":"c","IFA_F_TEMPORARY":"c","IFA_F_TENTATIVE":"c","IFA_LABEL":"c","IFA_LOCAL":"c","IFA_MAX":"c","IFA_MULTICAST":"c","IFA_UNSPEC":"c","IFF_ALLMULTI":"c","IFF_AUTOMEDIA":"c","IFF_BROADCAST":"c","IFF_DEBUG":"c","IFF_DYNAMIC":"c","IFF_LOOPBACK":"c","IFF_MASTER":"c","IFF_MULTICAST":"c","IFF_NOARP":"c","IFF_NOTRAILERS":"c","IFF_NO_PI":"c","IFF_ONE_QUEUE":"c","IFF_POINTOPOINT":"c","IFF_PORTSEL":"c","IFF_PROMISC":"c","IFF_RUNNING":"c","IFF_SLAVE":"c","IFF_TAP":"c","IFF_TUN":"c","IFF_TUN_EXCL":"c","IFF_UP":"c","IFF_VNET_HDR":"c","IFLA_ADDRESS":"c","IFLA_BROADCAST":"c","IFLA_COST":"c","IFLA_IFALIAS":"c","IFLA_IFNAME":"c","IFLA_LINK":"c","IFLA_LINKINFO":"c","IFLA_LINKMODE":"c","IFLA_MAP":"c","IFLA_MASTER":"c","IFLA_MAX":"c","IFLA_MTU":"c","IFLA_NET_NS_PID":"c","IFLA_OPERSTATE":"c","IFLA_PRIORITY":"c","IFLA_PROTINFO":"c","IFLA_QDISC":"c","IFLA_STATS":"c","IFLA_TXQLEN":"c","IFLA_UNSPEC":"c","IFLA_WEIGHT":"c","IFLA_WIRELESS":"c","IFNAMSIZ":"c","IGNBRK":"c","IGNCR":"c","IGNPAR":"c","IMAXBEL":"c","INLCR":"c","INPCK":"c","IN_ACCESS":"c","IN_ALL_EVENTS":"c","IN_ATTRIB":"c","IN_CLASSA_HOST":"c","IN_CLASSA_MAX":"c","IN_CLASSA_NET":"c","IN_CLASSA_NSHIFT":"c","IN_CLASSB_HOST":"c","IN_CLASSB_MAX":"c","IN_CLASSB_NET":"c","IN_CLASSB_NSHIFT":"c","IN_CLASSC_HOST":"c","IN_CLASSC_NET":"c","IN_CLASSC_NSHIFT":"c","IN_CLOEXEC":"c","IN_CLOSE":"c","IN_CLOSE_NOWRITE":"c","IN_CLOSE_WRITE":"c","IN_CREATE":"c","IN_DELETE":"c","IN_DELETE_SELF":"c","IN_DONT_FOLLOW":"c","IN_EXCL_UNLINK":"c","IN_IGNORED":"c","IN_ISDIR":"c","IN_LOOPBACKNET":"c","IN_MASK_ADD":"c","IN_MODIFY":"c","IN_MOVE":"c","IN_MOVED_FROM":"c","IN_MOVED_TO":"c","IN_MOVE_SELF":"c","IN_NONBLOCK":"c","IN_ONESHOT":"c","IN_ONLYDIR":"c","IN_OPEN":"c","IN_Q_OVERFLOW":"c","IN_UNMOUNT":"c","IPMreq":"t","IPMreqn":"t","IPPROTO_AH":"c","IPPROTO_COMP":"c","IPPROTO_DCCP":"c","IPPROTO_DSTOPTS":"c","IPPROTO_EGP":"c","IPPROTO_ENCAP":"c","IPPROTO_ESP":"c","IPPROTO_FRAGMENT":"c","IPPROTO_GRE":"c","IPPROTO_HOPOPTS":"c","IPPROTO_ICMP":"c","IPPROTO_ICMPV6":"c","IPPROTO_IDP":"c","IPPROTO_IGMP":"c","IPPROTO_IP":"c","IPPROTO_IPIP":"c","IPPROTO_IPV6":"c","IPPROTO_MTP":"c","IPPROTO_NONE":"c","IPPROTO_PIM":"c","IPPROTO_PUP":"c","IPPROTO_RAW":"c","IPPROTO_ROUTING":"c","IPPROTO_RSVP":"c","IPPROTO_SCTP":"c","IPPROTO_TCP":"c","IPPROTO_TP":"c","IPPROTO_UDP":"c","IPPROTO_UDPLITE":"c","IPV6_2292DSTOPTS":"c","IPV6_2292HOPLIMIT":"c","IPV6_2292HOPOPTS":"c","IPV6_2292PKTINFO":"c","IPV6_2292PKTOPTIONS":"c","IPV6_2292RTHDR":"c","IPV6_ADDRFORM":"c","IPV6_ADD_MEMBERSHIP":"c","IPV6_AUTHHDR":"c","IPV6_CHECKSUM":"c","IPV6_DROP_MEMBERSHIP":"c","IPV6_DSTOPTS":"c","IPV6_HOPLIMIT":"c","IPV6_HOPOPTS":"c","IPV6_IPSEC_POLICY":"c","IPV6_JOIN_ANYCAST":"c","IPV6_JOIN_GROUP":"c","IPV6_LEAVE_ANYCAST":"c","IPV6_LEAVE_GROUP":"c","IPV6_MTU":"c","IPV6_MTU_DISCOVER":"c","IPV6_MULTICAST_HOPS":"c","IPV6_MULTICAST_IF":"c","IPV6_MULTICAST_LOOP":"c","IPV6_NEXTHOP":"c","IPV6_PKTINFO":"c","IPV6_PMTUDISC_DO":"c","IPV6_PMTUDISC_DONT":"c","IPV6_PMTUDISC_PROBE":"c","IPV6_PMTUDISC_WANT":"c","IPV6_RECVDSTOPTS":"c","IPV6_RECVERR":"c","IPV6_RECVHOPLIMIT":"c","IPV6_RECVHOPOPTS":"c","IPV6_RECVPKTINFO":"c","IPV6_RECVRTHDR":"c","IPV6_RECVTCLASS":"c","IPV6_ROUTER_ALERT":"c","IPV6_RTHDR":"c","IPV6_RTHDRDSTOPTS":"c","IPV6_RTHDR_LOOSE":"c","IPV6_RTHDR_STRICT":"c","IPV6_RTHDR_TYPE_0":"c","IPV6_RXDSTOPTS":"c","IPV6_RXHOPOPTS":"c","IPV6_TCLASS":"c","IPV6_UNICAST_HOPS":"c","IPV6_V6ONLY":"c","IPV6_XFRM_POLICY":"c","IP_ADD_MEMBERSHIP":"c","IP_ADD_SOURCE_MEMBERSHIP":"c","IP_BLOCK_SOURCE":"c","IP_DEFAULT_MULTICAST_LOOP":"c","IP_DEFAULT_MULTICAST_TTL":"c","IP_DF":"c","IP_DROP_MEMBERSHIP":"c","IP_DROP_SOURCE_MEMBERSHIP":"c","IP_FREEBIND":"c","IP_HDRINCL":"c","IP_IPSEC_POLICY":"c","IP_MAXPACKET":"c","IP_MAX_MEMBERSHIPS":"c","IP_MF":"c","IP_MINTTL":"c","IP_MSFILTER":"c","IP_MSS":"c","IP_MTU":"c","IP_MTU_DISCOVER":"c","IP_MULTICAST_IF":"c","IP_MULTICAST_LOOP":"c","IP_MULTICAST_TTL":"c","IP_OFFMASK":"c","IP_OPTIONS":"c","IP_ORIGDSTADDR":"c","IP_PASSSEC":"c","IP_PKTINFO":"c","IP_PKTOPTIONS":"c","IP_PMTUDISC":"c","IP_PMTUDISC_DO":"c","IP_PMTUDISC_DONT":"c","IP_PMTUDISC_PROBE":"c","IP_PMTUDISC_WANT":"c","IP_RECVERR":"c","IP_RECVOPTS":"c","IP_RECVORIGDSTADDR":"c","IP_RECVRETOPTS":"c","IP_RECVTOS":"c","IP_RECVTTL":"c","IP_RETOPTS":"c","IP_RF":"c","IP_ROUTER_ALERT":"c","IP_TOS":"c","IP_TRANSPARENT":"c","IP_TTL":"c","IP_UNBLOCK_SOURCE":"c","IP_XFRM_POLICY":"c","IPv6MTUInfo":"t","IPv6Mreq":"t","ISIG":"c","ISTRIP":"c","IUCLC":"c","IUTF8":"c","IXANY":"c","IXOFF":"c","IXON":"c","IfAddrmsg":"t","IfInfomsg":"t","ImplementsGetwd":"c","Inet4Pktinfo":"t","Inet6Pktinfo":"t","InotifyAddWatch":"f","InotifyEvent":"t","InotifyInit":"f","InotifyInit1":"f","InotifyRmWatch":"f","Ioperm":"f","Iopl":"f","Iovec":"t","Iovec.SetLen":"m","Kill":"f","Klogctl":"f","LINUX_REBOOT_CMD_CAD_OFF":"c","LINUX_REBOOT_CMD_CAD_ON":"c","LINUX_REBOOT_CMD_HALT":"c","LINUX_REBOOT_CMD_KEXEC":"c","LINUX_REBOOT_CMD_POWER_OFF":"c","LINUX_REBOOT_CMD_RESTART":"c","LINUX_REBOOT_CMD_RESTART2":"c","LINUX_REBOOT_CMD_SW_SUSPEND":"c","LINUX_REBOOT_MAGIC1":"c","LINUX_REBOOT_MAGIC2":"c","LOCK_EX":"c","LOCK_NB":"c","LOCK_SH":"c","LOCK_UN":"c","Lchown":"f","Linger":"t","Link":"f","Listen":"f","Listxattr":"f","LsfJump":"f","LsfSocket":"f","LsfStmt":"f","Lstat":"f","MADV_DOFORK":"c","MADV_DONTFORK":"c","MADV_DONTNEED":"c","MADV_HUGEPAGE":"c","MADV_HWPOISON":"c","MADV_MERGEABLE":"c","MADV_NOHUGEPAGE":"c","MADV_NORMAL":"c","MADV_RANDOM":"c","MADV_REMOVE":"c","MADV_SEQUENTIAL":"c","MADV_UNMERGEABLE":"c","MADV_WILLNEED":"c","MAP_32BIT":"c","MAP_ANON":"c","MAP_ANONYMOUS":"c","MAP_DENYWRITE":"c","MAP_EXECUTABLE":"c","MAP_FILE":"c","MAP_FIXED":"c","MAP_GROWSDOWN":"c","MAP_HUGETLB":"c","MAP_LOCKED":"c","MAP_NONBLOCK":"c","MAP_NORESERVE":"c","MAP_POPULATE":"c","MAP_PRIVATE":"c","MAP_SHARED":"c","MAP_STACK":"c","MAP_TYPE":"c","MCL_CURRENT":"c","MCL_FUTURE":"c","MNT_DETACH":"c","MNT_EXPIRE":"c","MNT_FORCE":"c","MSG_CMSG_CLOEXEC":"c","MSG_CONFIRM":"c","MSG_CTRUNC":"c","MSG_DONTROUTE":"c","MSG_DONTWAIT":"c","MSG_EOR":"c","MSG_ERRQUEUE":"c","MSG_FASTOPEN":"c","MSG_FIN":"c","MSG_MORE":"c","MSG_NOSIGNAL":"c","MSG_OOB":"c","MSG_PEEK":"c","MSG_PROXY":"c","MSG_RST":"c","MSG_SYN":"c","MSG_TRUNC":"c","MSG_TRYHARD":"c","MSG_WAITALL":"c","MSG_WAITFORONE":"c","MS_ACTIVE":"c","MS_ASYNC":"c","MS_BIND":"c","MS_DIRSYNC":"c","MS_INVALIDATE":"c","MS_I_VERSION":"c","MS_KERNMOUNT":"c","MS_MANDLOCK":"c","MS_MGC_MSK":"c","MS_MGC_VAL":"c","MS_MOVE":"c","MS_NOATIME":"c","MS_NODEV":"c","MS_NODIRATIME":"c","MS_NOEXEC":"c","MS_NOSUID":"c","MS_NOUSER":"c","MS_POSIXACL":"c","MS_PRIVATE":"c","MS_RDONLY":"c","MS_REC":"c","MS_RELATIME":"c","MS_REMOUNT":"c","MS_RMT_MASK":"c","MS_SHARED":"c","MS_SILENT":"c","MS_SLAVE":"c","MS_STRICTATIME":"c","MS_SYNC":"c","MS_SYNCHRONOUS":"c","MS_UNBINDABLE":"c","Madvise":"f","Mkdir":"f","Mkdirat":"f","Mkfifo":"f","Mknod":"f","Mknodat":"f","Mlock":"f","Mlockall":"f","Mmap":"f","Mount":"f","Mprotect":"f","Msghdr":"t","Msghdr.SetControllen":"m","Munlock":"f","Munlockall":"f","Munmap":"f","NAME_MAX":"c","NETLINK_ADD_MEMBERSHIP":"c","NETLINK_AUDIT":"c","NETLINK_BROADCAST_ERROR":"c","NETLINK_CONNECTOR":"c","NETLINK_DNRTMSG":"c","NETLINK_DROP_MEMBERSHIP":"c","NETLINK_ECRYPTFS":"c","NETLINK_FIB_LOOKUP":"c","NETLINK_FIREWALL":"c","NETLINK_GENERIC":"c","NETLINK_INET_DIAG":"c","NETLINK_IP6_FW":"c","NETLINK_ISCSI":"c","NETLINK_KOBJECT_UEVENT":"c","NETLINK_NETFILTER":"c","NETLINK_NFLOG":"c","NETLINK_NO_ENOBUFS":"c","NETLINK_PKTINFO":"c","NETLINK_ROUTE":"c","NETLINK_SCSITRANSPORT":"c","NETLINK_SELINUX":"c","NETLINK_UNUSED":"c","NETLINK_USERSOCK":"c","NETLINK_XFRM":"c","NLA_ALIGNTO":"c","NLA_F_NESTED":"c","NLA_F_NET_BYTEORDER":"c","NLA_HDRLEN":"c","NLMSG_ALIGNTO":"c","NLMSG_DONE":"c","NLMSG_ERROR":"c","NLMSG_HDRLEN":"c","NLMSG_MIN_TYPE":"c","NLMSG_NOOP":"c","NLMSG_OVERRUN":"c","NLM_F_ACK":"c","NLM_F_APPEND":"c","NLM_F_ATOMIC":"c","NLM_F_CREATE":"c","NLM_F_DUMP":"c","NLM_F_ECHO":"c","NLM_F_EXCL":"c","NLM_F_MATCH":"c","NLM_F_MULTI":"c","NLM_F_REPLACE":"c","NLM_F_REQUEST":"c","NLM_F_ROOT":"c","NOFLSH":"c","Nanosleep":"f","NetlinkMessage":"t","NetlinkRIB":"f","NetlinkRouteAttr":"t","NetlinkRouteRequest":"t","NlAttr":"t","NlMsgerr":"t","NlMsghdr":"t","NsecToTimespec":"f","NsecToTimeval":"f","OCRNL":"c","OFDEL":"c","OFILL":"c","OLCUC":"c","ONLCR":"c","ONLRET":"c","ONOCR":"c","OPOST":"c","O_ACCMODE":"c","O_APPEND":"c","O_ASYNC":"c","O_CLOEXEC":"c","O_CREAT":"c","O_DIRECT":"c","O_DIRECTORY":"c","O_DSYNC":"c","O_EXCL":"c","O_FSYNC":"c","O_LARGEFILE":"c","O_NDELAY":"c","O_NOATIME":"c","O_NOCTTY":"c","O_NOFOLLOW":"c","O_NONBLOCK":"c","O_RDONLY":"c","O_RDWR":"c","O_RSYNC":"c","O_SYNC":"c","O_TRUNC":"c","O_WRONLY":"c","Open":"f","Openat":"f","PACKET_ADD_MEMBERSHIP":"c","PACKET_BROADCAST":"c","PACKET_DROP_MEMBERSHIP":"c","PACKET_FASTROUTE":"c","PACKET_HOST":"c","PACKET_LOOPBACK":"c","PACKET_MR_ALLMULTI":"c","PACKET_MR_MULTICAST":"c","PACKET_MR_PROMISC":"c","PACKET_MULTICAST":"c","PACKET_OTHERHOST":"c","PACKET_OUTGOING":"c","PACKET_RECV_OUTPUT":"c","PACKET_RX_RING":"c","PACKET_STATISTICS":"c","PARENB":"c","PARMRK":"c","PARODD":"c","PENDIN":"c","PRIO_PGRP":"c","PRIO_PROCESS":"c","PRIO_USER":"c","PROT_EXEC":"c","PROT_GROWSDOWN":"c","PROT_GROWSUP":"c","PROT_NONE":"c","PROT_READ":"c","PROT_WRITE":"c","PR_CAPBSET_DROP":"c","PR_CAPBSET_READ":"c","PR_ENDIAN_BIG":"c","PR_ENDIAN_LITTLE":"c","PR_ENDIAN_PPC_LITTLE":"c","PR_FPEMU_NOPRINT":"c","PR_FPEMU_SIGFPE":"c","PR_FP_EXC_ASYNC":"c","PR_FP_EXC_DISABLED":"c","PR_FP_EXC_DIV":"c","PR_FP_EXC_INV":"c","PR_FP_EXC_NONRECOV":"c","PR_FP_EXC_OVF":"c","PR_FP_EXC_PRECISE":"c","PR_FP_EXC_RES":"c","PR_FP_EXC_SW_ENABLE":"c","PR_FP_EXC_UND":"c","PR_GET_DUMPABLE":"c","PR_GET_ENDIAN":"c","PR_GET_FPEMU":"c","PR_GET_FPEXC":"c","PR_GET_KEEPCAPS":"c","PR_GET_NAME":"c","PR_GET_PDEATHSIG":"c","PR_GET_SECCOMP":"c","PR_GET_SECUREBITS":"c","PR_GET_TIMERSLACK":"c","PR_GET_TIMING":"c","PR_GET_TSC":"c","PR_GET_UNALIGN":"c","PR_MCE_KILL":"c","PR_MCE_KILL_CLEAR":"c","PR_MCE_KILL_DEFAULT":"c","PR_MCE_KILL_EARLY":"c","PR_MCE_KILL_GET":"c","PR_MCE_KILL_LATE":"c","PR_MCE_KILL_SET":"c","PR_SET_DUMPABLE":"c","PR_SET_ENDIAN":"c","PR_SET_FPEMU":"c","PR_SET_FPEXC":"c","PR_SET_KEEPCAPS":"c","PR_SET_NAME":"c","PR_SET_PDEATHSIG":"c","PR_SET_PTRACER":"c","PR_SET_SECCOMP":"c","PR_SET_SECUREBITS":"c","PR_SET_TIMERSLACK":"c","PR_SET_TIMING":"c","PR_SET_TSC":"c","PR_SET_UNALIGN":"c","PR_TASK_PERF_EVENTS_DISABLE":"c","PR_TASK_PERF_EVENTS_ENABLE":"c","PR_TIMING_STATISTICAL":"c","PR_TIMING_TIMESTAMP":"c","PR_TSC_ENABLE":"c","PR_TSC_SIGSEGV":"c","PR_UNALIGN_NOPRINT":"c","PR_UNALIGN_SIGBUS":"c","PTRACE_ARCH_PRCTL":"c","PTRACE_ATTACH":"c","PTRACE_CONT":"c","PTRACE_DETACH":"c","PTRACE_EVENT_CLONE":"c","PTRACE_EVENT_EXEC":"c","PTRACE_EVENT_EXIT":"c","PTRACE_EVENT_FORK":"c","PTRACE_EVENT_VFORK":"c","PTRACE_EVENT_VFORK_DONE":"c","PTRACE_GETEVENTMSG":"c","PTRACE_GETFPREGS":"c","PTRACE_GETFPXREGS":"c","PTRACE_GETREGS":"c","PTRACE_GETREGSET":"c","PTRACE_GETSIGINFO":"c","PTRACE_GET_THREAD_AREA":"c","PTRACE_KILL":"c","PTRACE_OLDSETOPTIONS":"c","PTRACE_O_MASK":"c","PTRACE_O_TRACECLONE":"c","PTRACE_O_TRACEEXEC":"c","PTRACE_O_TRACEEXIT":"c","PTRACE_O_TRACEFORK":"c","PTRACE_O_TRACESYSGOOD":"c","PTRACE_O_TRACEVFORK":"c","PTRACE_O_TRACEVFORKDONE":"c","PTRACE_PEEKDATA":"c","PTRACE_PEEKTEXT":"c","PTRACE_PEEKUSR":"c","PTRACE_POKEDATA":"c","PTRACE_POKETEXT":"c","PTRACE_POKEUSR":"c","PTRACE_SETFPREGS":"c","PTRACE_SETFPXREGS":"c","PTRACE_SETOPTIONS":"c","PTRACE_SETREGS":"c","PTRACE_SETREGSET":"c","PTRACE_SETSIGINFO":"c","PTRACE_SET_THREAD_AREA":"c","PTRACE_SINGLEBLOCK":"c","PTRACE_SINGLESTEP":"c","PTRACE_SYSCALL":"c","PTRACE_SYSEMU":"c","PTRACE_SYSEMU_SINGLESTEP":"c","PTRACE_TRACEME":"c","ParseDirent":"f","ParseNetlinkMessage":"f","ParseNetlinkRouteAttr":"f","ParseSocketControlMessage":"f","ParseUnixCredentials":"f","ParseUnixRights":"f","PathMax":"c","Pause":"f","Pipe":"f","Pipe2":"f","PivotRoot":"f","Pread":"f","ProcAttr":"t","PtraceAttach":"f","PtraceCont":"f","PtraceDetach":"f","PtraceGetEventMsg":"f","PtraceGetRegs":"f","PtracePeekData":"f","PtracePeekText":"f","PtracePokeData":"f","PtracePokeText":"f","PtraceRegs":"t","PtraceRegs.PC":"m","PtraceRegs.SetPC":"m","PtraceSetOptions":"f","PtraceSetRegs":"f","PtraceSingleStep":"f","PtraceSyscall":"f","Pwrite":"f","RLIMIT_AS":"c","RLIMIT_CORE":"c","RLIMIT_CPU":"c","RLIMIT_DATA":"c","RLIMIT_FSIZE":"c","RLIMIT_NOFILE":"c","RLIMIT_STACK":"c","RLIM_INFINITY":"c","RTAX_ADVMSS":"c","RTAX_CWND":"c","RTAX_FEATURES":"c","RTAX_FEATURE_ALLFRAG":"c","RTAX_FEATURE_ECN":"c","RTAX_FEATURE_SACK":"c","RTAX_FEATURE_TIMESTAMP":"c","RTAX_HOPLIMIT":"c","RTAX_INITCWND":"c","RTAX_INITRWND":"c","RTAX_LOCK":"c","RTAX_MAX":"c","RTAX_MTU":"c","RTAX_REORDERING":"c","RTAX_RTO_MIN":"c","RTAX_RTT":"c","RTAX_RTTVAR":"c","RTAX_SSTHRESH":"c","RTAX_UNSPEC":"c","RTAX_WINDOW":"c","RTA_ALIGNTO":"c","RTA_CACHEINFO":"c","RTA_DST":"c","RTA_FLOW":"c","RTA_GATEWAY":"c","RTA_IIF":"c","RTA_MAX":"c","RTA_METRICS":"c","RTA_MULTIPATH":"c","RTA_OIF":"c","RTA_PREFSRC":"c","RTA_PRIORITY":"c","RTA_SRC":"c","RTA_TABLE":"c","RTA_UNSPEC":"c","RTCF_DIRECTSRC":"c","RTCF_DOREDIRECT":"c","RTCF_LOG":"c","RTCF_MASQ":"c","RTCF_NAT":"c","RTCF_VALVE":"c","RTF_ADDRCLASSMASK":"c","RTF_ADDRCONF":"c","RTF_ALLONLINK":"c","RTF_BROADCAST":"c","RTF_CACHE":"c","RTF_DEFAULT":"c","RTF_DYNAMIC":"c","RTF_FLOW":"c","RTF_GATEWAY":"c","RTF_HOST":"c","RTF_INTERFACE":"c","RTF_IRTT":"c","RTF_LINKRT":"c","RTF_LOCAL":"c","RTF_MODIFIED":"c","RTF_MSS":"c","RTF_MTU":"c","RTF_MULTICAST":"c","RTF_NAT":"c","RTF_NOFORWARD":"c","RTF_NONEXTHOP":"c","RTF_NOPMTUDISC":"c","RTF_POLICY":"c","RTF_REINSTATE":"c","RTF_REJECT":"c","RTF_STATIC":"c","RTF_THROW":"c","RTF_UP":"c","RTF_WINDOW":"c","RTF_XRESOLVE":"c","RTM_BASE":"c","RTM_DELACTION":"c","RTM_DELADDR":"c","RTM_DELADDRLABEL":"c","RTM_DELLINK":"c","RTM_DELNEIGH":"c","RTM_DELQDISC":"c","RTM_DELROUTE":"c","RTM_DELRULE":"c","RTM_DELTCLASS":"c","RTM_DELTFILTER":"c","RTM_F_CLONED":"c","RTM_F_EQUALIZE":"c","RTM_F_NOTIFY":"c","RTM_F_PREFIX":"c","RTM_GETACTION":"c","RTM_GETADDR":"c","RTM_GETADDRLABEL":"c","RTM_GETANYCAST":"c","RTM_GETDCB":"c","RTM_GETLINK":"c","RTM_GETMULTICAST":"c","RTM_GETNEIGH":"c","RTM_GETNEIGHTBL":"c","RTM_GETQDISC":"c","RTM_GETROUTE":"c","RTM_GETRULE":"c","RTM_GETTCLASS":"c","RTM_GETTFILTER":"c","RTM_MAX":"c","RTM_NEWACTION":"c","RTM_NEWADDR":"c","RTM_NEWADDRLABEL":"c","RTM_NEWLINK":"c","RTM_NEWNDUSEROPT":"c","RTM_NEWNEIGH":"c","RTM_NEWNEIGHTBL":"c","RTM_NEWPREFIX":"c","RTM_NEWQDISC":"c","RTM_NEWROUTE":"c","RTM_NEWRULE":"c","RTM_NEWTCLASS":"c","RTM_NEWTFILTER":"c","RTM_NR_FAMILIES":"c","RTM_NR_MSGTYPES":"c","RTM_SETDCB":"c","RTM_SETLINK":"c","RTM_SETNEIGHTBL":"c","RTNH_ALIGNTO":"c","RTNH_F_DEAD":"c","RTNH_F_ONLINK":"c","RTNH_F_PERVASIVE":"c","RTNLGRP_IPV4_IFADDR":"c","RTNLGRP_IPV4_MROUTE":"c","RTNLGRP_IPV4_ROUTE":"c","RTNLGRP_IPV4_RULE":"c","RTNLGRP_IPV6_IFADDR":"c","RTNLGRP_IPV6_IFINFO":"c","RTNLGRP_IPV6_MROUTE":"c","RTNLGRP_IPV6_PREFIX":"c","RTNLGRP_IPV6_ROUTE":"c","RTNLGRP_IPV6_RULE":"c","RTNLGRP_LINK":"c","RTNLGRP_ND_USEROPT":"c","RTNLGRP_NEIGH":"c","RTNLGRP_NONE":"c","RTNLGRP_NOTIFY":"c","RTNLGRP_TC":"c","RTN_ANYCAST":"c","RTN_BLACKHOLE":"c","RTN_BROADCAST":"c","RTN_LOCAL":"c","RTN_MAX":"c","RTN_MULTICAST":"c","RTN_NAT":"c","RTN_PROHIBIT":"c","RTN_THROW":"c","RTN_UNICAST":"c","RTN_UNREACHABLE":"c","RTN_UNSPEC":"c","RTN_XRESOLVE":"c","RTPROT_BIRD":"c","RTPROT_BOOT":"c","RTPROT_DHCP":"c","RTPROT_DNROUTED":"c","RTPROT_GATED":"c","RTPROT_KERNEL":"c","RTPROT_MRT":"c","RTPROT_NTK":"c","RTPROT_RA":"c","RTPROT_REDIRECT":"c","RTPROT_STATIC":"c","RTPROT_UNSPEC":"c","RTPROT_XORP":"c","RTPROT_ZEBRA":"c","RT_CLASS_DEFAULT":"c","RT_CLASS_LOCAL":"c","RT_CLASS_MAIN":"c","RT_CLASS_MAX":"c","RT_CLASS_UNSPEC":"c","RT_SCOPE_HOST":"c","RT_SCOPE_LINK":"c","RT_SCOPE_NOWHERE":"c","RT_SCOPE_SITE":"c","RT_SCOPE_UNIVERSE":"c","RT_TABLE_COMPAT":"c","RT_TABLE_DEFAULT":"c","RT_TABLE_LOCAL":"c","RT_TABLE_MAIN":"c","RT_TABLE_MAX":"c","RT_TABLE_UNSPEC":"c","RUSAGE_CHILDREN":"c","RUSAGE_SELF":"c","RUSAGE_THREAD":"c","RawConn":"t","RawSockaddr":"t","RawSockaddrAny":"t","RawSockaddrInet4":"t","RawSockaddrInet6":"t","RawSockaddrLinklayer":"t","RawSockaddrNetlink":"t","RawSockaddrUnix":"t","RawSyscall":"f","RawSyscall6":"f","Read":"f","ReadDirent":"f","Readlink":"f","Reboot":"f","Recvfrom":"f","Recvmsg":"f","Removexattr":"f","Rename":"f","Renameat":"f","Rlimit":"t","Rmdir":"f","RtAttr":"t","RtGenmsg":"t","RtMsg":"t","RtNexthop":"t","Rusage":"t","SCM_CREDENTIALS":"c","SCM_RIGHTS":"c","SCM_TIMESTAMP":"c","SCM_TIMESTAMPING":"c","SCM_TIMESTAMPNS":"c","SHUT_RD":"c","SHUT_RDWR":"c","SHUT_WR":"c","SIGABRT":"c","SIGALRM":"c","SIGBUS":"c","SIGCHLD":"c","SIGCLD":"c","SIGCONT":"c","SIGFPE":"c","SIGHUP":"c","SIGILL":"c","SIGINT":"c","SIGIO":"c","SIGIOT":"c","SIGKILL":"c","SIGPIPE":"c","SIGPOLL":"c","SIGPROF":"c","SIGPWR":"c","SIGQUIT":"c","SIGSEGV":"c","SIGSTKFLT":"c","SIGSTOP":"c","SIGSYS":"c","SIGTERM":"c","SIGTRAP":"c","SIGTSTP":"c","SIGTTIN":"c","SIGTTOU":"c","SIGUNUSED":"c","SIGURG":"c","SIGUSR1":"c","SIGUSR2":"c","SIGVTALRM":"c","SIGWINCH":"c","SIGXCPU":"c","SIGXFSZ":"c","SIOCADDDLCI":"c","SIOCADDMULTI":"c","SIOCADDRT":"c","SIOCATMARK":"c","SIOCDARP":"c","SIOCDELDLCI":"c","SIOCDELMULTI":"c","SIOCDELRT":"c","SIOCDEVPRIVATE":"c","SIOCDIFADDR":"c","SIOCDRARP":"c","SIOCGARP":"c","SIOCGIFADDR":"c","SIOCGIFBR":"c","SIOCGIFBRDADDR":"c","SIOCGIFCONF":"c","SIOCGIFCOUNT":"c","SIOCGIFDSTADDR":"c","SIOCGIFENCAP":"c","SIOCGIFFLAGS":"c","SIOCGIFHWADDR":"c","SIOCGIFINDEX":"c","SIOCGIFMAP":"c","SIOCGIFMEM":"c","SIOCGIFMETRIC":"c","SIOCGIFMTU":"c","SIOCGIFNAME":"c","SIOCGIFNETMASK":"c","SIOCGIFPFLAGS":"c","SIOCGIFSLAVE":"c","SIOCGIFTXQLEN":"c","SIOCGPGRP":"c","SIOCGRARP":"c","SIOCGSTAMP":"c","SIOCGSTAMPNS":"c","SIOCPROTOPRIVATE":"c","SIOCRTMSG":"c","SIOCSARP":"c","SIOCSIFADDR":"c","SIOCSIFBR":"c","SIOCSIFBRDADDR":"c","SIOCSIFDSTADDR":"c","SIOCSIFENCAP":"c","SIOCSIFFLAGS":"c","SIOCSIFHWADDR":"c","SIOCSIFHWBROADCAST":"c","SIOCSIFLINK":"c","SIOCSIFMAP":"c","SIOCSIFMEM":"c","SIOCSIFMETRIC":"c","SIOCSIFMTU":"c","SIOCSIFNAME":"c","SIOCSIFNETMASK":"c","SIOCSIFPFLAGS":"c","SIOCSIFSLAVE":"c","SIOCSIFTXQLEN":"c","SIOCSPGRP":"c","SIOCSRARP":"c","SOCK_CLOEXEC":"c","SOCK_DCCP":"c","SOCK_DGRAM":"c","SOCK_NONBLOCK":"c","SOCK_PACKET":"c","SOCK_RAW":"c","SOCK_RDM":"c","SOCK_SEQPACKET":"c","SOCK_STREAM":"c","SOL_AAL":"c","SOL_ATM":"c","SOL_DECNET":"c","SOL_ICMPV6":"c","SOL_IP":"c","SOL_IPV6":"c","SOL_IRDA":"c","SOL_PACKET":"c","SOL_RAW":"c","SOL_SOCKET":"c","SOL_TCP":"c","SOL_X25":"c","SOMAXCONN":"c","SO_ACCEPTCONN":"c","SO_ATTACH_FILTER":"c","SO_BINDTODEVICE":"c","SO_BROADCAST":"c","SO_BSDCOMPAT":"c","SO_DEBUG":"c","SO_DETACH_FILTER":"c","SO_DOMAIN":"c","SO_DONTROUTE":"c","SO_ERROR":"c","SO_KEEPALIVE":"c","SO_LINGER":"c","SO_MARK":"c","SO_NO_CHECK":"c","SO_OOBINLINE":"c","SO_PASSCRED":"c","SO_PASSSEC":"c","SO_PEERCRED":"c","SO_PEERNAME":"c","SO_PEERSEC":"c","SO_PRIORITY":"c","SO_PROTOCOL":"c","SO_RCVBUF":"c","SO_RCVBUFFORCE":"c","SO_RCVLOWAT":"c","SO_RCVTIMEO":"c","SO_REUSEADDR":"c","SO_RXQ_OVFL":"c","SO_SECURITY_AUTHENTICATION":"c","SO_SECURITY_ENCRYPTION_NETWORK":"c","SO_SECURITY_ENCRYPTION_TRANSPORT":"c","SO_SNDBUF":"c","SO_SNDBUFFORCE":"c","SO_SNDLOWAT":"c","SO_SNDTIMEO":"c","SO_TIMESTAMP":"c","SO_TIMESTAMPING":"c","SO_TIMESTAMPNS":"c","SO_TYPE":"c","SYS_ACCEPT":"c","SYS_ACCEPT4":"c","SYS_ACCESS":"c","SYS_ACCT":"c","SYS_ADD_KEY":"c","SYS_ADJTIMEX":"c","SYS_AFS_SYSCALL":"c","SYS_ALARM":"c","SYS_ARCH_PRCTL":"c","SYS_BIND":"c","SYS_BRK":"c","SYS_CAPGET":"c","SYS_CAPSET":"c","SYS_CHDIR":"c","SYS_CHMOD":"c","SYS_CHOWN":"c","SYS_CHROOT":"c","SYS_CLOCK_GETRES":"c","SYS_CLOCK_GETTIME":"c","SYS_CLOCK_NANOSLEEP":"c","SYS_CLOCK_SETTIME":"c","SYS_CLONE":"c","SYS_CLOSE":"c","SYS_CONNECT":"c","SYS_CREAT":"c","SYS_CREATE_MODULE":"c","SYS_DELETE_MODULE":"c","SYS_DUP":"c","SYS_DUP2":"c","SYS_DUP3":"c","SYS_EPOLL_CREATE":"c","SYS_EPOLL_CREATE1":"c","SYS_EPOLL_CTL":"c","SYS_EPOLL_CTL_OLD":"c","SYS_EPOLL_PWAIT":"c","SYS_EPOLL_WAIT":"c","SYS_EPOLL_WAIT_OLD":"c","SYS_EVENTFD":"c","SYS_EVENTFD2":"c","SYS_EXECVE":"c","SYS_EXIT":"c","SYS_EXIT_GROUP":"c","SYS_FACCESSAT":"c","SYS_FADVISE64":"c","SYS_FALLOCATE":"c","SYS_FANOTIFY_INIT":"c","SYS_FANOTIFY_MARK":"c","SYS_FCHDIR":"c","SYS_FCHMOD":"c","SYS_FCHMODAT":"c","SYS_FCHOWN":"c","SYS_FCHOWNAT":"c","SYS_FCNTL":"c","SYS_FDATASYNC":"c","SYS_FGETXATTR":"c","SYS_FLISTXATTR":"c","SYS_FLOCK":"c","SYS_FORK":"c","SYS_FREMOVEXATTR":"c","SYS_FSETXATTR":"c","SYS_FSTAT":"c","SYS_FSTATFS":"c","SYS_FSYNC":"c","SYS_FTRUNCATE":"c","SYS_FUTEX":"c","SYS_FUTIMESAT":"c","SYS_GETCWD":"c","SYS_GETDENTS":"c","SYS_GETDENTS64":"c","SYS_GETEGID":"c","SYS_GETEUID":"c","SYS_GETGID":"c","SYS_GETGROUPS":"c","SYS_GETITIMER":"c","SYS_GETPEERNAME":"c","SYS_GETPGID":"c","SYS_GETPGRP":"c","SYS_GETPID":"c","SYS_GETPMSG":"c","SYS_GETPPID":"c","SYS_GETPRIORITY":"c","SYS_GETRESGID":"c","SYS_GETRESUID":"c","SYS_GETRLIMIT":"c","SYS_GETRUSAGE":"c","SYS_GETSID":"c","SYS_GETSOCKNAME":"c","SYS_GETSOCKOPT":"c","SYS_GETTID":"c","SYS_GETTIMEOFDAY":"c","SYS_GETUID":"c","SYS_GETXATTR":"c","SYS_GET_KERNEL_SYMS":"c","SYS_GET_MEMPOLICY":"c","SYS_GET_ROBUST_LIST":"c","SYS_GET_THREAD_AREA":"c","SYS_INIT_MODULE":"c","SYS_INOTIFY_ADD_WATCH":"c","SYS_INOTIFY_INIT":"c","SYS_INOTIFY_INIT1":"c","SYS_INOTIFY_RM_WATCH":"c","SYS_IOCTL":"c","SYS_IOPERM":"c","SYS_IOPL":"c","SYS_IOPRIO_GET":"c","SYS_IOPRIO_SET":"c","SYS_IO_CANCEL":"c","SYS_IO_DESTROY":"c","SYS_IO_GETEVENTS":"c","SYS_IO_SETUP":"c","SYS_IO_SUBMIT":"c","SYS_KEXEC_LOAD":"c","SYS_KEYCTL":"c","SYS_KILL":"c","SYS_LCHOWN":"c","SYS_LGETXATTR":"c","SYS_LINK":"c","SYS_LINKAT":"c","SYS_LISTEN":"c","SYS_LISTXATTR":"c","SYS_LLISTXATTR":"c","SYS_LOOKUP_DCOOKIE":"c","SYS_LREMOVEXATTR":"c","SYS_LSEEK":"c","SYS_LSETXATTR":"c","SYS_LSTAT":"c","SYS_MADVISE":"c","SYS_MBIND":"c","SYS_MIGRATE_PAGES":"c","SYS_MINCORE":"c","SYS_MKDIR":"c","SYS_MKDIRAT":"c","SYS_MKNOD":"c","SYS_MKNODAT":"c","SYS_MLOCK":"c","SYS_MLOCKALL":"c","SYS_MMAP":"c","SYS_MODIFY_LDT":"c","SYS_MOUNT":"c","SYS_MOVE_PAGES":"c","SYS_MPROTECT":"c","SYS_MQ_GETSETATTR":"c","SYS_MQ_NOTIFY":"c","SYS_MQ_OPEN":"c","SYS_MQ_TIMEDRECEIVE":"c","SYS_MQ_TIMEDSEND":"c","SYS_MQ_UNLINK":"c","SYS_MREMAP":"c","SYS_MSGCTL":"c","SYS_MSGGET":"c","SYS_MSGRCV":"c","SYS_MSGSND":"c","SYS_MSYNC":"c","SYS_MUNLOCK":"c","SYS_MUNLOCKALL":"c","SYS_MUNMAP":"c","SYS_NANOSLEEP":"c","SYS_NEWFSTATAT":"c","SYS_NFSSERVCTL":"c","SYS_OPEN":"c","SYS_OPENAT":"c","SYS_PAUSE":"c","SYS_PERF_EVENT_OPEN":"c","SYS_PERSONALITY":"c","SYS_PIPE":"c","SYS_PIPE2":"c","SYS_PIVOT_ROOT":"c","SYS_POLL":"c","SYS_PPOLL":"c","SYS_PRCTL":"c","SYS_PREAD64":"c","SYS_PREADV":"c","SYS_PRLIMIT64":"c","SYS_PSELECT6":"c","SYS_PTRACE":"c","SYS_PUTPMSG":"c","SYS_PWRITE64":"c","SYS_PWRITEV":"c","SYS_QUERY_MODULE":"c","SYS_QUOTACTL":"c","SYS_READ":"c","SYS_READAHEAD":"c","SYS_READLINK":"c","SYS_READLINKAT":"c","SYS_READV":"c","SYS_REBOOT":"c","SYS_RECVFROM":"c","SYS_RECVMMSG":"c","SYS_RECVMSG":"c","SYS_REMAP_FILE_PAGES":"c","SYS_REMOVEXATTR":"c","SYS_RENAME":"c","SYS_RENAMEAT":"c","SYS_REQUEST_KEY":"c","SYS_RESTART_SYSCALL":"c","SYS_RMDIR":"c","SYS_RT_SIGACTION":"c","SYS_RT_SIGPENDING":"c","SYS_RT_SIGPROCMASK":"c","SYS_RT_SIGQUEUEINFO":"c","SYS_RT_SIGRETURN":"c","SYS_RT_SIGSUSPEND":"c","SYS_RT_SIGTIMEDWAIT":"c","SYS_RT_TGSIGQUEUEINFO":"c","SYS_SCHED_GETAFFINITY":"c","SYS_SCHED_GETPARAM":"c","SYS_SCHED_GETSCHEDULER":"c","SYS_SCHED_GET_PRIORITY_MAX":"c","SYS_SCHED_GET_PRIORITY_MIN":"c","SYS_SCHED_RR_GET_INTERVAL":"c","SYS_SCHED_SETAFFINITY":"c","SYS_SCHED_SETPARAM":"c","SYS_SCHED_SETSCHEDULER":"c","SYS_SCHED_YIELD":"c","SYS_SECURITY":"c","SYS_SELECT":"c","SYS_SEMCTL":"c","SYS_SEMGET":"c","SYS_SEMOP":"c","SYS_SEMTIMEDOP":"c","SYS_SENDFILE":"c","SYS_SENDMSG":"c","SYS_SENDTO":"c","SYS_SETDOMAINNAME":"c","SYS_SETFSGID":"c","SYS_SETFSUID":"c","SYS_SETGID":"c","SYS_SETGROUPS":"c","SYS_SETHOSTNAME":"c","SYS_SETITIMER":"c","SYS_SETPGID":"c","SYS_SETPRIORITY":"c","SYS_SETREGID":"c","SYS_SETRESGID":"c","SYS_SETRESUID":"c","SYS_SETREUID":"c","SYS_SETRLIMIT":"c","SYS_SETSID":"c","SYS_SETSOCKOPT":"c","SYS_SETTIMEOFDAY":"c","SYS_SETUID":"c","SYS_SETXATTR":"c","SYS_SET_MEMPOLICY":"c","SYS_SET_ROBUST_LIST":"c","SYS_SET_THREAD_AREA":"c","SYS_SET_TID_ADDRESS":"c","SYS_SHMAT":"c","SYS_SHMCTL":"c","SYS_SHMDT":"c","SYS_SHMGET":"c","SYS_SHUTDOWN":"c","SYS_SIGALTSTACK":"c","SYS_SIGNALFD":"c","SYS_SIGNALFD4":"c","SYS_SOCKET":"c","SYS_SOCKETPAIR":"c","SYS_SPLICE":"c","SYS_STAT":"c","SYS_STATFS":"c","SYS_SWAPOFF":"c","SYS_SWAPON":"c","SYS_SYMLINK":"c","SYS_SYMLINKAT":"c","SYS_SYNC":"c","SYS_SYNC_FILE_RANGE":"c","SYS_SYSFS":"c","SYS_SYSINFO":"c","SYS_SYSLOG":"c","SYS_TEE":"c","SYS_TGKILL":"c","SYS_TIME":"c","SYS_TIMERFD_CREATE":"c","SYS_TIMERFD_GETTIME":"c","SYS_TIMERFD_SETTIME":"c","SYS_TIMER_CREATE":"c","SYS_TIMER_DELETE":"c","SYS_TIMER_GETOVERRUN":"c","SYS_TIMER_GETTIME":"c","SYS_TIMER_SETTIME":"c","SYS_TIMES":"c","SYS_TKILL":"c","SYS_TRUNCATE":"c","SYS_TUXCALL":"c","SYS_UMASK":"c","SYS_UMOUNT2":"c","SYS_UNAME":"c","SYS_UNLINK":"c","SYS_UNLINKAT":"c","SYS_UNSHARE":"c","SYS_USELIB":"c","SYS_USTAT":"c","SYS_UTIME":"c","SYS_UTIMENSAT":"c","SYS_UTIMES":"c","SYS_VFORK":"c","SYS_VHANGUP":"c","SYS_VMSPLICE":"c","SYS_VSERVER":"c","SYS_WAIT4":"c","SYS_WAITID":"c","SYS_WRITE":"c","SYS_WRITEV":"c","SYS__SYSCTL":"c","S_BLKSIZE":"c","S_IEXEC":"c","S_IFBLK":"c","S_IFCHR":"c","S_IFDIR":"c","S_IFIFO":"c","S_IFLNK":"c","S_IFMT":"c","S_IFREG":"c","S_IFSOCK":"c","S_IREAD":"c","S_IRGRP":"c","S_IROTH":"c","S_IRUSR":"c","S_IRWXG":"c","S_IRWXO":"c","S_IRWXU":"c","S_ISGID":"c","S_ISUID":"c","S_ISVTX":"c","S_IWGRP":"c","S_IWOTH":"c","S_IWRITE":"c","S_IWUSR":"c","S_IXGRP":"c","S_IXOTH":"c","S_IXUSR":"c","Seek":"f","Select":"f","Sendfile":"f","Sendmsg":"f","SendmsgN":"f","Sendto":"f","SetLsfPromisc":"f","SetNonblock":"f","Setdomainname":"f","Setegid":"f","Setenv":"f","Seteuid":"f","Setfsgid":"f","Setfsuid":"f","Setgid":"f","Setgroups":"f","Sethostname":"f","Setpgid":"f","Setpriority":"f","Setregid":"f","Setresgid":"f","Setresuid":"f","Setreuid":"f","Setrlimit":"f","Setsid":"f","SetsockoptByte":"f","SetsockoptICMPv6Filter":"f","SetsockoptIPMreq":"f","SetsockoptIPMreqn":"f","SetsockoptIPv6Mreq":"f","SetsockoptInet4Addr":"f","SetsockoptInt":"f","SetsockoptLinger":"f","SetsockoptString":"f","SetsockoptTimeval":"f","Settimeofday":"f","Setuid":"f","Setxattr":"f","Shutdown":"f","Signal":"t","Signal.Signal":"m","Signal.String":"m","SizeofCmsghdr":"c","SizeofICMPv6Filter":"c","SizeofIPMreq":"c","SizeofIPMreqn":"c","SizeofIPv6MTUInfo":"c","SizeofIPv6Mreq":"c","SizeofIfAddrmsg":"c","SizeofIfInfomsg":"c","SizeofInet4Pktinfo":"c","SizeofInet6Pktinfo":"c","SizeofInotifyEvent":"c","SizeofLinger":"c","SizeofMsghdr":"c","SizeofNlAttr":"c","SizeofNlMsgerr":"c","SizeofNlMsghdr":"c","SizeofRtAttr":"c","SizeofRtGenmsg":"c","SizeofRtMsg":"c","SizeofRtNexthop":"c","SizeofSockFilter":"c","SizeofSockFprog":"c","SizeofSockaddrAny":"c","SizeofSockaddrInet4":"c","SizeofSockaddrInet6":"c","SizeofSockaddrLinklayer":"c","SizeofSockaddrNetlink":"c","SizeofSockaddrUnix":"c","SizeofTCPInfo":"c","SizeofUcred":"c","SlicePtrFromStrings":"f","SockFilter":"t","SockFprog":"t","Sockaddr":"t","SockaddrInet4":"t","SockaddrInet6":"t","SockaddrLinklayer":"t","SockaddrNetlink":"t","SockaddrUnix":"t","Socket":"f","SocketControlMessage":"t","SocketDisableIPv6":"v","Socketpair":"f","Splice":"f","StartProcess":"f","Stat":"f","Stat_t":"t","Statfs":"f","Statfs_t":"t","Stderr":"v","Stdin":"v","Stdout":"v","StringBytePtr":"f","StringByteSlice":"f","StringSlicePtr":"f","Symlink":"f","Sync":"f","SyncFileRange":"f","SysProcAttr":"t","SysProcIDMap":"t","Syscall":"f","Syscall6":"f","Sysinfo":"f","Sysinfo_t":"t","TCGETS":"c","TCIFLUSH":"c","TCIOFLUSH":"c","TCOFLUSH":"c","TCPInfo":"t","TCP_CONGESTION":"c","TCP_CORK":"c","TCP_DEFER_ACCEPT":"c","TCP_INFO":"c","TCP_KEEPCNT":"c","TCP_KEEPIDLE":"c","TCP_KEEPINTVL":"c","TCP_LINGER2":"c","TCP_MAXSEG":"c","TCP_MAXWIN":"c","TCP_MAX_WINSHIFT":"c","TCP_MD5SIG":"c","TCP_MD5SIG_MAXKEYLEN":"c","TCP_MSS":"c","TCP_NODELAY":"c","TCP_QUICKACK":"c","TCP_SYNCNT":"c","TCP_WINDOW_CLAMP":"c","TCSETS":"c","TIOCCBRK":"c","TIOCCONS":"c","TIOCEXCL":"c","TIOCGDEV":"c","TIOCGETD":"c","TIOCGICOUNT":"c","TIOCGLCKTRMIOS":"c","TIOCGPGRP":"c","TIOCGPTN":"c","TIOCGRS485":"c","TIOCGSERIAL":"c","TIOCGSID":"c","TIOCGSOFTCAR":"c","TIOCGWINSZ":"c","TIOCINQ":"c","TIOCLINUX":"c","TIOCMBIC":"c","TIOCMBIS":"c","TIOCMGET":"c","TIOCMIWAIT":"c","TIOCMSET":"c","TIOCM_CAR":"c","TIOCM_CD":"c","TIOCM_CTS":"c","TIOCM_DSR":"c","TIOCM_DTR":"c","TIOCM_LE":"c","TIOCM_RI":"c","TIOCM_RNG":"c","TIOCM_RTS":"c","TIOCM_SR":"c","TIOCM_ST":"c","TIOCNOTTY":"c","TIOCNXCL":"c","TIOCOUTQ":"c","TIOCPKT":"c","TIOCPKT_DATA":"c","TIOCPKT_DOSTOP":"c","TIOCPKT_FLUSHREAD":"c","TIOCPKT_FLUSHWRITE":"c","TIOCPKT_IOCTL":"c","TIOCPKT_NOSTOP":"c","TIOCPKT_START":"c","TIOCPKT_STOP":"c","TIOCSBRK":"c","TIOCSCTTY":"c","TIOCSERCONFIG":"c","TIOCSERGETLSR":"c","TIOCSERGETMULTI":"c","TIOCSERGSTRUCT":"c","TIOCSERGWILD":"c","TIOCSERSETMULTI":"c","TIOCSERSWILD":"c","TIOCSER_TEMT":"c","TIOCSETD":"c","TIOCSIG":"c","TIOCSLCKTRMIOS":"c","TIOCSPGRP":"c","TIOCSPTLCK":"c","TIOCSRS485":"c","TIOCSSERIAL":"c","TIOCSSOFTCAR":"c","TIOCSTI":"c","TIOCSWINSZ":"c","TOSTOP":"c","TUNATTACHFILTER":"c","TUNDETACHFILTER":"c","TUNGETFEATURES":"c","TUNGETIFF":"c","TUNGETSNDBUF":"c","TUNGETVNETHDRSZ":"c","TUNSETDEBUG":"c","TUNSETGROUP":"c","TUNSETIFF":"c","TUNSETLINK":"c","TUNSETNOCSUM":"c","TUNSETOFFLOAD":"c","TUNSETOWNER":"c","TUNSETPERSIST":"c","TUNSETSNDBUF":"c","TUNSETTXFILTER":"c","TUNSETVNETHDRSZ":"c","Tee":"f","Termios":"t","Tgkill":"f","Time":"f","Time_t":"t","Times":"f","Timespec":"t","Timespec.Nano":"m","Timespec.Unix":"m","TimespecToNsec":"f","Timeval":"t","Timeval.Nano":"m","Timeval.Unix":"m","TimevalToNsec":"f","Timex":"t","Tms":"t","Truncate":"f","Ucred":"t","Umask":"f","Uname":"f","UnixCredentials":"f","UnixRights":"f","Unlink":"f","Unlinkat":"f","Unmount":"f","Unsetenv":"f","Unshare":"f","Ustat":"f","Ustat_t":"t","Utimbuf":"t","Utime":"f","Utimes":"f","UtimesNano":"f","Utsname":"t","VDISCARD":"c","VEOF":"c","VEOL":"c","VEOL2":"c","VERASE":"c","VINTR":"c","VKILL":"c","VLNEXT":"c","VMIN":"c","VQUIT":"c","VREPRINT":"c","VSTART":"c","VSTOP":"c","VSUSP":"c","VSWTC":"c","VTIME":"c","VWERASE":"c","WALL":"c","WCLONE":"c","WCONTINUED":"c","WEXITED":"c","WNOHANG":"c","WNOTHREAD":"c","WNOWAIT":"c","WORDSIZE":"c","WSTOPPED":"c","WUNTRACED":"c","Wait4":"f","WaitStatus":"t","WaitStatus.Continued":"m","WaitStatus.CoreDump":"m","WaitStatus.ExitStatus":"m","WaitStatus.Exited":"m","WaitStatus.Signal":"m","WaitStatus.Signaled":"m","WaitStatus.StopSignal":"m","WaitStatus.Stopped":"m","WaitStatus.TrapCause":"m","Write":"f","XCASE":"c"}},"testing":{"path":"testing","name":"testing","symbols":{"AllocsPerRun":"f","B":"t","B.Elapsed":"m","B.Loop":"m","B.ReportAllocs":"m","B.ReportMetric":"m","B.ResetTimer":"m","B.Run":"m","B.RunParallel":"m","B.SetBytes":"m","B.SetParallelism":"m","B.StartTimer":"m","B.StopTimer":"m","Benchmark":"f","BenchmarkResult":"t","BenchmarkResult.AllocedBytesPerOp":"m","BenchmarkResult.AllocsPerOp":"m","BenchmarkResult.MemString":"m","BenchmarkResult.NsPerOp":"m","BenchmarkResult.String":"m","Cover":"t","CoverBlock":"t","CoverMode":"f","Coverage":"f","F":"t","F.Add":"m","F.Fail":"m","F.Fuzz":"m","F.Helper":"m","F.Skipped":"m","Init":"f","InternalBenchmark":"t","InternalExample":"t","InternalFuzzTarget":"t","InternalTest":"t","M":"t","M.Run":"m","Main":"f","MainStart":"f","PB":"t","PB.Next":"m","RegisterCover":"f","RunBenchmarks":"f","RunExamples":"f","RunTests":"f","Short":"f","T":"t","T.Chdir":"m","T.Deadline":"m","T.Parallel":"m","T.Run":"m","T.Setenv":"m","TB":"t","Testing":"f","Verbose":"f"}},"testing/fstest":{"path":"testing/fstest","name":"fstest","symbols":{"MapFS":"t","MapFS.Glob":"m","MapFS.Lstat":"m","MapFS.Open":"m","MapFS.ReadDir":"m","MapFS.ReadFile":"m","MapFS.ReadLink":"m","MapFS.Stat":"m","MapFS.Sub":"m","MapFile":"t","TestFS":"f"}},"testing/iotest":{"path":"testing/iotest","name":"iotest","symbols":{"DataErrReader":"f","ErrReader":"f","ErrTimeout":"v","HalfReader":"f","NewReadLogger":"f","NewWriteLogger":"f","OneByteReader":"f","TestReader":"f","TimeoutReader":"f","TruncateWriter":"f"}},"testing/quick":{"path":"testing/quick","name":"quick","symbols":{"Check":"f","CheckEqual":"f","CheckEqualError":"t","CheckEqualError.Error":"m","CheckError":"t","CheckError.Error":"m","Config":"t","Generator":"t","SetupError":"t","SetupError.Error":"m","Value":"f"}},"testing/slogtest":{"path":"testing/slogtest","name":"slogtest","symbols":{"Run":"f","TestHandler":"f"}},"testing/synctest":{"path":"testing/synctest","name":"synctest","symbols":{"Test":"f","Wait":"f"}},"text/scanner":{"path":"text/scanner","name":"scanner","symbols":{"Char":"c","Comment":"c","EOF":"c","Float":"c","GoTokens":"c","GoWhitespace":"c","Ident":"c","Int":"c","Position":"t","Position.IsValid":"m","Position.String":"m","RawString":"c","ScanChars":"c","ScanComments":"c","ScanFloats":"c","ScanIdents":"c","ScanInts":"c","ScanRawStrings":"c","ScanStrings":"c","Scanner":"t","Scanner.Init":"m","Scanner.Next":"m","Scanner.Peek":"m","Scanner.Pos":"m","Scanner.Scan":"m","Scanner.TokenText":"m","SkipComments":"c","String":"c","TokenString":"f"}},"text/tabwriter":{"path":"text/tabwriter","name":"tabwriter","symbols":{"AlignRight":"c","Debug":"c","DiscardEmptyColumns":"c","Escape":"c","FilterHTML":"c","NewWriter":"f","StripEscape":"c","TabIndent":"c","Writer":"t","Writer.Flush":"m","Writer.Init":"m","Writer.Write":"m"}},"text/template":{"path":"text/template","name":"template","symbols":{"ExecError":"t","ExecError.Error":"m","ExecError.Unwrap":"m","FuncMap":"t","HTMLEscape":"f","HTMLEscapeString":"f","HTMLEscaper":"f","IsTrue":"f","JSEscape":"f","JSEscapeString":"f","JSEscaper":"f","Must":"f","New":"f","ParseFS":"f","ParseFiles":"f","ParseGlob":"f","Template":"t","Template.AddParseTree":"m","Template.Clone":"m","Template.DefinedTemplates":"m","Template.Delims":"m","Template.Execute":"m","Template.ExecuteTemplate":"m","Template.Funcs":"m","Template.Lookup":"m","Template.Name":"m","Template.New":"m","Template.Option":"m","Template.Parse":"m","Template.ParseFS":"m","Template.ParseFiles":"m","Template.ParseGlob":"m","Template.Templates":"m","URLQueryEscaper":"f"}},"text/template/parse":{"path":"text/template/parse","name":"parse","symbols":{"ActionNode":"t","ActionNode.Copy":"m","ActionNode.String":"m","BoolNode":"t","BoolNode.Copy":"m","BoolNode.String":"m","BranchNode":"t","BranchNode.Copy":"m","BranchNode.String":"m","BreakNode":"t","BreakNode.Copy":"m","BreakNode.String":"m","ChainNode":"t","ChainNode.Add":"m","ChainNode.Copy":"m","ChainNode.String":"m","CommandNode":"t","CommandNode.Copy":"m","CommandNode.String":"m","CommentNode":"t","CommentNode.Copy":"m","CommentNode.String":"m","ContinueNode":"t","ContinueNode.Copy":"m","ContinueNode.String":"m","DotNode":"t","DotNode.Copy":"m","DotNode.String":"m","DotNode.Type":"m","FieldNode":"t","FieldNode.Copy":"m","FieldNode.String":"m","IdentifierNode":"t","IdentifierNode.Copy":"m","IdentifierNode.SetPos":"m","IdentifierNode.SetTree":"m","IdentifierNode.String":"m","IfNode":"t","IfNode.Copy":"m","IsEmptyTree":"f","ListNode":"t","ListNode.Copy":"m","ListNode.CopyList":"m","ListNode.String":"m","Mode":"t","New":"f","NewIdentifier":"f","NilNode":"t","NilNode.Copy":"m","NilNode.String":"m","NilNode.Type":"m","Node":"t","NodeAction":"c","NodeBool":"c","NodeBreak":"c","NodeChain":"c","NodeCommand":"c","NodeComment":"c","NodeContinue":"c","NodeDot":"c","NodeField":"c","NodeIdentifier":"c","NodeIf":"c","NodeList":"c","NodeNil":"c","NodeNumber":"c","NodePipe":"c","NodeRange":"c","NodeString":"c","NodeTemplate":"c","NodeText":"c","NodeType":"t","NodeType.Type":"m","NodeVariable":"c","NodeWith":"c","NumberNode":"t","NumberNode.Copy":"m","NumberNode.String":"m","Parse":"f","ParseComments":"c","PipeNode":"t","PipeNode.Copy":"m","PipeNode.CopyPipe":"m","PipeNode.String":"m","Pos":"t","Pos.Position":"m","RangeNode":"t","RangeNode.Copy":"m","SkipFuncCheck":"c","StringNode":"t","StringNode.Copy":"m","StringNode.String":"m","TemplateNode":"t","TemplateNode.Copy":"m","TemplateNode.String":"m","TextNode":"t","TextNode.Copy":"m","TextNode.String":"m","Tree":"t","Tree.Copy":"m","Tree.ErrorContext":"m","Tree.Parse":"m","VariableNode":"t","VariableNode.Copy":"m","VariableNode.String":"m","WithNode":"t","WithNode.Copy":"m"}},"time":{"path":"time","name":"time","symbols":{"ANSIC":"c","After":"f","AfterFunc":"f","April":"c","August":"c","Date":"f","DateOnly":"c","DateTime":"c","December":"c","Duration":"t","Duration.Abs":"m","Duration.Hours":"m","Duration.Microseconds":"m","Duration.Milliseconds":"m","Duration.Minutes":"m","Duration.Nanoseconds":"m","Duration.Round":"m","Duration.Seconds":"m","Duration.String":"m","Duration.Truncate":"m","February":"c","FixedZone":"f","Friday":"c","Hour":"c","January":"c","July":"c","June":"c","Kitchen":"c","Layout":"c","LoadLocation":"f","LoadLocationFromTZData":"f","Local":"v","Location":"t","Location.String":"m","March":"c","May":"c","Microsecond":"c","Millisecond":"c","Minute":"c","Monday":"c","Month":"t","Month.String":"m","Nanosecond":"c","NewTicker":"f","NewTimer":"f","November":"c","Now":"f","October":"c","Parse":"f","ParseDuration":"f","ParseError":"t","ParseError.Error":"m","ParseInLocation":"f","RFC1123":"c","RFC1123Z":"c","RFC3339":"c","RFC3339Nano":"c","RFC822":"c","RFC822Z":"c","RFC850":"c","RubyDate":"c","Saturday":"c","Second":"c","September":"c","Since":"f","Sleep":"f","Stamp":"c","StampMicro":"c","StampMilli":"c","StampNano":"c","Sunday":"c","Thursday":"c","Tick":"f","Ticker":"t","Ticker.Reset":"m","Ticker.Stop":"m","Time":"t","Time.Add":"m","Time.AddDate":"m","Time.After":"m","Time.AppendBinary":"m","Time.AppendFormat":"m","Time.AppendText":"m","Time.Before":"m","Time.Clock":"m","Time.Compare":"m","Time.Date":"m","Time.Day":"m","Time.Equal":"m","Time.Format":"m","Time.GoString":"m","Time.GobDecode":"m","Time.GobEncode":"m","Time.Hour":"m","Time.ISOWeek":"m","Time.In":"m","Time.IsDST":"m","Time.IsZero":"m","Time.Local":"m","Time.Location":"m","Time.MarshalBinary":"m","Time.MarshalJSON":"m","Time.MarshalText":"m","Time.Minute":"m","Time.Month":"m","Time.Nanosecond":"m","Time.Round":"m","Time.Second":"m","Time.String":"m","Time.Sub":"m","Time.Truncate":"m","Time.UTC":"m","Time.Unix":"m","Time.UnixMicro":"m","Time.UnixMilli":"m","Time.UnixNano":"m","Time.UnmarshalBinary":"m","Time.UnmarshalJSON":"m","Time.UnmarshalText":"m","Time.Weekday":"m","Time.Year":"m","Time.YearDay":"m","Time.Zone":"m","Time.ZoneBounds":"m","TimeOnly":"c","Timer":"t","Timer.Reset":"m","Timer.Stop":"m","Tuesday":"c","UTC":"v","Unix":"f","UnixDate":"c","UnixMicro":"f","UnixMilli":"f","Until":"f","Wednesday":"c","Weekday":"t","Weekday.String":"m"}},"unicode":{"path":"unicode","name":"unicode","symbols":{"ASCII_Hex_Digit":"v","Adlam":"v","Ahom":"v","Anatolian_Hieroglyphs":"v","Arabic":"v","Armenian":"v","Avestan":"v","AzeriCase":"v","Balinese":"v","Bamum":"v","Bassa_Vah":"v","Batak":"v","Bengali":"v","Bhaiksuki":"v","Bidi_Control":"v","Bopomofo":"v","Brahmi":"v","Braille":"v","Buginese":"v","Buhid":"v","C":"v","Canadian_Aboriginal":"v","Carian":"v","CaseRange":"t","CaseRanges":"v","Categories":"v","CategoryAliases":"v","Caucasian_Albanian":"v","Cc":"v","Cf":"v","Chakma":"v","Cham":"v","Cherokee":"v","Chorasmian":"v","Cn":"v","Co":"v","Common":"v","Coptic":"v","Cs":"v","Cuneiform":"v","Cypriot":"v","Cypro_Minoan":"v","Cyrillic":"v","Dash":"v","Deprecated":"v","Deseret":"v","Devanagari":"v","Diacritic":"v","Digit":"v","Dives_Akuru":"v","Dogra":"v","Duployan":"v","Egyptian_Hieroglyphs":"v","Elbasan":"v","Elymaic":"v","Ethiopic":"v","Extender":"v","FoldCategory":"v","FoldScript":"v","Georgian":"v","Glagolitic":"v","Gothic":"v","Grantha":"v","GraphicRanges":"v","Greek":"v","Gujarati":"v","Gunjala_Gondi":"v","Gurmukhi":"v","Han":"v","Hangul":"v","Hanifi_Rohingya":"v","Hanunoo":"v","Hatran":"v","Hebrew":"v","Hex_Digit":"v","Hiragana":"v","Hyphen":"v","IDS_Binary_Operator":"v","IDS_Trinary_Operator":"v","Ideographic":"v","Imperial_Aramaic":"v","In":"f","Inherited":"v","Inscriptional_Pahlavi":"v","Inscriptional_Parthian":"v","Is":"f","IsControl":"f","IsDigit":"f","IsGraphic":"f","IsLetter":"f","IsLower":"f","IsMark":"f","IsNumber":"f","IsOneOf":"f","IsPrint":"f","IsPunct":"f","IsSpace":"f","IsSymbol":"f","IsTitle":"f","IsUpper":"f","Javanese":"v","Join_Control":"v","Kaithi":"v","Kannada":"v","Katakana":"v","Kawi":"v","Kayah_Li":"v","Kharoshthi":"v","Khitan_Small_Script":"v","Khmer":"v","Khojki":"v","Khudawadi":"v","L":"v","LC":"v","Lao":"v","Latin":"v","Lepcha":"v","Letter":"v","Limbu":"v","Linear_A":"v","Linear_B":"v","Lisu":"v","Ll":"v","Lm":"v","Lo":"v","Logical_Order_Exception":"v","Lower":"v","LowerCase":"c","Lt":"v","Lu":"v","Lycian":"v","Lydian":"v","M":"v","Mahajani":"v","Makasar":"v","Malayalam":"v","Mandaic":"v","Manichaean":"v","Marchen":"v","Mark":"v","Masaram_Gondi":"v","MaxASCII":"c","MaxCase":"c","MaxLatin1":"c","MaxRune":"c","Mc":"v","Me":"v","Medefaidrin":"v","Meetei_Mayek":"v","Mende_Kikakui":"v","Meroitic_Cursive":"v","Meroitic_Hieroglyphs":"v","Miao":"v","Mn":"v","Modi":"v","Mongolian":"v","Mro":"v","Multani":"v","Myanmar":"v","N":"v","Nabataean":"v","Nag_Mundari":"v","Nandinagari":"v","Nd":"v","New_Tai_Lue":"v","Newa":"v","Nko":"v","Nl":"v","No":"v","Noncharacter_Code_Point":"v","Number":"v","Nushu":"v","Nyiakeng_Puachue_Hmong":"v","Ogham":"v","Ol_Chiki":"v","Old_Hungarian":"v","Old_Italic":"v","Old_North_Arabian":"v","Old_Permic":"v","Old_Persian":"v","Old_Sogdian":"v","Old_South_Arabian":"v","Old_Turkic":"v","Old_Uyghur":"v","Oriya":"v","Osage":"v","Osmanya":"v","Other":"v","Other_Alphabetic":"v","Other_Default_Ignorable_Code_Point":"v","Other_Grapheme_Extend":"v","Other_ID_Continue":"v","Other_ID_Start":"v","Other_Lowercase":"v","Other_Math":"v","Other_Uppercase":"v","P":"v","Pahawh_Hmong":"v","Palmyrene":"v","Pattern_Syntax":"v","Pattern_White_Space":"v","Pau_Cin_Hau":"v","Pc":"v","Pd":"v","Pe":"v","Pf":"v","Phags_Pa":"v","Phoenician":"v","Pi":"v","Po":"v","Prepended_Concatenation_Mark":"v","PrintRanges":"v","Properties":"v","Ps":"v","Psalter_Pahlavi":"v","Punct":"v","Quotation_Mark":"v","Radical":"v","Range16":"t","Range32":"t","RangeTable":"t","Regional_Indicator":"v","Rejang":"v","ReplacementChar":"c","Runic":"v","S":"v","STerm":"v","Samaritan":"v","Saurashtra":"v","Sc":"v","Scripts":"v","Sentence_Terminal":"v","Sharada":"v","Shavian":"v","Siddham":"v","SignWriting":"v","SimpleFold":"f","Sinhala":"v","Sk":"v","Sm":"v","So":"v","Soft_Dotted":"v","Sogdian":"v","Sora_Sompeng":"v","Soyombo":"v","Space":"v","SpecialCase":"t","SpecialCase.ToLower":"m","SpecialCase.ToTitle":"m","SpecialCase.ToUpper":"m","Sundanese":"v","Syloti_Nagri":"v","Symbol":"v","Syriac":"v","Tagalog":"v","Tagbanwa":"v","Tai_Le":"v","Tai_Tham":"v","Tai_Viet":"v","Takri":"v","Tamil":"v","Tangsa":"v","Tangut":"v","Telugu":"v","Terminal_Punctuation":"v","Thaana":"v","Thai":"v","Tibetan":"v","Tifinagh":"v","Tirhuta":"v","Title":"v","TitleCase":"c","To":"f","ToLower":"f","ToTitle":"f","ToUpper":"f","Toto":"v","TurkishCase":"v","Ugaritic":"v","Unified_Ideograph":"v","Upper":"v","UpperCase":"c","UpperLower":"c","Vai":"v","Variation_Selector":"v","Version":"c","Vithkuqi":"v","Wancho":"v","Warang_Citi":"v","White_Space":"v","Yezidi":"v","Yi":"v","Z":"v","Zanabazar_Square":"v","Zl":"v","Zp":"v","Zs":"v"}},"unicode/utf16":{"path":"unicode/utf16","name":"utf16","symbols":{"AppendRune":"f","Decode":"f","DecodeRune":"f","Encode":"f","EncodeRune":"f","IsSurrogate":"f","RuneLen":"f"}},"unicode/utf8":{"path":"unicode/utf8","name":"utf8","symbols":{"AppendRune":"f","DecodeLastRune":"f","DecodeLastRuneInString":"f","DecodeRune":"f","DecodeRuneInString":"f","EncodeRune":"f","FullRune":"f","FullRuneInString":"f","MaxRune":"c","RuneCount":"f","RuneCountInString":"f","RuneError":"c","RuneLen":"f","RuneSelf":"c","RuneStart":"f","UTFMax":"c","Valid":"f","ValidRune":"f","ValidString":"f"}},"unique":{"path":"unique","name":"unique","symbols":{"Handle":"t","Make":"f"}},"unsafe":{"path":"unsafe","name":"unsafe","symbols":{"Add":"f","Alignof":"f","ArbitraryType":"t","IntegerType":"t","Offsetof":"f","Pointer":"t","Sizeof":"f","Slice":"f","SliceData":"f","String":"f","StringData":"f"}},"weak":{"path":"weak","name":"weak","symbols":{"Make":"f","Pointer":"t"}}} diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib_doclink.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib_doclink.go new file mode 100644 index 000000000..209a0c190 --- /dev/null +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/stdlib_doclink.go @@ -0,0 +1,319 @@ +// Package stdlib_doclink provides a checker for detecting potential doc links +// to standard library symbols. +package stdlib_doclink + +import ( + "fmt" + gdc "go/doc/comment" + "regexp" + "slices" + "strconv" + "strings" + + "github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal" + "github.com/godoc-lint/godoc-lint/pkg/model" + "github.com/godoc-lint/godoc-lint/pkg/util" +) + +// RequireStdlibDoclinkRule is the corresponding rule name. +const RequireStdlibDoclinkRule = model.RequireStdlibDoclinkRule + +var ruleSet = model.RuleSet{}.Add(RequireStdlibDoclinkRule) + +// StdlibDoclinkChecker checks for proper doc links to stdlib symbols. +type StdlibDoclinkChecker struct{} + +// NewStdlibDoclinkChecker returns a new instance of the corresponding checker. +func NewStdlibDoclinkChecker() *StdlibDoclinkChecker { + return &StdlibDoclinkChecker{} +} + +// GetCoveredRules implements the corresponding interface method. +func (r *StdlibDoclinkChecker) GetCoveredRules() model.RuleSet { + return ruleSet +} + +// Apply implements the corresponding interface method. +func (r *StdlibDoclinkChecker) Apply(actx *model.AnalysisContext) error { + includeTests := actx.Config.GetRuleOptions().RequireStdlibDoclinkIncludeTests + + docs := make(map[*model.CommentGroup]struct{}, 10*len(actx.InspectorResult.Files)) + + for _, ir := range util.AnalysisApplicableFiles(actx, includeTests, model.RuleSet{}.Add(RequireStdlibDoclinkRule)) { + if ir.PackageDoc != nil { + docs[ir.PackageDoc] = struct{}{} + } + + for _, sd := range ir.SymbolDecl { + if sd.ParentDoc != nil { + docs[sd.ParentDoc] = struct{}{} + } + if sd.Doc == nil { + continue + } + docs[sd.Doc] = struct{}{} + } + } + + if len(docs) == 0 { + return nil + } + + stdlib := stdlib() + pi := packageImports{ + importAsMap: make(map[string]string, 10), + badImportAs: make(map[string]struct{}, 10), + } + + for _, f := range actx.Pass.Files { + ft := util.GetPassFileToken(f, actx.Pass) + if ft == nil { + continue + } + + for _, imp := range f.Imports { + path, _ := strconv.Unquote(imp.Path.Value) + s, ok := stdlib[path] + if !ok { + // It's not a stdlib package. + continue + } + + var importedAs string + if imp.Name != nil { + alias := imp.Name.Name + if alias == "" || alias == "." || alias == "_" { + // We don't support _ or . imports. + continue + } + importedAs = alias + } else { + importedAs = s.Name + } + + if alreadyImportedPath, ok := pi.importAsMap[importedAs]; ok && alreadyImportedPath != path { + // Different import paths with the same alias(es); we don't support this case. + // It happens when people do aliasing like this: + // + // (foo.go) + // import blah "path/to/package" + // + // (bar.go) + // import blah "path/to/another/package" + // + // It's not inherently wrong, but due to the go doc tool's package-wide way of + // resolving package names in doc links (i.e. pkg in [pkg.name] or [pkg.recv.name]) + // it'll not work in such collision cases. As a result, doc links with colliding + // package aliases get rendered as plain text instead of links. + pi.badImportAs[importedAs] = struct{}{} + continue + } + + pi.importAsMap[importedAs] = path + } + } + + for doc := range docs { + checkStdlibDoclink(actx, &pi, doc) + } + return nil +} + +type packageImports struct { + importAsMap map[string]string + badImportAs map[string]struct{} +} + +func checkStdlibDoclink( + actx *model.AnalysisContext, + pi *packageImports, + doc *model.CommentGroup, +) { + if doc.DisabledRules.All || doc.DisabledRules.Rules.Has(RequireStdlibDoclinkRule) { + return + } + + applicableBlocks := make([]gdc.Block, 0, len(doc.Parsed.Content)) + for _, b := range doc.Parsed.Content { + if _, ok := b.(*gdc.Code); ok { + continue + } + // Doc links are not picked up in headings. + if _, ok := b.(*gdc.Heading); ok { + continue + } + applicableBlocks = append(applicableBlocks, b) + } + strippedCodeAndLinks := &gdc.Doc{ + Content: applicableBlocks, + } + text := string((&gdc.Printer{}).Comment(strippedCodeAndLinks)) + + pds := findPotentialDoclinks(pi, text) + if len(pds) == 0 { + return + } + + for _, pd := range pds { + var count string + if pd.count > 1 { + count = fmt.Sprintf(" (%d instances)", pd.count) + } + + actx.Pass.ReportRangef(&doc.CG, "text %q should be replaced with %q to link to stdlib %s%s", pd.originalNoStar, pd.doclink, kindTitle(pd.kind), count) + } +} + +func kindTitle(kind internal.SymbolKind) string { + switch kind { + case internal.SymbolKindType: + return "type" + case internal.SymbolKindFunc: + return "function" + case internal.SymbolKindVar: + return "variable" + case internal.SymbolKindConst: + return "constant" + case internal.SymbolKindMethod: + return "method" + default: + return "symbol" + } +} + +type potentialDoclink struct { + originalNoStar string // e.g. "encoding/json.Encoder" or "json.Encoder" (if imported as such) + count int + doclink string + kind internal.SymbolKind +} + +var potentialDoclinkRE = regexp.MustCompile(`(?m)(?:^|\s)(\*?)([a-zA-Z_][a-zA-Z0-9_]*(?:/[a-zA-Z_][a-zA-Z0-9_]*)*)\.([a-zA-Z0-9_]+)(?:\.([a-zA-Z0-9_]+))?\b`) + +func findPotentialDoclinks(pi *packageImports, text string) []potentialDoclink { + stdlib := stdlib() + + m := make(map[string]*potentialDoclink, 5) + + matches := potentialDoclinkRE.FindAllStringSubmatch(text, -1) + for _, match := range matches { + _ = match[1] // star, if any + pkg := match[2] + name1 := match[3] + name2 := match[4] + + if pkg != "" && name1 != "" && name2 != "" { + // pkg.recv.name (= pkg.name1.name2) + + path := pi.tryResolveImportPath(pkg) + if path == "" { + // Colliding import alias/name; skip. + continue + } + + s, ok := stdlib[path] + if !ok { + continue + } + + kind, ok := s.Symbols[name1+"."+name2] + if !ok { + continue + } + + originalNoStar := fmt.Sprintf("%s.%s.%s", pkg, name1, name2) + if _, ok := m[originalNoStar]; !ok { + doclink := fmt.Sprintf("[%s]", originalNoStar) + m[originalNoStar] = &potentialDoclink{ + originalNoStar: originalNoStar, + doclink: doclink, + kind: kind, + } + } + m[originalNoStar].count = m[originalNoStar].count + 1 + } else if pkg != "" && name1 != "" && name2 == "" { + // pkg.name (= pkg.name1) + + path := pi.tryResolveImportPath(pkg) + if path == "" { + // Colliding import alias/name; skip. + continue + } + + s, ok := stdlib[path] + if !ok { + continue + } + + kind, ok := s.Symbols[name1] + if !ok { + continue + } + + originalNoStar := fmt.Sprintf("%s.%s", pkg, name1) + if _, ok := m[originalNoStar]; !ok { + doclink := fmt.Sprintf("[%s]", originalNoStar) + m[originalNoStar] = &potentialDoclink{ + originalNoStar: originalNoStar, + doclink: doclink, + kind: kind, + } + } + m[originalNoStar].count = m[originalNoStar].count + 1 + } + } + + if len(m) == 0 { + return nil + } + + result := make([]potentialDoclink, 0, len(m)) + for _, v := range m { + result = append(result, *v) + } + slices.SortFunc(result, func(a, b potentialDoclink) int { + return strings.Compare(a.originalNoStar, b.originalNoStar) + }) + return result +} + +// tryResolveImportPath tries to resolve the given package alias/name to its +// import path (package-wide lookup of imports). If the alias/name was among the +// existing imports, the method will return the underlying import path; +// otherwise it'll return the given argument as is. +// +// If the package alias/name is among bad/colliding imports, an empty string is +// returned. +// +// When spotting potential doc links like "pkg.name" or "pkg.recv.name", we +// should resolve the "pkg" part to the underlying import path. Not only that +// users can have a totally new/unknown alias for a stdlib package import, like: +// +// import blah "encoding/json" +// +// they can also use another stdlib package's name as the alias, like: +// +// import fmt "encoding/json" +// +// This is obviously rare, but still a valid use of language. +// +// Additionally, when importing slashed package paths, like "encoding/json", +// the package will be available as "json" by default; i.e.: +// +// import "encoding/json" +// +// So, the actual package is not always evident from the import alias/name, so +// we need to carefully resolve the "pkg" part. +func (pi *packageImports) tryResolveImportPath(pkg string) string { + path, ok := pi.importAsMap[pkg] + if ok { + if _, isBad := pi.badImportAs[pkg]; isBad { + // We have different import paths with the same alias. + return "" + } + return path + } + + // Given "pkg" is not among existing imports. + return pkg +} diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/builder.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/builder.go index aa25cf186..7000669da 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/builder.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/builder.go @@ -260,6 +260,20 @@ func (cb *ConfigBuilder) build(cwd string) (*config, error) { } } + var maxLenIgnore []*regexp.Regexp + rawMaxLenIgnore := def.Options.MaxLenIgnorePatterns + if pcfg.Options != nil && pcfg.Options.MaxLenIgnorePatterns != nil { + rawMaxLenIgnore = pcfg.Options.MaxLenIgnorePatterns + } + if len(rawMaxLenIgnore) > 0 { + rs, invalids := toValidRegexpSlice(rawMaxLenIgnore) + if len(invalids) > 0 { + errs = append(errs, fmt.Errorf("invalid max-len ignore pattern(s): %q", invalids)) + } else { + maxLenIgnore = rs + } + } + if errs != nil { return nil, errors.Join(errs...) } @@ -274,10 +288,12 @@ func (cb *ConfigBuilder) build(cwd string) (*config, error) { // To avoid being too strict, we don't complain if a rule is enabled and disabled at the same time. resolvedOptions := &model.RuleOptions{} - transferOptions(resolvedOptions, def.Options) // def.Options is never nil + transferPrimitiveOptions(resolvedOptions, def.Options) // def.Options is never nil if pcfg.Options != nil { - transferOptions(resolvedOptions, pcfg.Options) + transferPrimitiveOptions(resolvedOptions, pcfg.Options) } + resolvedOptions.MaxLenIgnorePatterns = maxLenIgnore + result.options = resolvedOptions return result, nil @@ -287,3 +303,25 @@ func (cb *ConfigBuilder) build(cwd string) (*config, error) { func (cb *ConfigBuilder) SetOverride(override *model.ConfigOverride) { cb.override = override } + +func transferPrimitiveOptions(target *model.RuleOptions, source *PlainRuleOptions) { + transferIfNotNil(&target.MaxLenLength, source.MaxLenLength) + transferIfNotNil(&target.MaxLenIncludeTests, source.MaxLenIncludeTests) + transferIfNotNil(&target.PkgDocIncludeTests, source.PkgDocIncludeTests) + transferIfNotNil(&target.SinglePkgDocIncludeTests, source.SinglePkgDocIncludeTests) + transferIfNotNil(&target.RequirePkgDocIncludeTests, source.RequirePkgDocIncludeTests) + transferIfNotNil(&target.RequireDocIncludeTests, source.RequireDocIncludeTests) + transferIfNotNil(&target.RequireDocIgnoreExported, source.RequireDocIgnoreExported) + transferIfNotNil(&target.RequireDocIgnoreUnexported, source.RequireDocIgnoreUnexported) + transferIfNotNil(&target.StartWithNameIncludeTests, source.StartWithNameIncludeTests) + transferIfNotNil(&target.StartWithNameIncludeUnexported, source.StartWithNameIncludeUnexported) + transferIfNotNil(&target.RequireStdlibDoclinkIncludeTests, source.RequireStdlibDoclinkIncludeTests) + transferIfNotNil(&target.NoUnusedLinkIncludeTests, source.NoUnusedLinkIncludeTests) +} + +func transferIfNotNil[T any](dst *T, src *T) { + if src == nil { + return + } + *dst = *src +} diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/default.yaml b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/default.yaml index eb244e771..967897836 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/default.yaml +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/default.yaml @@ -4,6 +4,7 @@ default: basic options: max-len/length: 77 max-len/include-tests: false + max-len/ignore-patterns: [] pkg-doc/include-tests: false single-pkg-doc/include-tests: false require-pkg-doc/include-tests: false @@ -12,4 +13,5 @@ options: require-doc/ignore-unexported: true start-with-name/include-tests: false start-with-name/include-unexported: false + require-stdlib-doclink/include-tests: false no-unused-link/include-tests: false \ No newline at end of file diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/parser.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/parser.go index 71a04f045..3db9398c2 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/parser.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/parser.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) // FromYAML parses configuration from given YAML content. diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/plain.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/plain.go index d19323f3f..0ff094855 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/config/plain.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/config/plain.go @@ -3,7 +3,6 @@ package config import ( "errors" "fmt" - "reflect" "regexp" "slices" @@ -25,54 +24,19 @@ type PlainConfig struct { // PlainRuleOptions represents the plain rule options as users would provide via // a config file (e.g., a YAML file). type PlainRuleOptions struct { - MaxLenLength *uint `option:"max-len/length" yaml:"max-len/length" mapstructure:"max-len/length"` - MaxLenIncludeTests *bool `option:"max-len/include-tests" yaml:"max-len/include-tests" mapstructure:"max-len/include-tests"` - PkgDocIncludeTests *bool `option:"pkg-doc/include-tests" yaml:"pkg-doc/include-tests" mapstructure:"pkg-doc/include-tests"` - SinglePkgDocIncludeTests *bool `option:"single-pkg-doc/include-tests" yaml:"single-pkg-doc/include-tests" mapstructure:"single-pkg-doc/include-tests"` - RequirePkgDocIncludeTests *bool `option:"require-pkg-doc/include-tests" yaml:"require-pkg-doc/include-tests" mapstructure:"require-pkg-doc/include-tests"` - RequireDocIncludeTests *bool `option:"require-doc/include-tests" yaml:"require-doc/include-tests" mapstructure:"require-doc/include-tests"` - RequireDocIgnoreExported *bool `option:"require-doc/ignore-exported" yaml:"require-doc/ignore-exported" mapstructure:"require-doc/ignore-exported"` - RequireDocIgnoreUnexported *bool `option:"require-doc/ignore-unexported" yaml:"require-doc/ignore-unexported" mapstructure:"require-doc/ignore-unexported"` - StartWithNameIncludeTests *bool `option:"start-with-name/include-tests" yaml:"start-with-name/include-tests" mapstructure:"start-with-name/include-tests"` - StartWithNameIncludeUnexported *bool `option:"start-with-name/include-unexported" yaml:"start-with-name/include-unexported" mapstructure:"start-with-name/include-unexported"` - NoUnusedLinkIncludeTests *bool `option:"no-unused-link/include-tests" yaml:"no-unused-link/include-tests" mapstructure:"no-unused-link/include-tests"` -} - -func transferOptions(target *model.RuleOptions, source *PlainRuleOptions) { - resV := reflect.ValueOf(target).Elem() - resVT := resV.Type() - - resOptionMap := make(map[string]string, resVT.NumField()) - for i := range resVT.NumField() { - ft := resVT.Field(i) - key, ok := ft.Tag.Lookup("option") - if !ok { - continue - } - resOptionMap[key] = ft.Name - } - - v := reflect.ValueOf(source).Elem() - vt := v.Type() - for i := range vt.NumField() { - ft := vt.Field(i) - key, ok := ft.Tag.Lookup("option") - if !ok { - continue - } - if ft.Type.Kind() != reflect.Pointer { - continue - } - f := v.Field(i) - if f.IsNil() { - continue - } - resFieldName, ok := resOptionMap[key] - if !ok { - continue - } - resV.FieldByName(resFieldName).Set(f.Elem()) - } + MaxLenLength *uint `yaml:"max-len/length" mapstructure:"max-len/length"` + MaxLenIncludeTests *bool `yaml:"max-len/include-tests" mapstructure:"max-len/include-tests"` + MaxLenIgnorePatterns []string `yaml:"max-len/ignore-patterns" mapstructure:"max-len/ignore-patterns"` + PkgDocIncludeTests *bool `yaml:"pkg-doc/include-tests" mapstructure:"pkg-doc/include-tests"` + SinglePkgDocIncludeTests *bool `yaml:"single-pkg-doc/include-tests" mapstructure:"single-pkg-doc/include-tests"` + RequirePkgDocIncludeTests *bool `yaml:"require-pkg-doc/include-tests" mapstructure:"require-pkg-doc/include-tests"` + RequireDocIncludeTests *bool `yaml:"require-doc/include-tests" mapstructure:"require-doc/include-tests"` + RequireDocIgnoreExported *bool `yaml:"require-doc/ignore-exported" mapstructure:"require-doc/ignore-exported"` + RequireDocIgnoreUnexported *bool `yaml:"require-doc/ignore-unexported" mapstructure:"require-doc/ignore-unexported"` + StartWithNameIncludeTests *bool `yaml:"start-with-name/include-tests" mapstructure:"start-with-name/include-tests"` + StartWithNameIncludeUnexported *bool `yaml:"start-with-name/include-unexported" mapstructure:"start-with-name/include-unexported"` + RequireStdlibDoclinkIncludeTests *bool `yaml:"require-stdlib-doclink/include-tests" mapstructure:"require-stdlib-doclink/include-tests"` + NoUnusedLinkIncludeTests *bool `yaml:"no-unused-link/include-tests" mapstructure:"no-unused-link/include-tests"` } // Validate validates the plain configuration. @@ -101,6 +65,12 @@ func (pcfg *PlainConfig) Validate() error { errs = append(errs, fmt.Errorf("invalid exclusion pattern(s): %q", invalids)) } + if pcfg.Options != nil { + if invalids := getInvalidRegexps(pcfg.Options.MaxLenIgnorePatterns); len(invalids) > 0 { + errs = append(errs, fmt.Errorf("invalid max-len ignore pattern(s): %q", invalids)) + } + } + if len(errs) > 0 { return errors.Join(errs...) } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/inspect/inspector.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/inspect/inspector.go index 0040be0e0..11e41c426 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/inspect/inspector.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/inspect/inspector.go @@ -42,7 +42,7 @@ func NewInspector(cb model.ConfigBuilder, exitFunc func(int, error)) *Inspector Name: metaName, Doc: metaDoc, URL: metaURL, - ResultType: reflect.TypeOf(new(model.InspectorResult)), + ResultType: reflect.TypeFor[*model.InspectorResult](), }, } result.analyzer.Run = result.run @@ -107,12 +107,24 @@ func (i *Inspector) run(pass *analysis.Pass) (any, error) { for _, d := range f.Decls { switch dt := d.(type) { case *ast.FuncDecl: + var recvBaseTypeName string + var isMethod bool + + if dt.Recv != nil { + isMethod = true + if len(dt.Recv.List) > 0 { + recvBaseTypeName = extractMethodRecvBaseTypeName(dt.Recv.List[0].Type) + } + } + decls = append(decls, model.SymbolDecl{ - Decl: d, - Kind: model.SymbolDeclKindFunc, - Name: dt.Name.Name, - Ident: dt.Name, - Doc: i.extractCommentGroup(dt.Doc), + Decl: d, + Kind: model.SymbolDeclKindFunc, + Name: dt.Name.Name, + Ident: dt.Name, + IsMethod: isMethod, + MethodRecvBaseTypeName: recvBaseTypeName, + Doc: i.extractCommentGroup(dt.Doc), }) case *ast.BadDecl: decls = append(decls, model.SymbolDecl{ @@ -310,3 +322,17 @@ func extractDisableDirectivesInComment(s string) model.InspectorResultDisableRul } return result } + +func extractMethodRecvBaseTypeName(expr ast.Expr) string { + switch tt := expr.(type) { + case *ast.Ident: + return tt.Name + case *ast.StarExpr: + return extractMethodRecvBaseTypeName(tt.X) + case *ast.IndexExpr: + return extractMethodRecvBaseTypeName(tt.X) + case *ast.IndexListExpr: + return extractMethodRecvBaseTypeName(tt.X) + } + return "" +} diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/config.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/config.go index 78fa62a27..5ba271a3c 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/config.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/config.go @@ -109,15 +109,17 @@ type Config interface { // RuleOptions represents individual linter rule configurations. type RuleOptions struct { - MaxLenLength uint `option:"max-len/length"` - MaxLenIncludeTests bool `option:"max-len/include-tests"` - PkgDocIncludeTests bool `option:"pkg-doc/include-tests"` - SinglePkgDocIncludeTests bool `option:"single-pkg-doc/include-tests"` - RequirePkgDocIncludeTests bool `option:"require-pkg-doc/include-tests"` - RequireDocIncludeTests bool `option:"require-doc/include-tests"` - RequireDocIgnoreExported bool `option:"require-doc/ignore-exported"` - RequireDocIgnoreUnexported bool `option:"require-doc/ignore-unexported"` - StartWithNameIncludeTests bool `option:"start-with-name/include-tests"` - StartWithNameIncludeUnexported bool `option:"start-with-name/include-unexported"` - NoUnusedLinkIncludeTests bool `option:"no-unused-link/include-tests"` + MaxLenLength uint + MaxLenIncludeTests bool + MaxLenIgnorePatterns []*regexp.Regexp + PkgDocIncludeTests bool + SinglePkgDocIncludeTests bool + RequirePkgDocIncludeTests bool + RequireDocIncludeTests bool + RequireDocIgnoreExported bool + RequireDocIgnoreUnexported bool + StartWithNameIncludeTests bool + StartWithNameIncludeUnexported bool + RequireStdlibDoclinkIncludeTests bool + NoUnusedLinkIncludeTests bool } diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/inspector.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/inspector.go index 3166e17fa..9b4846634 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/inspector.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/inspector.go @@ -71,12 +71,40 @@ type SymbolDecl struct { // This is always false for non-type declaration (e.g., const or var). IsTypeAlias bool + // IsMethod indicates whether the symbol is a method. For example: + // + // func (Foo) Bar() {} + // func (*Foo) Bar() {} + // func (Foo[T]) Bar() {} + // func (*Foo[T]) Bar() {} + // + // This field is false for non-function declarations. + IsMethod bool + // Name is the name of the declared symbol. Name string // Ident is the symbol identifier node. Ident *ast.Ident + // MethodRecvBaseTypeName is the base type name of the method receiver, if + // the symbol is a method (See [Go spec]). + // + // Note that although an empty value is unexpected for method declarations, + // it's still possible (e.g. due to new language features that we don't yet + // support). So, users of this field should always check for empty values. + // + // In the examples below the base type name is "Foo": + // + // func (Foo) Bar() {} + // func (*Foo) Bar() {} + // func (Foo[T]) BarFoo() {} + // + // This field is empty for non-method symbols. + // + // [Go spec]: https://go.dev/ref/spec#Method_declarations + MethodRecvBaseTypeName string + // MultiNameDecl determines whether the symbol is declared as part of a // multi-name declaration spec; For example: // @@ -172,7 +200,7 @@ type SymbolDecl struct { ParentDoc *CommentGroup } -// CommentGroup represents an ast.CommentGroup and its parsed godoc instance. +// CommentGroup represents an [ast.CommentGroup] and its parsed godoc instance. type CommentGroup struct { // CG represents the AST comment group. CG ast.CommentGroup diff --git a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/rule.go b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/rule.go index c53fcf61a..eb7a67ff4 100644 --- a/vendor/github.com/godoc-lint/godoc-lint/pkg/model/rule.go +++ b/vendor/github.com/godoc-lint/godoc-lint/pkg/model/rule.go @@ -16,6 +16,8 @@ const ( RequireDocRule Rule = "require-doc" // DeprecatedRule represents the "deprecated" rule. DeprecatedRule Rule = "deprecated" + // RequireStdlibDoclinkRule represents the "require-stdlib-doclink" rule. + RequireStdlibDoclinkRule Rule = "require-stdlib-doclink" // MaxLenRule represents the "max-len" rule. MaxLenRule Rule = "max-len" // NoUnusedLinkRule represents the "no-unused-link" rule. @@ -31,6 +33,7 @@ var AllRules = func() RuleSet { StartWithNameRule, RequireDocRule, DeprecatedRule, + RequireStdlibDoclinkRule, MaxLenRule, NoUnusedLinkRule, ) diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/config/linters_settings.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/config/linters_settings.go index fefa94ca3..6c8554d99 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/config/linters_settings.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/config/linters_settings.go @@ -164,7 +164,22 @@ var defaultLintersSettings = LintersSettings{ AllowPackages: []string{"main"}, }, Unqueryvet: UnqueryvetSettings{ - CheckSQLBuilders: true, + CheckSQLBuilders: true, + CheckAliasedWildcard: true, + CheckStringConcat: true, + CheckFormatStrings: true, + CheckStringBuilder: true, + CheckSubqueries: true, + SQLBuilders: UnqueryvetSQLBuildersSettings{ + Squirrel: true, + GORM: true, + SQLx: true, + Ent: true, + PGX: true, + Bun: true, + SQLBoiler: true, + Jet: true, + }, }, Unused: UnusedSettings{ FieldWritesAreUses: true, @@ -575,6 +590,7 @@ type GoModDirectivesSettings struct { ToolForbidden bool `mapstructure:"tool-forbidden"` GoDebugForbidden bool `mapstructure:"go-debug-forbidden"` GoVersionPattern string `mapstructure:"go-version-pattern"` + CheckModulePath bool `mapstructure:"check-module-path"` } type GoModGuardSettings struct { @@ -1021,8 +1037,26 @@ type UnparamSettings struct { } type UnqueryvetSettings struct { - CheckSQLBuilders bool `mapstructure:"check-sql-builders"` - AllowedPatterns []string `mapstructure:"allowed-patterns"` + CheckSQLBuilders bool `mapstructure:"check-sql-builders"` + AllowedPatterns []string `mapstructure:"allowed-patterns"` + IgnoredFunctions []string `mapstructure:"ignored-functions"` + CheckAliasedWildcard bool `mapstructure:"check-aliased-wildcard"` + CheckStringConcat bool `mapstructure:"check-string-concat"` + CheckFormatStrings bool `mapstructure:"check-format-strings"` + CheckStringBuilder bool `mapstructure:"check-string-builder"` + CheckSubqueries bool `mapstructure:"check-subqueries"` + SQLBuilders UnqueryvetSQLBuildersSettings `mapstructure:"sql-builders"` +} + +type UnqueryvetSQLBuildersSettings struct { + Squirrel bool `mapstructure:"squirrel"` + GORM bool `mapstructure:"gorm"` + SQLx bool `mapstructure:"sqlx"` + Ent bool `mapstructure:"ent"` + PGX bool `mapstructure:"pgx"` + Bun bool `mapstructure:"bun"` + SQLBoiler bool `mapstructure:"sqlboiler"` + Jet bool `mapstructure:"jet"` } type UnusedSettings struct { diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/goformatters/golines/golines.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/goformatters/golines/golines.go index ffd5b5f81..7c054866d 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/goformatters/golines/golines.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/goformatters/golines/golines.go @@ -1,7 +1,7 @@ package golines import ( - "github.com/golangci/golines" + "github.com/golangci/golines/shorten" "github.com/golangci/golangci-lint/v2/pkg/config" ) @@ -9,27 +9,25 @@ import ( const Name = "golines" type Formatter struct { - shortener *golines.Shortener + shortener *shorten.Shortener } func New(settings *config.GoLinesSettings) *Formatter { - options := golines.ShortenerConfig{} + cfg := &shorten.Config{} if settings != nil { - options = golines.ShortenerConfig{ - MaxLen: settings.MaxLen, - TabLen: settings.TabLen, - KeepAnnotations: false, // golines debug (not usable inside golangci-lint) - ShortenComments: settings.ShortenComments, - ReformatTags: settings.ReformatTags, - IgnoreGenerated: false, // handle globally - DotFile: "", // golines debug (not usable inside golangci-lint) - ChainSplitDots: settings.ChainSplitDots, - BaseFormatterCmd: "go fmt", // fake cmd + cfg = &shorten.Config{ + MaxLen: settings.MaxLen, + TabLen: settings.TabLen, + KeepAnnotations: false, // golines debug (not usable inside golangci-lint) + ShortenComments: settings.ShortenComments, + ReformatTags: settings.ReformatTags, + DotFile: "", // golines debug (not usable inside golangci-lint) + ChainSplitDots: settings.ChainSplitDots, } } - return &Formatter{shortener: golines.NewShortener(options)} + return &Formatter{shortener: shorten.NewShortener(cfg)} } func (*Formatter) Name() string { @@ -37,5 +35,5 @@ func (*Formatter) Name() string { } func (f *Formatter) Format(_ string, src []byte) ([]byte, error) { - return f.shortener.Shorten(src) + return f.shortener.Process(src) } diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/errorlint/errorlint.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/errorlint/errorlint.go index f32217796..a92cb4c18 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/errorlint/errorlint.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/errorlint/errorlint.go @@ -1,7 +1,7 @@ package errorlint import ( - "github.com/polyfloyd/go-errorlint/errorlint" + "codeberg.org/polyfloyd/go-errorlint/errorlint" "github.com/golangci/golangci-lint/v2/pkg/config" "github.com/golangci/golangci-lint/v2/pkg/goanalysis" diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/godoclint/godoclint.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/godoclint/godoclint.go index 235909217..0d0171251 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/godoclint/godoclint.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/godoclint/godoclint.go @@ -35,25 +35,35 @@ func New(settings *config.GodoclintSettings) *goanalysis.Linter { // - Options.RequireDocIncludeTests // - Options.StartWithNameIncludeTests // - Options.NoUnusedLinkIncludeTests + // - Options.RequireStdlibDoclinkIncludeTests + + // Also, Options.MaxLenIgnorePatterns is ignored because the Golangci-lint's idiomatic way to ignore such issues + // is exclusion by source text patterns. pcfg = glconfig.PlainConfig{ Default: settings.Default, Enable: settings.Enable, Disable: settings.Disable, Options: &glconfig.PlainRuleOptions{ - MaxLenLength: settings.Options.MaxLen.Length, - MaxLenIncludeTests: pointer(true), - PkgDocIncludeTests: pointer(false), - SinglePkgDocIncludeTests: pointer(true), - RequirePkgDocIncludeTests: pointer(false), - RequireDocIncludeTests: pointer(true), - RequireDocIgnoreExported: settings.Options.RequireDoc.IgnoreExported, - RequireDocIgnoreUnexported: settings.Options.RequireDoc.IgnoreUnexported, - StartWithNameIncludeTests: pointer(false), - StartWithNameIncludeUnexported: settings.Options.StartWithName.IncludeUnexported, - NoUnusedLinkIncludeTests: pointer(true), + MaxLenLength: settings.Options.MaxLen.Length, + MaxLenIncludeTests: pointer(true), + MaxLenIgnorePatterns: []string{`^\+kubebuilder:`}, + PkgDocIncludeTests: pointer(false), + SinglePkgDocIncludeTests: pointer(true), + RequirePkgDocIncludeTests: pointer(false), + RequireDocIncludeTests: pointer(true), + RequireDocIgnoreExported: settings.Options.RequireDoc.IgnoreExported, + RequireDocIgnoreUnexported: settings.Options.RequireDoc.IgnoreUnexported, + StartWithNameIncludeTests: pointer(false), + StartWithNameIncludeUnexported: settings.Options.StartWithName.IncludeUnexported, + RequireStdlibDoclinkIncludeTests: pointer(true), + NoUnusedLinkIncludeTests: pointer(true), }, } + + if err := pcfg.Validate(); err != nil { + internal.LinterLogger.Fatalf("godoclint: %v", err) + } } composition := glcompose.Compose(glcompose.CompositionConfig{ diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/gomoddirectives/gomoddirectives.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/gomoddirectives/gomoddirectives.go index dd6656fb6..817b5498e 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/gomoddirectives/gomoddirectives.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/gomoddirectives/gomoddirectives.go @@ -29,6 +29,7 @@ func New(settings *config.GoModDirectivesSettings) *goanalysis.Linter { opts.ToolchainForbidden = settings.ToolchainForbidden opts.ToolForbidden = settings.ToolForbidden opts.GoDebugForbidden = settings.GoDebugForbidden + opts.CheckModulePath = settings.CheckModulePath if settings.ToolchainPattern != "" { exp, err := regexp.Compile(settings.ToolchainPattern) diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/modernize/modernize.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/modernize/modernize.go index 08cccdeb8..97825c07e 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/modernize/modernize.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/modernize/modernize.go @@ -14,9 +14,9 @@ func New(settings *config.ModernizeSettings) *goanalysis.Linter { var analyzers []*analysis.Analyzer if settings == nil { - analyzers = cleanSuite() + analyzers = modernize.Suite } else { - for _, analyzer := range cleanSuite() { + for _, analyzer := range modernize.Suite { if slices.Contains(settings.Disable, analyzer.Name) { continue } @@ -32,19 +32,3 @@ func New(settings *config.ModernizeSettings) *goanalysis.Linter { nil). WithLoadMode(goanalysis.LoadModeTypesInfo) } - -func cleanSuite() []*analysis.Analyzer { - var analyzers []*analysis.Analyzer - - for _, analyzer := range modernize.Suite { - // Disabled because of false positives - // https://github.com/golang/go/issues/76687 - if analyzer.Name == "stringscut" { - continue - } - - analyzers = append(analyzers, analyzer) - } - - return analyzers -} diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/prealloc/prealloc.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/prealloc/prealloc.go index c750df990..3dbe3822a 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/prealloc/prealloc.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/prealloc/prealloc.go @@ -1,14 +1,11 @@ package prealloc import ( - "fmt" - "github.com/alexkohler/prealloc/pkg" "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/v2/pkg/config" "github.com/golangci/golangci-lint/v2/pkg/goanalysis" - "github.com/golangci/golangci-lint/v2/pkg/golinters/internal" ) func New(settings *config.PreallocSettings) *goanalysis.Linter { @@ -29,9 +26,6 @@ func runPreAlloc(pass *analysis.Pass, settings *config.PreallocSettings) { hints := pkg.Check(pass.Files, settings.Simple, settings.RangeLoops, settings.ForLoops) for _, hint := range hints { - pass.Report(analysis.Diagnostic{ - Pos: hint.Pos, - Message: fmt.Sprintf("Consider pre-allocating %s", internal.FormatCode(hint.DeclaredSliceName)), - }) + pass.Report(hint) } } diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/revive/revive.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/revive/revive.go index 6799e1a42..63d710d32 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/revive/revive.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/revive/revive.go @@ -155,9 +155,11 @@ func (w *wrapper) toIssue(pass *analysis.Pass, failure *lint.Failure) *goanalysi if failure.Filename() == f.Name() { issue.SuggestedFixes = []analysis.SuggestedFix{{ TextEdits: []analysis.TextEdit{{ - Pos: f.LineStart(failure.Position.Start.Line), - End: goanalysis.EndOfLinePos(f, failure.Position.End.Line), - NewText: []byte(failure.ReplacementLine), + Pos: f.LineStart(failure.Position.Start.Line), + End: goanalysis.EndOfLinePos(f, failure.Position.End.Line), + // ReplacementLine doesn't contain the full line (missing newline), so we have to add a newline. + // Also `failure.Position.End.Offset` is at the end of the node but not the line. + NewText: []byte(failure.ReplacementLine + "\n"), }}, }} } @@ -208,11 +210,12 @@ func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) { func createConfigMap(cfg *config.ReviveSettings) map[string]any { rawRoot := map[string]any{ - "confidence": cfg.Confidence, - "severity": cfg.Severity, - "errorCode": cfg.ErrorCode, - "warningCode": cfg.WarningCode, - "enableAllRules": cfg.EnableAllRules, + "confidence": cfg.Confidence, + "severity": cfg.Severity, + "errorCode": cfg.ErrorCode, + "warningCode": cfg.WarningCode, + "enableAllRules": cfg.EnableAllRules, + "enableDefaultRules": cfg.EnableDefaultRules, // Should be managed with `linters.exclusions.generated`. "ignoreGeneratedHeader": false, diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/unqueryvet/unqueryvet.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/unqueryvet/unqueryvet.go index db4a4d752..c6aad8860 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/unqueryvet/unqueryvet.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/golinters/unqueryvet/unqueryvet.go @@ -12,10 +12,29 @@ func New(settings *config.UnqueryvetSettings) *goanalysis.Linter { cfg := pkgconfig.DefaultSettings() if settings != nil { + // IgnoredFiles, and Severity are explicitly ignored. cfg.CheckSQLBuilders = settings.CheckSQLBuilders + cfg.CheckAliasedWildcard = settings.CheckAliasedWildcard + cfg.CheckStringConcat = settings.CheckStringConcat + cfg.CheckFormatStrings = settings.CheckFormatStrings + cfg.CheckStringBuilder = settings.CheckStringBuilder + cfg.CheckSubqueries = settings.CheckSubqueries + cfg.IgnoredFunctions = settings.IgnoredFunctions + if len(settings.AllowedPatterns) > 0 { cfg.AllowedPatterns = settings.AllowedPatterns } + + cfg.SQLBuilders = pkgconfig.SQLBuildersConfig{ + Squirrel: settings.SQLBuilders.Squirrel, + GORM: settings.SQLBuilders.GORM, + SQLx: settings.SQLBuilders.SQLx, + Ent: settings.SQLBuilders.Ent, + PGX: settings.SQLBuilders.PGX, + Bun: settings.SQLBuilders.Bun, + SQLBoiler: settings.SQLBuilders.SQLBoiler, + Jet: settings.SQLBuilders.Jet, + } } return goanalysis. diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/lint/lintersdb/builder_linter.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/lint/lintersdb/builder_linter.go index 6e9cef1d1..b1abb6db9 100644 --- a/vendor/github.com/golangci/golangci-lint/v2/pkg/lint/lintersdb/builder_linter.go +++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/lint/lintersdb/builder_linter.go @@ -242,7 +242,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) { WithSince("v1.32.0"). WithLoadForGoAnalysis(). WithAutoFix(). - WithURL("https://github.com/polyfloyd/go-errorlint"), + WithURL("https://codeberg.org/polyfloyd/go-errorlint"), linter.NewConfig(exhaustive.New(&cfg.Linters.Settings.Exhaustive)). WithSince("v1.28.0"). diff --git a/vendor/github.com/golangci/golines/.gitattributes b/vendor/github.com/golangci/golines/.gitattributes deleted file mode 100644 index 148ff868c..000000000 --- a/vendor/github.com/golangci/golines/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -_fixtures/* text eol=lf diff --git a/vendor/github.com/golangci/golines/.gitignore b/vendor/github.com/golangci/golines/.gitignore deleted file mode 100644 index 48e5593d2..000000000 --- a/vendor/github.com/golangci/golines/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib -/dist - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -vendor -.vscode -.idea -golines - -coverage.out diff --git a/vendor/github.com/golangci/golines/README.md b/vendor/github.com/golangci/golines/README.md deleted file mode 100644 index 24ec221a0..000000000 --- a/vendor/github.com/golangci/golines/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Fork of golines - -This is a fork of [golines](https://github.com/segmentio/golines) to be usable as a library. - -## Modifications - -- The original code is under the `main` package -> uses `golines` package. -- Some files have been removed to reduce dependencies: - - `main.go`, `main_test.go` - - `graph.go`, `graph_generated.go`, `graph.test` - - `diff.go`, `diff_test.go` - - `doc.go` -- Some other files have been removed because unused by the fork: - - `.goreleaser.yaml`, `.pre-commit-hooks.yaml` - - `.github/build.yml`, `.github/release.yml` - - `Makefile` -- The workflow files (`lint.yml` and `test.yml`) are modified to run for this fork. -- The file `shortener.go` has been modified: - - The `baseFormatterCmd` is hardcoded. - - The code related to debug logs has been removed. - - The code related to graph has been removed. -- The module name has been changed to `github.com/golangci/golines` to avoid replacement directives inside golangci-lint. - -**No modifications will be accepted other than the synchronization of the fork.** - -The synchronization of the fork will be done by the golangci-lint maintainers only. - -## History - -- sync with fc305205784a70b4cfc17397654f4c94e3153ce4 (after v0.12.2) diff --git a/vendor/github.com/golangci/golines/annotation.go b/vendor/github.com/golangci/golines/annotation.go deleted file mode 100644 index fc7f92ca2..000000000 --- a/vendor/github.com/golangci/golines/annotation.go +++ /dev/null @@ -1,99 +0,0 @@ -package golines - -import ( - "fmt" - "strconv" - "strings" - - "github.com/dave/dst" -) - -const annotationPrefix = "// __golines:shorten:" - -// CreateAnnotation generates the text of a comment that will annotate long lines. -func CreateAnnotation(length int) string { - return fmt.Sprintf( - "%s%d", - annotationPrefix, - length, - ) -} - -// IsAnnotation determines whether the given line is an annotation created with CreateAnnotation. -func IsAnnotation(line string) bool { - return strings.HasPrefix( - strings.Trim(line, " \t"), - annotationPrefix, - ) -} - -// HasAnnotation determines whether the given AST node has a line length annotation on it. -func HasAnnotation(node dst.Node) bool { - startDecorations := node.Decorations().Start.All() - return len(startDecorations) > 0 && - IsAnnotation(startDecorations[len(startDecorations)-1]) -} - -// HasTailAnnotation determines whether the given AST node has a line length annotation at its -// end. This is needed to catch long function declarations with inline interface definitions. -func HasTailAnnotation(node dst.Node) bool { - endDecorations := node.Decorations().End.All() - return len(endDecorations) > 0 && - IsAnnotation(endDecorations[len(endDecorations)-1]) -} - -// HasAnnotationRecursive determines whether the given node or one of its children has a -// golines annotation on it. It's currently implemented for function declarations, fields, -// call expressions, and selector expressions only. -func HasAnnotationRecursive(node dst.Node) bool { - if HasAnnotation(node) { - return true - } - - switch n := node.(type) { - case *dst.FuncDecl: - if n.Type != nil && n.Type.Params != nil { - for _, item := range n.Type.Params.List { - if HasAnnotationRecursive(item) { - return true - } - } - } - case *dst.Field: - return HasTailAnnotation(n) || HasAnnotationRecursive(n.Type) - case *dst.SelectorExpr: - return HasAnnotation(n.Sel) || HasAnnotation(n.X) - case *dst.CallExpr: - if HasAnnotationRecursive(n.Fun) { - return true - } - - for _, arg := range n.Args { - if HasAnnotation(arg) { - return true - } - } - case *dst.InterfaceType: - for _, field := range n.Methods.List { - if HasAnnotationRecursive(field) { - return true - } - } - } - - return false -} - -// ParseAnnotation returns the line length encoded in a golines annotation. If none is found, -// it returns -1. -func ParseAnnotation(line string) int { - if IsAnnotation(line) { - components := strings.SplitN(line, ":", 3) - val, err := strconv.Atoi(components[2]) - if err != nil { - return -1 - } - return val - } - return -1 -} diff --git a/vendor/github.com/golangci/golines/shorten/.gitattributes b/vendor/github.com/golangci/golines/shorten/.gitattributes new file mode 100644 index 000000000..90fe9352e --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/.gitattributes @@ -0,0 +1,3 @@ +/testdata/** text eol=lf +/internal/graph/testdata/** text eol=lf +/internal/comments/testdata/** text eol=lf diff --git a/vendor/github.com/golangci/golines/shorten/annotations.go b/vendor/github.com/golangci/golines/shorten/annotations.go new file mode 100644 index 000000000..0cba53fd6 --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/annotations.go @@ -0,0 +1,65 @@ +package shorten + +import ( + "strings" + + "github.com/golangci/golines/shorten/internal" + "github.com/golangci/golines/shorten/internal/annotation" + "github.com/golangci/golines/shorten/internal/comments" +) + +// annotateLongLines adds specially formatted comments to all eligible lines that +// are longer than the configured target length. +// If a line already has one of these comments from a previous shortening round, +// then the comment contents are updated. +func (s *Shortener) annotateLongLines(lines []string) ([]string, int) { + var ( + annotatedLines []string + nbLinesToShorten int + ) + + prevLen := -1 + + for _, line := range lines { + length := internal.LineLength(line, s.config.TabLen) + + if prevLen > -1 { + if length <= s.config.MaxLen { + // Shortening successful, remove previous annotation + annotatedLines = annotatedLines[:len(annotatedLines)-1] + } else if length < prevLen { + // Replace annotation with a new length + annotatedLines[len(annotatedLines)-1] = annotation.Create(length) + + nbLinesToShorten++ + } + } else if !comments.Is(line) && length > s.config.MaxLen { + annotatedLines = append( + annotatedLines, + annotation.Create(length), + ) + + nbLinesToShorten++ + } + + annotatedLines = append(annotatedLines, line) + prevLen = annotation.Parse(line) + } + + return annotatedLines, nbLinesToShorten +} + +// removeAnnotations removes all comments added by the annotateLongLines function above. +func removeAnnotations(content []byte) []byte { + var cleanedLines []string + + lines := strings.SplitSeq(string(content), "\n") + + for line := range lines { + if !annotation.Is(line) { + cleanedLines = append(cleanedLines, line) + } + } + + return []byte(strings.Join(cleanedLines, "\n")) +} diff --git a/vendor/github.com/golangci/golines/shorten/format.go b/vendor/github.com/golangci/golines/shorten/format.go new file mode 100644 index 000000000..6c3abb67a --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/format.go @@ -0,0 +1,339 @@ +package shorten + +import ( + "go/token" + "log/slog" + "reflect" + + "github.com/dave/dst" + "github.com/golangci/golines/shorten/internal/annotation" + "github.com/golangci/golines/shorten/internal/tags" +) + +// formatFile formats the provided AST file starting at the top-level declarations. +func (s *Shortener) formatFile(file *dst.File) { + for _, decl := range file.Decls { + s.formatNode(decl) + } +} + +// formatNode formats the provided AST node. +// The appropriate helper function is called based on +// whether the node is a declaration, expression, statement, or spec. +func (s *Shortener) formatNode(node dst.Node) { + switch n := node.(type) { + case dst.Decl: + s.logger.Debug("processing declaration", slog.Any("node", n)) + s.formatDecl(n) + + case dst.Expr: + s.logger.Debug("processing expression", slog.Any("node", n)) + s.formatExpr(n, false, false) + + case dst.Stmt: + s.logger.Debug("processing statement", slog.Any("node", n)) + s.formatStmt(n, false) + + case dst.Spec: + s.logger.Debug("processing spec", slog.Any("node", n)) + s.formatSpec(n, false) + + default: + s.logger.Debug( + "got a node type that can't be shortened", + slog.Any("node_type", reflect.TypeOf(n)), + ) + } +} + +// formatDecl formats an AST declaration node. +// These include function declarations, imports, and constants. +func (s *Shortener) formatDecl(decl dst.Decl) { + switch d := decl.(type) { + case *dst.FuncDecl: + if d.Type != nil && d.Type.Params != nil && annotation.HasRecursive(d) { + s.formatFieldList(d.Type.Params) + } + + s.formatStmt(d.Body, false) + + case *dst.GenDecl: + shouldShorten := annotation.Has(d) + + for _, spec := range d.Specs { + s.formatSpec(spec, shouldShorten) + } + + default: + s.logger.Debug( + "got a declaration type that can't be shortened", + slog.Any("decl_type", reflect.TypeOf(d)), + ) + } +} + +// formatStmt formats an AST statement node. +// Among other examples, these include assignments, case clauses, +// for statements, if statements, and select statements. +func (s *Shortener) formatStmt(stmt dst.Stmt, force bool) { + stmtType := reflect.TypeOf(stmt) + + // Explicitly check for nil statements + if reflect.ValueOf(stmt) == reflect.Zero(stmtType) { + return + } + + shouldShorten := force || annotation.Has(stmt) + + switch st := stmt.(type) { + case *dst.AssignStmt: + s.formatExprs(st.Rhs, shouldShorten, false) + + case *dst.BlockStmt: + s.formatStmts(st.List, false) + + case *dst.CaseClause: + if shouldShorten { + for _, arg := range st.List { + arg.Decorations().After = dst.NewLine + + s.formatExpr(arg, false, false) + } + } + + s.formatStmts(st.Body, false) + + case *dst.CommClause: + s.formatStmts(st.Body, false) + + case *dst.DeclStmt: + s.formatDecl(st.Decl) + + case *dst.DeferStmt: + s.formatExpr(st.Call, shouldShorten, false) + + case *dst.ExprStmt: + s.formatExpr(st.X, shouldShorten, false) + + case *dst.ForStmt: + s.formatStmt(st.Body, false) + + case *dst.GoStmt: + s.formatExpr(st.Call, shouldShorten, false) + + case *dst.IfStmt: + s.formatExpr(st.Cond, shouldShorten, false) + s.formatStmt(st.Body, false) + + if st.Init != nil { + s.formatStmt(st.Init, shouldShorten) + } + + if st.Else != nil { + s.formatStmt(st.Else, shouldShorten) + } + + case *dst.RangeStmt: + s.formatStmt(st.Body, false) + + case *dst.ReturnStmt: + s.formatExprs(st.Results, shouldShorten, false) + + case *dst.SelectStmt: + s.formatStmt(st.Body, false) + + case *dst.SwitchStmt: + s.formatStmt(st.Body, false) + + case *dst.TypeSwitchStmt: + s.formatStmt(st.Body, false) + + case *dst.BadStmt, *dst.EmptyStmt, *dst.LabeledStmt, + *dst.SendStmt, *dst.IncDecStmt, *dst.BranchStmt: + // These statements are explicitly defined to improve switch cases exhaustiveness. + // They may be handled in the future. + if shouldShorten { + s.logger.Debug( + "got a statement type that is not shortened", + slog.Any("stmt_type", stmtType), + ) + } + + default: + if shouldShorten { + s.logger.Debug( + "got an unknown statement type", + slog.Any("stmt_type", stmtType), + ) + } + } +} + +// formatExpr formats an AST expression node. +// These include uniary and binary expressions, function literals, +// and key/value pair statements, among others. +func (s *Shortener) formatExpr(expr dst.Expr, force, isChain bool) { + shouldShorten := force || annotation.Has(expr) + + switch e := expr.(type) { + case *dst.BinaryExpr: + if (e.Op == token.LAND || e.Op == token.LOR) && shouldShorten { + if e.Y.Decorations().Before == dst.NewLine { + s.formatExpr(e.X, force, isChain) + } else { + e.Y.Decorations().Before = dst.NewLine + } + } else { + s.formatExpr(e.X, shouldShorten, isChain) + s.formatExpr(e.Y, shouldShorten, isChain) + } + + case *dst.CallExpr: + shortenChildArgs := shouldShorten || annotation.HasRecursive(e) + + _, ok := e.Fun.(*dst.SelectorExpr) + + if ok && shortenChildArgs && + s.config.ChainSplitDots && (isChain || chainLength(e) > 1) { + e.Decorations().After = dst.NewLine + + s.formatExprs(e.Args, false, true) + s.formatExpr(e.Fun, shouldShorten, true) + } else { + for i, arg := range e.Args { + if shortenChildArgs { + formatList(arg, i) + } + + s.formatExpr(arg, false, isChain) + } + + s.formatExpr(e.Fun, shouldShorten, isChain) + } + + case *dst.CompositeLit: + if shouldShorten { + for i, element := range e.Elts { + if i == 0 { + element.Decorations().Before = dst.NewLine + } + + element.Decorations().After = dst.NewLine + } + } + + s.formatExprs(e.Elts, false, isChain) + + case *dst.FuncLit: + s.formatStmt(e.Body, false) + + case *dst.FuncType: + if shouldShorten { + s.formatFieldList(e.Params) + } + + case *dst.InterfaceType: + for _, method := range e.Methods.List { + if annotation.Has(method) { + s.formatExpr(method.Type, true, isChain) + } + } + + case *dst.KeyValueExpr: + s.formatExpr(e.Value, shouldShorten, isChain) + + case *dst.SelectorExpr: + s.formatExpr(e.X, shouldShorten, isChain) + + case *dst.StructType: + if s.config.ReformatTags { + tags.FormatStructTags(e.Fields) + } + + case *dst.UnaryExpr: + s.formatExpr(e.X, shouldShorten, isChain) + + default: + if shouldShorten { + s.logger.Debug( + "got an expression type that can't be shortened", + slog.Any("expr_type", reflect.TypeOf(e)), + ) + } + } +} + +// formatSpec formats an AST spec node. +// These include type specifications, among other things. +func (s *Shortener) formatSpec(spec dst.Spec, force bool) { + shouldShorten := annotation.Has(spec) || force + + switch sp := spec.(type) { + case *dst.ValueSpec: + s.formatExprs(sp.Values, shouldShorten, false) + + case *dst.TypeSpec: + s.formatExpr(sp.Type, false, false) + + default: + if shouldShorten { + s.logger.Debug( + "got a spec type that can't be shortened", + slog.Any("spec_type", reflect.TypeOf(sp)), + ) + } + } +} + +func (s *Shortener) formatStmts(stmts []dst.Stmt, force bool) { + for _, stmt := range stmts { + s.formatStmt(stmt, force) + } +} + +func (s *Shortener) formatExprs(exprs []dst.Expr, force, isChain bool) { + for _, expr := range exprs { + s.formatExpr(expr, force, isChain) + } +} + +// formatFieldList formats a field list in a function declaration. +func (s *Shortener) formatFieldList(fieldList *dst.FieldList) { + for i, field := range fieldList.List { + formatList(field, i) + } +} + +func formatList(node dst.Node, index int) { + decorations := node.Decorations() + + if index == 0 { + decorations.Before = dst.NewLine + } else { + decorations.Before = dst.None + } + + decorations.After = dst.NewLine +} + +// chainLength determines the length of the function call chain in an expression. +func chainLength(callExpr *dst.CallExpr) int { + numCalls := 1 + currCall := callExpr + + for { + selectorExpr, ok := currCall.Fun.(*dst.SelectorExpr) + if !ok { + break + } + + currCall, ok = selectorExpr.X.(*dst.CallExpr) + if !ok { + break + } + + numCalls++ + } + + return numCalls +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/annotation/annotation.go b/vendor/github.com/golangci/golines/shorten/internal/annotation/annotation.go new file mode 100644 index 000000000..8491b4e46 --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/annotation/annotation.go @@ -0,0 +1,91 @@ +package annotation + +import ( + "fmt" + "slices" + "strconv" + "strings" + + "github.com/dave/dst" +) + +const prefix = "//golines:shorten:" + +// Create generates the text of a comment that will annotate long lines. +func Create(length int) string { + return fmt.Sprintf("%s%d", prefix, length) +} + +// Is determines whether the given line is an annotation created with Create. +func Is(line string) bool { + return strings.HasPrefix( + strings.Trim(line, " \t"), + prefix, + ) +} + +// Has determines whether the given AST node has a line length annotation on it. +func Has[T dst.Node](node T) bool { + return has(node.Decorations().Start) +} + +// HasTail determines whether the given AST node has a line length annotation at its end. +// This is needed to catch long function declarations with inline interface definitions. +func HasTail(node dst.Node) bool { + return has(node.Decorations().End) +} + +// HasRecursive determines whether the given node or one of its children has a +// golines annotation on it. It's currently implemented for function declarations, fields, +// call expressions, and selector expressions only. +func HasRecursive[T dst.Node](node T) bool { + if Has(node) { + return true + } + + switch n := any(node).(type) { + case *dst.FuncDecl: + return n.Type != nil && n.Type.Params != nil && + HasRecursive(n.Type.Params) + + case *dst.Field: + return HasTail(n) || HasRecursive(n.Type) + + case *dst.SelectorExpr: + return Has(n.Sel) || Has(n.X) + + case *dst.CallExpr: + return HasRecursive(n.Fun) || slices.ContainsFunc(n.Args, Has) + + case *dst.InterfaceType: + return HasRecursive(n.Methods) + + case *dst.FieldList: + return slices.ContainsFunc(n.List, HasRecursive) + } + + return false +} + +// Parse returns the line length encoded in a golines annotation. +// If none is found, it returns -1. +func Parse(line string) int { + if !Is(line) { + return -1 + } + + components := strings.SplitN(line, ":", 3) + + val, err := strconv.Atoi(components[2]) + if err != nil { + return -1 + } + + return val +} + +func has(decorations dst.Decorations) bool { + deco := decorations.All() + + return len(deco) > 0 && Is(deco[len(deco)-1]) +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/comments/comments.go b/vendor/github.com/golangci/golines/shorten/internal/comments/comments.go new file mode 100644 index 000000000..5fd0e202a --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/comments/comments.go @@ -0,0 +1,104 @@ +package comments + +import ( + "fmt" + "regexp" + "strings" + + "github.com/golangci/golines/shorten/internal" + "github.com/golangci/golines/shorten/internal/annotation" +) + +// Shortener is a struct that can be used to shorten long comments. +// +// As noted in the repo README, +// this functionality has some quirks and is disabled by default. +type Shortener struct { + MaxLen int + TabLen int +} + +// Go directive (should be ignored). +// https://go.dev/doc/comment#syntax +var directivePattern = regexp.MustCompile(`\s*//(line |extern |export |[a-z0-9]+:[a-z0-9])`) + +// Process attempts to shorten long comments in the provided source. +// +// As noted in the repo README, +// this functionality has some quirks and is disabled by default. +func (s *Shortener) Process(content []byte) []byte { + if len(content) == 0 { + return content + } + + var cleanedLines []string + + // all words in a contiguous sequence of long comments + var words []string + + prefix := "" + + lines := strings.SplitSeq(string(content), "\n") + for line := range lines { + if Is(line) && !annotation.Is(line) && + !isDirective(line) && + internal.LineLength(line, s.TabLen) > s.MaxLen { + start := strings.Index(line, "//") + prefix = line[0:(start + 2)] + trimmedLine := strings.Trim(line[(start+2):], " ") + currLineWords := strings.Split(trimmedLine, " ") + words = append(words, currLineWords...) + } else { + // Reflow the accumulated `words` before appending the unprocessed `line`. + currLineLen := 0 + + var currLineWords []string + + maxCommentLen := s.MaxLen - internal.LineLength(prefix, s.TabLen) + for _, word := range words { + if currLineLen > 0 && currLineLen+1+len(word) > maxCommentLen { + cleanedLines = append( + cleanedLines, + fmt.Sprintf( + "%s %s", + prefix, + strings.Join(currLineWords, " "), + ), + ) + currLineWords = []string{} + currLineLen = 0 + } + + currLineWords = append(currLineWords, word) + currLineLen += 1 + len(word) + } + + if currLineLen > 0 { + cleanedLines = append( + cleanedLines, + fmt.Sprintf( + "%s %s", + prefix, + strings.Join(currLineWords, " "), + ), + ) + } + + words = []string{} + + cleanedLines = append(cleanedLines, line) + } + } + + return []byte(strings.Join(cleanedLines, "\n")) +} + +// Is determines whether the provided line is a non-block comment. +func Is(line string) bool { + return strings.HasPrefix(strings.Trim(line, " \t"), "//") +} + +// isDirective determines whether the provided line is a directive, e.g., for `go:generate`. +func isDirective(line string) bool { + return directivePattern.MatchString(line) +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/graph/graph.go b/vendor/github.com/golangci/golines/shorten/internal/graph/graph.go new file mode 100644 index 000000000..e11eab9dd --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/graph/graph.go @@ -0,0 +1,132 @@ +package graph + +import ( + "fmt" + "html" + "io" + "strings" + + "github.com/dave/dst" + "github.com/golangci/golines/shorten/internal/annotation" +) + +// Node is a representation of a node in the AST graph. +type Node struct { + Type string + Value string + Node dst.Node + Edges []*Edge + + // Used for keeping track of node position during rendering + level int + seq int +} + +func (n *Node) id() string { + return fmt.Sprintf("%s_%d_%d", n.Type, n.level, n.seq) +} + +// Edge is a representation of an edge in the AST graph. +type Edge struct { + Dest *Node + Relationship string +} + +// CreateDot creates a dot representation of the graph associated with a dst node. +func CreateDot(node dst.Node, out io.Writer) error { + root := NodeToGraphNode(node) + + dotGraph, err := Walk(root) + if err != nil { + return err + } + + _, err = out.Write([]byte(dotGraph)) + + return err +} + +// Walk walks the graph starting at the argument root and returns +// a graphviz (dot) representation. +func Walk(root *Node) (string, error) { + toProcess := []*Node{root} + + var processed []*Node + + outLines := []string{"digraph {"} + + var ( + currLevel int + currSeq int + ) + + // First, loop through the graph nodes to assign proper ids + + for len(toProcess) != 0 { + currNode := toProcess[0] + + if currNode.level > currLevel { + currLevel = currNode.level + currSeq = 0 + } + + currNode.seq = currSeq + currSeq++ + + processed = append(processed, currNode) + toProcess = toProcess[1:] + + for _, edge := range currNode.Edges { + edge.Dest.level = currLevel + 1 + toProcess = append(toProcess, edge.Dest) + } + } + + // Then, fill out the graph in dot format + for _, node := range processed { + var ( + nodeLabel string + nodeFormat string + ) + + if annotation.Has(node.Node) { + nodeFormat = ",penwidth=3.0" + } + + if node.Value != "" { + nodeLabel = fmt.Sprintf( + `%s
%s`, + node.Type, + html.EscapeString(node.Value), + ) + } else { + nodeLabel = node.Type + } + + outLines = append( + outLines, + fmt.Sprintf( + "\t"+`%s[label=<%s>,shape="box"%s]`, + node.id(), + nodeLabel, + nodeFormat, + ), + ) + + for _, edge := range node.Edges { + outLines = append( + outLines, + fmt.Sprintf( + "\t"+`%s->%s[label="%s",fontsize=12.0]`, + node.id(), + edge.Dest.id(), + edge.Relationship, + ), + ) + } + } + + outLines = append(outLines, "}") + + return strings.Join(outLines, "\n"), nil +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/graph/graph_generated.go b/vendor/github.com/golangci/golines/shorten/internal/graph/graph_generated.go new file mode 100644 index 000000000..40fa188bb --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/graph/graph_generated.go @@ -0,0 +1,596 @@ +// Code generated by 'generate/main.go.'; DO NOT EDIT. + +package graph + +import ( + dst "github.com/dave/dst" + "log" +) + +func NodeToGraphNode(node dst.Node) *Node { + gNode := &Node{Node: node, Edges: []*Edge{}} + var child *Node + switch n := node.(type) { + case *dst.ArrayType: + gNode.Type = "ArrayType" + if n.Len != nil { + child = NodeToGraphNode(n.Len) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Len"}) + } + if n.Elt != nil { + child = NodeToGraphNode(n.Elt) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Elt"}) + } + + case *dst.AssignStmt: + gNode.Type = "AssignStmt" + if n.Lhs != nil { + for _, obj := range n.Lhs { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Lhs"}) + } + } + if n.Rhs != nil { + for _, obj := range n.Rhs { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Rhs"}) + } + } + + case *dst.BadDecl: + gNode.Type = "BadDecl" + + case *dst.BadExpr: + gNode.Type = "BadExpr" + + case *dst.BadStmt: + gNode.Type = "BadStmt" + + case *dst.BasicLit: + gNode.Type = "BasicLit" + gNode.Value = n.Value + + case *dst.BinaryExpr: + gNode.Type = "BinaryExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Y != nil { + child = NodeToGraphNode(n.Y) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Y"}) + } + + case *dst.BlockStmt: + gNode.Type = "BlockStmt" + if n.List != nil { + for _, obj := range n.List { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "List"}) + } + } + + case *dst.BranchStmt: + gNode.Type = "BranchStmt" + if n.Label != nil { + child = NodeToGraphNode(n.Label) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Label"}) + } + + case *dst.CallExpr: + gNode.Type = "CallExpr" + if n.Fun != nil { + child = NodeToGraphNode(n.Fun) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Fun"}) + } + if n.Args != nil { + for _, obj := range n.Args { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Args"}) + } + } + + case *dst.CaseClause: + gNode.Type = "CaseClause" + if n.List != nil { + for _, obj := range n.List { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "List"}) + } + } + if n.Body != nil { + for _, obj := range n.Body { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + } + + case *dst.ChanType: + gNode.Type = "ChanType" + if n.Value != nil { + child = NodeToGraphNode(n.Value) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Value"}) + } + + case *dst.CommClause: + gNode.Type = "CommClause" + if n.Comm != nil { + child = NodeToGraphNode(n.Comm) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Comm"}) + } + if n.Body != nil { + for _, obj := range n.Body { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + } + + case *dst.CompositeLit: + gNode.Type = "CompositeLit" + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + if n.Elts != nil { + for _, obj := range n.Elts { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Elts"}) + } + } + + case *dst.DeclStmt: + gNode.Type = "DeclStmt" + if n.Decl != nil { + child = NodeToGraphNode(n.Decl) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Decl"}) + } + + case *dst.DeferStmt: + gNode.Type = "DeferStmt" + if n.Call != nil { + child = NodeToGraphNode(n.Call) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Call"}) + } + + case *dst.Ellipsis: + gNode.Type = "Ellipsis" + if n.Elt != nil { + child = NodeToGraphNode(n.Elt) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Elt"}) + } + + case *dst.EmptyStmt: + gNode.Type = "EmptyStmt" + + case *dst.ExprStmt: + gNode.Type = "ExprStmt" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + + case *dst.Field: + gNode.Type = "Field" + if n.Names != nil { + for _, obj := range n.Names { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Names"}) + } + } + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + if n.Tag != nil { + child = NodeToGraphNode(n.Tag) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Tag"}) + } + + case *dst.FieldList: + gNode.Type = "FieldList" + if n.List != nil { + for _, obj := range n.List { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "List"}) + } + } + + case *dst.File: + gNode.Type = "File" + if n.Name != nil { + child = NodeToGraphNode(n.Name) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Name"}) + } + if n.Decls != nil { + for _, obj := range n.Decls { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Decls"}) + } + } + if n.Imports != nil { + for _, obj := range n.Imports { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Imports"}) + } + } + + case *dst.ForStmt: + gNode.Type = "ForStmt" + if n.Init != nil { + child = NodeToGraphNode(n.Init) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Init"}) + } + if n.Cond != nil { + child = NodeToGraphNode(n.Cond) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Cond"}) + } + if n.Post != nil { + child = NodeToGraphNode(n.Post) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Post"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.FuncDecl: + gNode.Type = "FuncDecl" + if n.Recv != nil { + child = NodeToGraphNode(n.Recv) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Recv"}) + } + if n.Name != nil { + child = NodeToGraphNode(n.Name) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Name"}) + } + if n.Type.TypeParams != nil { + child = NodeToGraphNode(n.Type.TypeParams) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "TypeParams"}) + } + if n.Type.Params != nil { + child = NodeToGraphNode(n.Type.Params) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Params"}) + } + if n.Type.Results != nil { + child = NodeToGraphNode(n.Type.Results) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Results"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.FuncLit: + gNode.Type = "FuncLit" + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.FuncType: + gNode.Type = "FuncType" + if n.TypeParams != nil { + child = NodeToGraphNode(n.TypeParams) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "TypeParams"}) + } + if n.Params != nil { + child = NodeToGraphNode(n.Params) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Params"}) + } + if n.Results != nil { + child = NodeToGraphNode(n.Results) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Results"}) + } + + case *dst.GenDecl: + gNode.Type = "GenDecl" + if n.Specs != nil { + for _, obj := range n.Specs { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Specs"}) + } + } + + case *dst.GoStmt: + gNode.Type = "GoStmt" + if n.Call != nil { + child = NodeToGraphNode(n.Call) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Call"}) + } + + case *dst.Ident: + gNode.Type = "Ident" + gNode.Value = n.Name + + case *dst.IfStmt: + gNode.Type = "IfStmt" + if n.Init != nil { + child = NodeToGraphNode(n.Init) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Init"}) + } + if n.Cond != nil { + child = NodeToGraphNode(n.Cond) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Cond"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + if n.Else != nil { + child = NodeToGraphNode(n.Else) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Else"}) + } + + case *dst.ImportSpec: + gNode.Type = "ImportSpec" + if n.Name != nil { + child = NodeToGraphNode(n.Name) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Name"}) + } + if n.Path != nil { + child = NodeToGraphNode(n.Path) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Path"}) + } + + case *dst.IncDecStmt: + gNode.Type = "IncDecStmt" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + + case *dst.IndexExpr: + gNode.Type = "IndexExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Index != nil { + child = NodeToGraphNode(n.Index) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Index"}) + } + + case *dst.IndexListExpr: + gNode.Type = "IndexListExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Indices != nil { + for _, obj := range n.Indices { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Indices"}) + } + } + + case *dst.InterfaceType: + gNode.Type = "InterfaceType" + if n.Methods != nil { + child = NodeToGraphNode(n.Methods) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Methods"}) + } + + case *dst.KeyValueExpr: + gNode.Type = "KeyValueExpr" + if n.Key != nil { + child = NodeToGraphNode(n.Key) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Key"}) + } + if n.Value != nil { + child = NodeToGraphNode(n.Value) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Value"}) + } + + case *dst.LabeledStmt: + gNode.Type = "LabeledStmt" + if n.Label != nil { + child = NodeToGraphNode(n.Label) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Label"}) + } + if n.Stmt != nil { + child = NodeToGraphNode(n.Stmt) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Stmt"}) + } + + case *dst.MapType: + gNode.Type = "MapType" + if n.Key != nil { + child = NodeToGraphNode(n.Key) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Key"}) + } + if n.Value != nil { + child = NodeToGraphNode(n.Value) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Value"}) + } + + case *dst.Package: + gNode.Type = "Package" + + case *dst.ParenExpr: + gNode.Type = "ParenExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + + case *dst.RangeStmt: + gNode.Type = "RangeStmt" + if n.Key != nil { + child = NodeToGraphNode(n.Key) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Key"}) + } + if n.Value != nil { + child = NodeToGraphNode(n.Value) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Value"}) + } + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.ReturnStmt: + gNode.Type = "ReturnStmt" + if n.Results != nil { + for _, obj := range n.Results { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Results"}) + } + } + + case *dst.SelectStmt: + gNode.Type = "SelectStmt" + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.SelectorExpr: + gNode.Type = "SelectorExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Sel != nil { + child = NodeToGraphNode(n.Sel) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Sel"}) + } + + case *dst.SendStmt: + gNode.Type = "SendStmt" + if n.Chan != nil { + child = NodeToGraphNode(n.Chan) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Chan"}) + } + if n.Value != nil { + child = NodeToGraphNode(n.Value) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Value"}) + } + + case *dst.SliceExpr: + gNode.Type = "SliceExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Low != nil { + child = NodeToGraphNode(n.Low) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Low"}) + } + if n.High != nil { + child = NodeToGraphNode(n.High) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "High"}) + } + if n.Max != nil { + child = NodeToGraphNode(n.Max) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Max"}) + } + + case *dst.StarExpr: + gNode.Type = "StarExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + + case *dst.StructType: + gNode.Type = "StructType" + if n.Fields != nil { + child = NodeToGraphNode(n.Fields) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Fields"}) + } + + case *dst.SwitchStmt: + gNode.Type = "SwitchStmt" + if n.Init != nil { + child = NodeToGraphNode(n.Init) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Init"}) + } + if n.Tag != nil { + child = NodeToGraphNode(n.Tag) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Tag"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.TypeAssertExpr: + gNode.Type = "TypeAssertExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + + case *dst.TypeSpec: + gNode.Type = "TypeSpec" + if n.Name != nil { + child = NodeToGraphNode(n.Name) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Name"}) + } + if n.TypeParams != nil { + child = NodeToGraphNode(n.TypeParams) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "TypeParams"}) + } + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + + case *dst.TypeSwitchStmt: + gNode.Type = "TypeSwitchStmt" + if n.Init != nil { + child = NodeToGraphNode(n.Init) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Init"}) + } + if n.Assign != nil { + child = NodeToGraphNode(n.Assign) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Assign"}) + } + if n.Body != nil { + child = NodeToGraphNode(n.Body) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Body"}) + } + + case *dst.UnaryExpr: + gNode.Type = "UnaryExpr" + if n.X != nil { + child = NodeToGraphNode(n.X) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "X"}) + } + + case *dst.ValueSpec: + gNode.Type = "ValueSpec" + if n.Names != nil { + for _, obj := range n.Names { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Names"}) + } + } + if n.Type != nil { + child = NodeToGraphNode(n.Type) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Type"}) + } + if n.Values != nil { + for _, obj := range n.Values { + child = NodeToGraphNode(obj) + gNode.Edges = append(gNode.Edges, &Edge{Dest: child, Relationship: "Values"}) + } + } + + default: + log.Println("Unrecognized type") + } + return gNode +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/line.go b/vendor/github.com/golangci/golines/shorten/internal/line.go new file mode 100644 index 000000000..a195469d6 --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/line.go @@ -0,0 +1,16 @@ +package internal + +// LineLength gets the width of the provided line after tab expansion. +func LineLength(line string, tabLen int) int { + length := 0 + + for _, char := range line { + if char == '\t' { + length += tabLen + } else { + length++ + } + } + + return length +} diff --git a/vendor/github.com/golangci/golines/shorten/internal/tags/filler.go b/vendor/github.com/golangci/golines/shorten/internal/tags/filler.go new file mode 100644 index 000000000..d5efe8737 --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/internal/tags/filler.go @@ -0,0 +1,42 @@ +package tags + +import "fmt" + +type tagEntry struct { + Key string + Content string +} + +// filler is used to collect tags. +// It uses a slice to keep track of the tags in order of appearance. +type filler struct { + data []*tagEntry + + uniq map[string]*tagEntry +} + +func newFiller() *filler { + return &filler{ + uniq: map[string]*tagEntry{}, + } +} + +func (f *filler) Data() []*tagEntry { + return f.data +} + +func (f *filler) Fill(key, value string) error { + if e, ok := f.uniq[key]; ok { + e.Content += " " + fmt.Sprintf("%s:%q", key, value) + } else { + entry := &tagEntry{ + Key: key, + Content: fmt.Sprintf("%s:%q", key, value), + } + + f.uniq[key] = entry + f.data = append(f.data, entry) + } + + return nil +} diff --git a/vendor/github.com/golangci/golines/tags.go b/vendor/github.com/golangci/golines/shorten/internal/tags/tags.go similarity index 59% rename from vendor/github.com/golangci/golines/tags.go rename to vendor/github.com/golangci/golines/shorten/internal/tags/tags.go index f5321fab4..ef9305b88 100644 --- a/vendor/github.com/golangci/golines/tags.go +++ b/vendor/github.com/golangci/golines/shorten/internal/tags/tags.go @@ -1,27 +1,23 @@ -package golines +package tags import ( "fmt" - "reflect" "regexp" + "slices" "strings" + "unicode/utf8" "github.com/dave/dst" - "github.com/fatih/structtag" + "github.com/golangci/golines/shorten/internal/annotation" + "github.com/ldez/structtags/parser" ) var structTagRegexp = regexp.MustCompile("`([ ]*[a-zA-Z0-9_-]+:\".*\"[ ]*){2,}`") -// HasMultiKeyTags returns whether the given lines have a multikey struct line. -// It's used as an optimization step to avoid unnnecessary shortening rounds. -func HasMultiKeyTags(lines []string) bool { - for _, line := range lines { - if structTagRegexp.MatchString(line) { - return true - } - } - - return false +// HasMultipleEntries returns whether the given lines have a multi-entries struct line. +// It's used as an optimization step to avoid unnecessary shortening rounds. +func HasMultipleEntries(lines []string) bool { + return slices.ContainsFunc(lines, structTagRegexp.MatchString) } // FormatStructTags formats struct tags so that the keys within each block of fields are aligned. @@ -34,35 +30,54 @@ func FormatStructTags(fieldList *dst.FieldList) { return } - blockFields := []*dst.Field{} + var blockFields []*dst.Field + + // Divide fields into "blocks" so that we don't do alignments across blank lines and comments. + for _, field := range fieldList.List { + if isEndFieldsBlock(field) { + align(blockFields) - // Divide fields into "blocks" so that we don't do alignments across blank lines - for f, field := range fieldList.List { - if f == 0 || field.Decorations().Before == dst.EmptyLine { - alignTags(blockFields) blockFields = blockFields[:0] } blockFields = append(blockFields, field) } - alignTags(blockFields) + align(blockFields) +} + +func isEndFieldsBlock(field *dst.Field) bool { + return field.Decorations().Before == dst.EmptyLine || + slices.ContainsFunc(field.Decorations().Start.All(), func(s string) bool { + return !annotation.Is(s) + }) } -// alignTags formats the struct tags within a single field block. -func alignTags(fields []*dst.Field) { +// align formats the struct tags within a single field block. +// NOTE(ldez): all the code of `align` is not related to shorten, +// instead of shortening a line, it increases the line length. +// It must be either: +// - disabled by default +// - or the additional spaces should be an option +// - or maybe removed. +func align(fields []*dst.Field) { if len(fields) == 0 { return } maxTagWidths := map[string]int{} - tagKeys := []string{} + + var tagKeys []string + tagKVs := make([]map[string]string, len(fields)) - maxTypeWidth := 0 - invalidWidths := false + var ( + maxTypeWidth int + invalidWidths bool + ) // First, scan over all field tags so that we can understand their values and widths + for f, field := range fields { if len(field.Names) > 0 { typeWidth, err := getWidth(field.Type) @@ -84,34 +99,30 @@ func alignTags(fields []*dst.Field) { if tagValue[0] != '`' || tagValue[len(tagValue)-1] != '`' { continue } + tagValue = tagValue[1 : len(tagValue)-1] - subTags, err := structtag.Parse(tagValue) + entries, err := parser.Tag(tagValue, newFiller()) if err != nil { return } - subTagKeys := subTags.Keys() - - structTag := reflect.StructTag(tagValue) - - for _, key := range subTagKeys { - value := structTag.Get(key) + for _, entry := range entries { // Tag is key, value, and some extra chars (two quotes + one colon) - width := len(key) + tagValueLen(value) + 3 + width := utf8.RuneCountInString(entry.Content) - if _, ok := maxTagWidths[key]; !ok { - maxTagWidths[key] = width - tagKeys = append(tagKeys, key) - } else if width > maxTagWidths[key] { - maxTagWidths[key] = width + if _, ok := maxTagWidths[entry.Key]; !ok { + maxTagWidths[entry.Key] = width + tagKeys = append(tagKeys, entry.Key) + } else if width > maxTagWidths[entry.Key] { + maxTagWidths[entry.Key] = width } if tagKVs[f] == nil { tagKVs[f] = map[string]string{} } - tagKVs[f][key] = value + tagKVs[f][entry.Key] = entry.Content } } @@ -121,24 +132,22 @@ func alignTags(fields []*dst.Field) { continue } - tagComponents := []string{} + var tagComponents []string if len(field.Names) == 0 && maxTypeWidth > 0 && !invalidWidths { // Add extra spacing at beginning so that tag aligns with named field tags tagComponents = append(tagComponents, "") - for i := 0; i < maxTypeWidth; i++ { - tagComponents[len(tagComponents)-1] += " " - } + tagComponents[len(tagComponents)-1] += strings.Repeat(" ", maxTypeWidth) } for _, key := range tagKeys { - value, ok := tagKVs[f][key] + content, ok := tagKVs[f][key] lenUsed := 0 if ok { - tagComponents = append(tagComponents, fmt.Sprintf("%s:\"%s\"", key, value)) - lenUsed += len(key) + tagValueLen(value) + 3 + tagComponents = append(tagComponents, content) + lenUsed += utf8.RuneCountInString(content) } else { tagComponents = append(tagComponents, "") } @@ -146,25 +155,17 @@ func alignTags(fields []*dst.Field) { if len(field.Names) > 0 || !invalidWidths { lenRemaining := maxTagWidths[key] - lenUsed - for i := 0; i < lenRemaining; i++ { - tagComponents[len(tagComponents)-1] += " " - } + tagComponents[len(tagComponents)-1] += strings.Repeat(" ", lenRemaining) } } - updatedTagValue := strings.TrimRight(strings.Join(tagComponents, " "), " ") - field.Tag.Value = fmt.Sprintf("`%s`", updatedTagValue) + field.Tag.Value = fmt.Sprintf("`%s`", + strings.TrimRight(strings.Join(tagComponents, " "), " ")) } } -// get real tag value's length, fix multi-byte character's length, such as `ï` -// or `中文` -func tagValueLen(s string) int { - return len([]rune(s)) -} - -// getWidth tries to guess the formatted width of a dst node expression. If this isn't (yet) -// possible, it returns an error. +// getWidth tries to guess the formatted width of a dst node expression. +// If this isn't (yet) possible, it returns an error. func getWidth(node dst.Node) (int, error) { switch n := node.(type) { case *dst.ArrayType: @@ -174,6 +175,7 @@ func getWidth(node dst.Node) (int, error) { } return 2 + eltWidth, nil + case *dst.ChanType: valWidth, err := getWidth(n.Value) if err != nil { @@ -190,8 +192,10 @@ func getWidth(node dst.Node) (int, error) { // Channel includes an arrow return 7 + valWidth, nil + case *dst.Ident: return len(n.Name), nil + case *dst.MapType: keyWidth, err := getWidth(n.Key) if err != nil { @@ -204,6 +208,7 @@ func getWidth(node dst.Node) (int, error) { } return 5 + keyWidth + valWidth, nil + case *dst.StarExpr: xWidth, err := getWidth(n.X) if err != nil { @@ -213,5 +218,5 @@ func getWidth(node dst.Node) (int, error) { return 1 + xWidth, nil } - return 0, fmt.Errorf("Could not get width of node %+v", node) + return 0, fmt.Errorf("could not get the width of node %+v", node) } diff --git a/vendor/github.com/golangci/golines/shorten/log.go b/vendor/github.com/golangci/golines/shorten/log.go new file mode 100644 index 000000000..fe1827424 --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/log.go @@ -0,0 +1,9 @@ +package shorten + +type Logger interface { + Debug(msg string, args ...any) +} + +type noopLogger struct{} + +func (n *noopLogger) Debug(_ string, _ ...any) {} diff --git a/vendor/github.com/golangci/golines/shorten/shortener.go b/vendor/github.com/golangci/golines/shorten/shortener.go new file mode 100644 index 000000000..413ce4c9d --- /dev/null +++ b/vendor/github.com/golangci/golines/shorten/shortener.go @@ -0,0 +1,206 @@ +package shorten + +import ( + "bytes" + "fmt" + "go/format" + "log/slog" + "os" + "strings" + + "github.com/dave/dst" + "github.com/dave/dst/decorator" + "github.com/golangci/golines/shorten/internal/comments" + "github.com/golangci/golines/shorten/internal/graph" + "github.com/golangci/golines/shorten/internal/tags" +) + +// The maximum number of shortening "rounds" that we'll allow. +// The shortening process should converge quickly, +// but we have this here as a safety mechanism to prevent loops that prevent termination. +const maxRounds = 20 + +// Config stores the configuration options exposed by a Shortener instance. +type Config struct { + // MaxLen Max target width for each line + MaxLen int + + // TabLen Width of a tab character + TabLen int + + // KeepAnnotations Whether to keep annotations in the final result (for debugging only) + KeepAnnotations bool + + // ShortenComments Whether to shorten comments + ShortenComments bool + + // ReformatTags Whether to reformat struct tags in addition to shortening long lines + ReformatTags bool + + // DotFile Path to write dot-formatted output to (for debugging only) + DotFile string + + // ChainSplitDots Whether to split chain methods by putting dots at the ends of lines + ChainSplitDots bool +} + +// NewDefaultConfig returns a [Config] with default values. +func NewDefaultConfig() *Config { + return &Config{ + MaxLen: 100, + TabLen: 4, + KeepAnnotations: false, + ShortenComments: false, + ReformatTags: true, + DotFile: "", + ChainSplitDots: true, + } +} + +// Options is the type for configuring options of a [Shortener] instance. +type Options func(*Shortener) + +// WithLogger sets the logger to use it for a [Shortener] instance. +func WithLogger(logger Logger) Options { + return func(s *Shortener) { + if logger != nil { + s.logger = logger + } + } +} + +// Shortener shortens a single go file according to a small set of user style preferences. +type Shortener struct { + config *Config + + commentsShortener *comments.Shortener + + logger Logger +} + +// NewShortener creates a new shortener instance from the provided config. +func NewShortener(config *Config, opts ...Options) *Shortener { + if config == nil { + config = NewDefaultConfig() + } + + s := &Shortener{ + config: config, + logger: &noopLogger{}, + } + + if config.ShortenComments { + s.commentsShortener = &comments.Shortener{ + MaxLen: config.MaxLen, + TabLen: config.TabLen, + } + } + + for _, opt := range opts { + opt(s) + } + + return s +} + +// Process shortens the provided golang file content bytes. +func (s *Shortener) Process(content []byte) ([]byte, error) { + var round int + + var err error + + // Do initial, non-line-length-aware formatting + content, err = format.Source(content) + if err != nil { + return nil, fmt.Errorf("error formatting source: %w", err) + } + + for { + s.logger.Debug("starting round", slog.Int("round", round)) + + // Annotate all long lines + lines := strings.Split(string(content), "\n") + annotatedLines, nbLinesToShorten := s.annotateLongLines(lines) + + if !s.shouldContinue(nbLinesToShorten, round, lines) { + s.logger.Debug("nothing more to shorten or reformat, stopping") + + break + } + + content = []byte(strings.Join(annotatedLines, "\n")) + + // Generate AST + result, err := decorator.Parse(content) + if err != nil { + return nil, err + } + + if s.config.DotFile != "" { + err = s.createDot(result) + if err != nil { + return nil, err + } + } + + // Process the file. + s.formatFile(result) + + // Materialize output + output := bytes.NewBuffer([]byte{}) + + err = decorator.Fprint(output, result) + if err != nil { + return nil, fmt.Errorf("error parsing source: %w", err) + } + + content = output.Bytes() + + round++ + + if round > maxRounds { + s.logger.Debug("hit max rounds, stopping") + + break + } + } + + if !s.config.KeepAnnotations { + content = removeAnnotations(content) + } + + if s.commentsShortener != nil { + content = s.commentsShortener.Process(content) + } + + // Do the final round of non-line-length-aware formatting after we've fixed up the comments + content, err = format.Source(content) + if err != nil { + return nil, fmt.Errorf("error formatting source: %w", err) + } + + return content, nil +} + +// shouldContinue returns true: +// if there are lines to shorten, +// or if this is the first round (0), +// and the option to reformat struct tags is enabled, +// and there are struct tags with multiple entries. +func (s *Shortener) shouldContinue(nbLinesToShorten, round int, lines []string) bool { + return nbLinesToShorten > 0 || + round == 0 && s.config.ReformatTags && tags.HasMultipleEntries(lines) +} + +func (s *Shortener) createDot(result dst.Node) error { + dotFile, err := os.Create(s.config.DotFile) + if err != nil { + return err + } + + defer dotFile.Close() + + s.logger.Debug("writing dot file output", slog.String("file", s.config.DotFile)) + + return graph.CreateDot(result, dotFile) +} diff --git a/vendor/github.com/golangci/golines/shortener.go b/vendor/github.com/golangci/golines/shortener.go deleted file mode 100644 index c35b5f35b..000000000 --- a/vendor/github.com/golangci/golines/shortener.go +++ /dev/null @@ -1,594 +0,0 @@ -package golines - -import ( - "bufio" - "bytes" - "fmt" - "go/format" - "go/token" - "os/exec" - "reflect" - "regexp" - "strings" - - "github.com/dave/dst" - "github.com/dave/dst/decorator" -) - -var ( - // Strings to look for to identify generated files - generatedTerms = []string{ - "do not edit", - "generated by", - "automatically regenerated", - } - // Go directives (should be ignored) - goDirectiveLine = regexp.MustCompile(`\s*//\s*go:.*`) -) - -// The maximum number of shortening "rounds" that we'll allow. The shortening -// process should converge quickly, but we have this here as a safety mechanism to -// prevent loops that prevent termination. -const maxRounds = 20 - -// ShortenerConfig stores the configuration options exposed by a Shortener instance. -type ShortenerConfig struct { - MaxLen int // Max target width for each line - TabLen int // Width of a tab character - KeepAnnotations bool // Whether to keep annotations in final result (for debugging only) - ShortenComments bool // Whether to shorten comments - ReformatTags bool // Whether to reformat struct tags in addition to shortening long lines - IgnoreGenerated bool // Whether to ignore generated files - DotFile string // Path to write dot-formatted output to (for debugging only) - ChainSplitDots bool // Whether to split chain methods by putting dots at ends of lines - - // Formatter that will be run before and after main shortening process. If empty, - // defaults to goimports (if found), otherwise gofmt. - BaseFormatterCmd string -} - -// Shortener shortens a single go file according to a small set of user style -// preferences. -type Shortener struct { - config ShortenerConfig - - // Some extra params around the base formatter generated from the BaseFormatterCmd - // argument in the config. - baseFormatter string - baseFormatterArgs []string -} - -// NewShortener creates a new shortener instance from the provided config. -func NewShortener(config ShortenerConfig) *Shortener { - var formatterComponents []string - - // golangci-lint: hardcoded base formatter. - // Note: - // - the command `gofmt` is not used, it calls `format.Source`. - // - the format is related to `go fmt` and not `gofmt`. - config.BaseFormatterCmd = "gofmt" - - if config.BaseFormatterCmd == "" { - _, err := exec.LookPath("goimports") - if err != nil { - formatterComponents = []string{"gofmt"} - } else { - formatterComponents = []string{"goimports"} - } - } else { - formatterComponents = strings.Split(config.BaseFormatterCmd, " ") - } - - s := &Shortener{ - config: config, - baseFormatter: formatterComponents[0], - } - - if len(formatterComponents) > 1 { - s.baseFormatterArgs = formatterComponents[1:] - } else { - s.baseFormatterArgs = []string{} - } - - return s -} - -// Shorten shortens the provided golang file content bytes. -func (s *Shortener) Shorten(contents []byte) ([]byte, error) { - if s.config.IgnoreGenerated && s.isGenerated(contents) { - return contents, nil - } - - round := 0 - var err error - - // Do initial, non-line-length-aware formatting - contents, err = s.formatSrc(contents) - if err != nil { - return nil, fmt.Errorf("Error formatting source: %+v", err) - } - - for { - // Annotate all long lines - lines := strings.Split(string(contents), "\n") - annotatedLines, linesToShorten := s.annotateLongLines(lines) - var stop bool - - if linesToShorten == 0 { - if round == 0 { - if !s.config.ReformatTags { - stop = true - } else if !HasMultiKeyTags(lines) { - stop = true - } - } else { - stop = true - } - } - - if stop { - break - } - - contents = []byte(strings.Join(annotatedLines, "\n")) - - // Generate AST - result, err := decorator.Parse(contents) - if err != nil { - return nil, err - } - - // Shorten the file starting at the top-level declarations - for _, decl := range result.Decls { - s.formatNode(decl) - } - - // Materialize output - output := bytes.NewBuffer([]byte{}) - err = decorator.Fprint(output, result) - if err != nil { - return nil, fmt.Errorf("Error parsing source: %+v", err) - } - contents = output.Bytes() - - round++ - - if round > maxRounds { - break - } - } - - if !s.config.KeepAnnotations { - contents = s.removeAnnotations(contents) - } - if s.config.ShortenComments { - contents = s.shortenCommentsFunc(contents) - } - - // Do final round of non-line-length-aware formatting after we've fixed up the comments - contents, err = s.formatSrc(contents) - if err != nil { - return nil, fmt.Errorf("Error formatting source: %+v", err) - } - - return contents, nil -} - -// formatSrc formats the provided source bytes using the configured "base" formatter (typically -// goimports or gofmt). -func (s *Shortener) formatSrc(contents []byte) ([]byte, error) { - if s.baseFormatter == "gofmt" { - return format.Source(contents) - } - - cmd := exec.Command(s.baseFormatter, s.baseFormatterArgs...) - stdinPipe, err := cmd.StdinPipe() - if err != nil { - return nil, err - } - - outBuffer := &bytes.Buffer{} - cmd.Stdout = outBuffer - - if err = cmd.Start(); err != nil { - return nil, err - } - - _, err = stdinPipe.Write(contents) - if err != nil { - return nil, err - } - stdinPipe.Close() - - err = cmd.Wait() - if err != nil { - return nil, err - } - - return outBuffer.Bytes(), nil -} - -// annotateLongLines adds specially-formatted comments to all eligible lines that are longer than -// the configured target length. If a line already has one of these comments from a previous -// shortening round, then the comment contents are updated. -func (s *Shortener) annotateLongLines(lines []string) ([]string, int) { - annotatedLines := []string{} - linesToShorten := 0 - prevLen := -1 - - for _, line := range lines { - length := s.lineLen(line) - - if prevLen > -1 { - if length <= s.config.MaxLen { - // Shortening successful, remove previous annotation - annotatedLines = annotatedLines[:len(annotatedLines)-1] - } else if length < prevLen { - // Replace annotation with new length - annotatedLines[len(annotatedLines)-1] = CreateAnnotation(length) - linesToShorten++ - } - } else if !s.isComment(line) && length > s.config.MaxLen { - annotatedLines = append( - annotatedLines, - CreateAnnotation(length), - ) - linesToShorten++ - } - - annotatedLines = append(annotatedLines, line) - prevLen = ParseAnnotation(line) - } - - return annotatedLines, linesToShorten -} - -// removeAnnotations removes all comments that were added by the annotateLongLines -// function above. -func (s *Shortener) removeAnnotations(contents []byte) []byte { - cleanedLines := []string{} - lines := strings.Split(string(contents), "\n") - - for _, line := range lines { - if !IsAnnotation(line) { - cleanedLines = append(cleanedLines, line) - } - } - - return []byte(strings.Join(cleanedLines, "\n")) -} - -// shortenCommentsFunc attempts to shorten long comments in the provided source. As noted -// in the repo README, this functionality has some quirks and is disabled by default. -func (s *Shortener) shortenCommentsFunc(contents []byte) []byte { - cleanedLines := []string{} - words := []string{} // all words in a contiguous sequence of long comments - prefix := "" - lines := strings.Split(string(contents), "\n") - for _, line := range lines { - if s.isComment(line) && !IsAnnotation(line) && - !s.isGoDirective(line) && - s.lineLen(line) > s.config.MaxLen { - start := strings.Index(line, "//") - prefix = line[0:(start + 2)] - trimmedLine := strings.Trim(line[(start+2):], " ") - currLineWords := strings.Split(trimmedLine, " ") - words = append(words, currLineWords...) - } else { - // Reflow the accumulated `words` before appending the unprocessed `line`. - currLineLen := 0 - currLineWords := []string{} - maxCommentLen := s.config.MaxLen - s.lineLen(prefix) - for _, word := range words { - if currLineLen > 0 && currLineLen+1+len(word) > maxCommentLen { - cleanedLines = append( - cleanedLines, - fmt.Sprintf( - "%s %s", - prefix, - strings.Join(currLineWords, " "), - ), - ) - currLineWords = []string{} - currLineLen = 0 - } - currLineWords = append(currLineWords, word) - currLineLen += 1 + len(word) - } - if currLineLen > 0 { - cleanedLines = append( - cleanedLines, - fmt.Sprintf( - "%s %s", - prefix, - strings.Join(currLineWords, " "), - ), - ) - } - words = []string{} - - cleanedLines = append(cleanedLines, line) - } - } - return []byte(strings.Join(cleanedLines, "\n")) -} - -// lineLen gets the width of the provided line after tab expansion. -func (s *Shortener) lineLen(line string) int { - length := 0 - - for _, char := range line { - if char == '\t' { - length += s.config.TabLen - } else { - length++ - } - } - - return length -} - -// isComment determines whether the provided line is a non-block comment. -func (s *Shortener) isComment(line string) bool { - return strings.HasPrefix(strings.Trim(line, " \t"), "//") -} - -// isGoDirective determines whether the provided line is a go directive, e.g. for go generate. -func (s *Shortener) isGoDirective(line string) bool { - return goDirectiveLine.MatchString(line) -} - -// formatNode formats the provided AST node. The appropriate helper function is called -// based on whether the node is a declaration, expression, statement, or spec. -func (s *Shortener) formatNode(node dst.Node) { - switch n := node.(type) { - case dst.Decl: - s.formatDecl(n) - case dst.Expr: - s.formatExpr(n, false, false) - case dst.Stmt: - s.formatStmt(n) - case dst.Spec: - s.formatSpec(n, false) - default: - // noop - } -} - -// formatDecl formats an AST declaration node. These include function declarations, -// imports, and constants. -func (s *Shortener) formatDecl(decl dst.Decl) { - switch d := decl.(type) { - case *dst.FuncDecl: - if HasAnnotationRecursive(decl) { - if d.Type != nil && d.Type.Params != nil { - s.formatFieldList(d.Type.Params) - } - } - s.formatStmt(d.Body) - case *dst.GenDecl: - for _, spec := range d.Specs { - s.formatSpec(spec, HasAnnotation(decl)) - } - default: - // noop - } -} - -// formatFieldList formats a field list in a function declaration. -func (s *Shortener) formatFieldList(fieldList *dst.FieldList) { - for f, field := range fieldList.List { - if f == 0 { - field.Decorations().Before = dst.NewLine - } else { - field.Decorations().Before = dst.None - } - - field.Decorations().After = dst.NewLine - } -} - -// formatStmt formats an AST statement node. Among other examples, these include assignments, -// case clauses, for statements, if statements, and select statements. -func (s *Shortener) formatStmt(stmt dst.Stmt) { - // Explicitly check for nil statements - stmtType := reflect.TypeOf(stmt) - if reflect.ValueOf(stmt) == reflect.Zero(stmtType) { - return - } - - shouldShorten := HasAnnotation(stmt) - - switch st := stmt.(type) { - case *dst.AssignStmt: - for _, expr := range st.Rhs { - s.formatExpr(expr, shouldShorten, false) - } - case *dst.BlockStmt: - for _, stmt := range st.List { - s.formatStmt(stmt) - } - case *dst.CaseClause: - if shouldShorten { - for _, arg := range st.List { - arg.Decorations().After = dst.NewLine - s.formatExpr(arg, false, false) - } - } - - for _, stmt := range st.Body { - s.formatStmt(stmt) - } - case *dst.CommClause: - for _, stmt := range st.Body { - s.formatStmt(stmt) - } - case *dst.DeclStmt: - s.formatDecl(st.Decl) - case *dst.DeferStmt: - s.formatExpr(st.Call, shouldShorten, false) - case *dst.ExprStmt: - s.formatExpr(st.X, shouldShorten, false) - case *dst.ForStmt: - s.formatStmt(st.Body) - case *dst.GoStmt: - s.formatExpr(st.Call, shouldShorten, false) - case *dst.IfStmt: - s.formatExpr(st.Cond, shouldShorten, false) - s.formatStmt(st.Body) - case *dst.RangeStmt: - s.formatStmt(st.Body) - case *dst.ReturnStmt: - for _, expr := range st.Results { - s.formatExpr(expr, shouldShorten, false) - } - case *dst.SelectStmt: - s.formatStmt(st.Body) - case *dst.SwitchStmt: - s.formatStmt(st.Body) - default: - // noop - } -} - -// formatExpr formats an AST expression node. These include uniary and binary expressions, function -// literals, and key/value pair statements, among others. -func (s *Shortener) formatExpr(expr dst.Expr, force bool, isChain bool) { - shouldShorten := force || HasAnnotation(expr) - - switch e := expr.(type) { - case *dst.BinaryExpr: - if (e.Op == token.LAND || e.Op == token.LOR) && shouldShorten { - if e.Y.Decorations().Before == dst.NewLine { - s.formatExpr(e.X, force, isChain) - } else { - e.Y.Decorations().Before = dst.NewLine - } - } else { - s.formatExpr(e.X, shouldShorten, isChain) - s.formatExpr(e.Y, shouldShorten, isChain) - } - case *dst.CallExpr: - _, ok := e.Fun.(*dst.SelectorExpr) - - if ok && - s.config.ChainSplitDots && - (shouldShorten || HasAnnotationRecursive(e)) && - (isChain || s.chainLength(e) > 1) { - e.Decorations().After = dst.NewLine - - for _, arg := range e.Args { - s.formatExpr(arg, false, true) - } - - s.formatExpr(e.Fun, shouldShorten, true) - } else { - shortenChildArgs := shouldShorten || HasAnnotationRecursive(e) - - for a, arg := range e.Args { - if shortenChildArgs { - if a == 0 { - arg.Decorations().Before = dst.NewLine - } else { - arg.Decorations().After = dst.None - } - arg.Decorations().After = dst.NewLine - } - s.formatExpr(arg, false, isChain) - } - s.formatExpr(e.Fun, shouldShorten, isChain) - } - case *dst.CompositeLit: - if shouldShorten { - for i, element := range e.Elts { - if i == 0 { - element.Decorations().Before = dst.NewLine - } - element.Decorations().After = dst.NewLine - } - } - - for _, element := range e.Elts { - s.formatExpr(element, false, isChain) - } - case *dst.FuncLit: - s.formatStmt(e.Body) - case *dst.FuncType: - if shouldShorten { - s.formatFieldList(e.Params) - } - case *dst.InterfaceType: - for _, method := range e.Methods.List { - if HasAnnotation(method) { - s.formatExpr(method.Type, true, isChain) - } - } - case *dst.KeyValueExpr: - s.formatExpr(e.Value, shouldShorten, isChain) - case *dst.SelectorExpr: - s.formatExpr(e.X, shouldShorten, isChain) - case *dst.StructType: - if s.config.ReformatTags { - FormatStructTags(e.Fields) - } - case *dst.UnaryExpr: - s.formatExpr(e.X, shouldShorten, isChain) - default: - // noop - } -} - -// formatSpec formats an AST spec node. These include type specifications, among other things. -func (s *Shortener) formatSpec(spec dst.Spec, force bool) { - shouldShorten := HasAnnotation(spec) || force - switch sp := spec.(type) { - case *dst.ValueSpec: - for _, expr := range sp.Values { - s.formatExpr(expr, shouldShorten, false) - } - case *dst.TypeSpec: - s.formatExpr(sp.Type, false, false) - default: - // noop - } -} - -// isGenerated checks whether the provided file bytes are from a generated file. -// This is done by looking for a set of typically-used strings in the first 5 lines. -func (s *Shortener) isGenerated(contents []byte) bool { - scanner := bufio.NewScanner(bytes.NewBuffer(contents)) - - for i := 0; scanner.Scan(); i++ { - if i >= 5 { - return false - } - - for _, term := range generatedTerms { - if strings.Contains(strings.ToLower(scanner.Text()), term) { - return true - } - } - } - - return false -} - -// chainLength determines the length of the function call chain in an expression. -func (s *Shortener) chainLength(callExpr *dst.CallExpr) int { - numCalls := 1 - currCall := callExpr - - for { - selectorExpr, ok := currCall.Fun.(*dst.SelectorExpr) - if !ok { - break - } - currCall, ok = selectorExpr.X.(*dst.CallExpr) - if !ok { - break - } - numCalls++ - } - - return numCalls -} diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go index 39e56f222..d9a00f21d 100644 --- a/vendor/github.com/hashicorp/hcl/decoder.go +++ b/vendor/github.com/hashicorp/hcl/decoder.go @@ -24,18 +24,7 @@ var ( // Unmarshal accepts a byte slice as input and writes the // data to the value pointed to by v. func Unmarshal(bs []byte, v interface{}) error { - root, err := parse(bs, false) - if err != nil { - return err - } - - return DecodeObject(v, root) -} - -// UnmarshalErrorOnDuplicates accepts a byte slice as input and writes the -// data to the value pointed to by v but errors on duplicate attribute key. -func UnmarshalErrorOnDuplicates(bs []byte, v interface{}) error { - root, err := parse(bs, true) + root, err := parse(bs) if err != nil { return err } @@ -46,19 +35,7 @@ func UnmarshalErrorOnDuplicates(bs []byte, v interface{}) error { // Decode reads the given input and decodes it into the structure // given by `out`. func Decode(out interface{}, in string) error { - return decode(out, in, false) -} - -// DecodeErrorOnDuplicates reads the given input and decodes it into the structure but errrors on duplicate attribute key -// given by `out`. -func DecodeErrorOnDuplicates(out interface{}, in string) error { - return decode(out, in, true) -} - -// decode reads the given input and decodes it into the structure given by `out`. -// takes in a boolean to determine if it should error on duplicate attribute -func decode(out interface{}, in string, errorOnDuplicateAtributes bool) error { - obj, err := parse([]byte(in), errorOnDuplicateAtributes) + obj, err := Parse(in) if err != nil { return err } @@ -416,16 +393,10 @@ func (d *decoder) decodeMap(name string, node ast.Node, result reflect.Value) er // Set the final map if we can set.Set(resultMap) - return nil } func (d *decoder) decodePtr(name string, node ast.Node, result reflect.Value) error { - // if pointer is not nil, decode into existing value - if !result.IsNil() { - return d.decode(name, node, result.Elem()) - } - // Create an element of the concrete (non pointer) type and decode // into that. Then set the value of the pointer to this type. resultType := result.Type() diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go index 0f5d929c6..64c83bcfb 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go +++ b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go @@ -27,35 +27,22 @@ type Parser struct { enableTrace bool indent int n int // buffer size (max = 1) - - errorOnDuplicateKeys bool } -func newParser(src []byte, errorOnDuplicateKeys bool) *Parser { +func newParser(src []byte) *Parser { return &Parser{ - sc: scanner.New(src), - errorOnDuplicateKeys: errorOnDuplicateKeys, + sc: scanner.New(src), } } // Parse returns the fully parsed source and returns the abstract syntax tree. func Parse(src []byte) (*ast.File, error) { - return parse(src, true) -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func ParseDontErrorOnDuplicateKeys(src []byte) (*ast.File, error) { - return parse(src, false) -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func parse(src []byte, errorOnDuplicateKeys bool) (*ast.File, error) { // normalize all line endings // since the scanner and output only work with "\n" line endings, we may // end up with dangling "\r" characters in the parsed data. src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1) - p := newParser(src, errorOnDuplicateKeys) + p := newParser(src) return p.Parse() } @@ -78,7 +65,6 @@ func (p *Parser) Parse() (*ast.File, error) { } f.Comments = p.comments - return f, nil } @@ -90,7 +76,6 @@ func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) { defer un(trace(p, "ParseObjectList")) node := &ast.ObjectList{} - seenKeys := map[string]struct{}{} for { if obj { tok := p.scan() @@ -98,29 +83,11 @@ func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) { if tok.Type == token.RBRACE { break } - } n, err := p.objectItem() - if err == errEofToken { break // we are finished - } else if err != nil { - return nil, err - } - - if n.Assign.String() != "-" { - for _, key := range n.Keys { - if !p.errorOnDuplicateKeys { - break - } - _, ok := seenKeys[key.Token.Text] - if ok { - return nil, errors.New(fmt.Sprintf("The argument %q at %s was already set. Each argument can only be defined once", key.Token.Text, key.Token.Pos.String())) - - } - seenKeys[key.Token.Text] = struct{}{} - } } // we don't return a nil node, because might want to use already @@ -357,8 +324,6 @@ func (p *Parser) objectType() (*ast.ObjectType, error) { // not a RBRACE, it's an syntax error and we just return it. if err != nil && p.tok.Type != token.RBRACE { return nil, err - } else if err != nil { - return nil, err } // No error, scan and expect the ending to be a brace @@ -400,7 +365,6 @@ func (p *Parser) listType() (*ast.ListType, error) { } switch tok.Type { case token.BOOL, token.NUMBER, token.FLOAT, token.STRING, token.HEREDOC: - node, err := p.literalType() if err != nil { return nil, err diff --git a/vendor/github.com/hashicorp/hcl/parse.go b/vendor/github.com/hashicorp/hcl/parse.go index f4cc1255e..1fca53c4c 100644 --- a/vendor/github.com/hashicorp/hcl/parse.go +++ b/vendor/github.com/hashicorp/hcl/parse.go @@ -12,20 +12,17 @@ import ( // // Input can be either JSON or HCL func ParseBytes(in []byte) (*ast.File, error) { - return parse(in, true) + return parse(in) } // ParseString accepts input as a string and returns ast tree. func ParseString(input string) (*ast.File, error) { - return parse([]byte(input), true) + return parse([]byte(input)) } -func parse(in []byte, errorOnDuplicateKeys bool) (*ast.File, error) { +func parse(in []byte) (*ast.File, error) { switch lexMode(in) { case lexModeHcl: - if !errorOnDuplicateKeys { - return hclParser.ParseDontErrorOnDuplicateKeys(in) - } return hclParser.Parse(in) case lexModeJson: return jsonParser.Parse(in) @@ -38,5 +35,5 @@ func parse(in []byte, errorOnDuplicateKeys bool) (*ast.File, error) { // // The input format can be either HCL or JSON. func Parse(input string) (*ast.File, error) { - return parse([]byte(input), true) + return parse([]byte(input)) } diff --git a/vendor/github.com/huandu/xstrings/README.md b/vendor/github.com/huandu/xstrings/README.md index e809c79ab..750c3c7eb 100644 --- a/vendor/github.com/huandu/xstrings/README.md +++ b/vendor/github.com/huandu/xstrings/README.md @@ -39,8 +39,8 @@ _Keep this table sorted by Function in ascending order._ | [Count](https://godoc.org/github.com/huandu/xstrings#Count) | `String#count` in Ruby | [#16](https://github.com/huandu/xstrings/issues/16) | | [Delete](https://godoc.org/github.com/huandu/xstrings#Delete) | `String#delete` in Ruby | [#17](https://github.com/huandu/xstrings/issues/17) | | [ExpandTabs](https://godoc.org/github.com/huandu/xstrings#ExpandTabs) | `str.expandtabs` in Python | [#27](https://github.com/huandu/xstrings/issues/27) | -| [FirstRuneToLower](https://godoc.org/github.com/huandu/xstrings#FirstRuneToLower) | `lcfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | -| [FirstRuneToUpper](https://godoc.org/github.com/huandu/xstrings#FirstRuneToUpper) | `String#capitalize` in Ruby; `ucfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | +| [FirstRuneToLower](https://godoc.org/github.com/huandu/xstrings#FirstRuneToLower) | `lcfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | +| [FirstRuneToUpper](https://godoc.org/github.com/huandu/xstrings#FirstRuneToUpper) | `String#capitalize` in Ruby; `ucfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) | | [Insert](https://godoc.org/github.com/huandu/xstrings#Insert) | `String#insert` in Ruby | [#18](https://github.com/huandu/xstrings/issues/18) | | [LastPartition](https://godoc.org/github.com/huandu/xstrings#LastPartition) | `str.rpartition` in Python; `String#rpartition` in Ruby | [#19](https://github.com/huandu/xstrings/issues/19) | | [LeftJustify](https://godoc.org/github.com/huandu/xstrings#LeftJustify) | `str.ljust` in Python; `String#ljust` in Ruby | [#28](https://github.com/huandu/xstrings/issues/28) | @@ -50,15 +50,14 @@ _Keep this table sorted by Function in ascending order._ | [RightJustify](https://godoc.org/github.com/huandu/xstrings#RightJustify) | `str.rjust` in Python; `String#rjust` in Ruby | [#29](https://github.com/huandu/xstrings/issues/29) | | [RuneWidth](https://godoc.org/github.com/huandu/xstrings#RuneWidth) | - | [#27](https://github.com/huandu/xstrings/issues/27) | | [Scrub](https://godoc.org/github.com/huandu/xstrings#Scrub) | `String#scrub` in Ruby | [#20](https://github.com/huandu/xstrings/issues/20) | -| [Shuffle](https://godoc.org/github.com/huandu/xstrings#Shuffle) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | -| [ShuffleSource](https://godoc.org/github.com/huandu/xstrings#ShuffleSource) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | +| [Shuffle](https://godoc.org/github.com/huandu/xstrings#Shuffle) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | +| [ShuffleSource](https://godoc.org/github.com/huandu/xstrings#ShuffleSource) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) | | [Slice](https://godoc.org/github.com/huandu/xstrings#Slice) | `mb_substr` in PHP | [#9](https://github.com/huandu/xstrings/issues/9) | | [Squeeze](https://godoc.org/github.com/huandu/xstrings#Squeeze) | `String#squeeze` in Ruby | [#11](https://github.com/huandu/xstrings/issues/11) | | [Successor](https://godoc.org/github.com/huandu/xstrings#Successor) | `String#succ` or `String#next` in Ruby | [#22](https://github.com/huandu/xstrings/issues/22) | | [SwapCase](https://godoc.org/github.com/huandu/xstrings#SwapCase) | `str.swapcase` in Python; `String#swapcase` in Ruby | [#12](https://github.com/huandu/xstrings/issues/12) | | [ToCamelCase](https://godoc.org/github.com/huandu/xstrings#ToCamelCase) | `String#camelize` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) | | [ToKebab](https://godoc.org/github.com/huandu/xstrings#ToKebabCase) | - | [#41](https://github.com/huandu/xstrings/issues/41) | -| [ToPascalCase](https://godoc.org/github.com/huandu/xstrings#ToPascalCase) | - | [#1](https://github.com/huandu/xstrings/issues/1) | | [ToSnakeCase](https://godoc.org/github.com/huandu/xstrings#ToSnakeCase) | `String#underscore` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) | | [Translate](https://godoc.org/github.com/huandu/xstrings#Translate) | `str.translate` in Python; `String#tr` in Ruby; `strtr` in PHP; `tr///` in Perl | [#21](https://github.com/huandu/xstrings/issues/21) | | [Width](https://godoc.org/github.com/huandu/xstrings#Width) | `mb_strwidth` in PHP | [#26](https://github.com/huandu/xstrings/issues/26) | diff --git a/vendor/github.com/huandu/xstrings/convert.go b/vendor/github.com/huandu/xstrings/convert.go index 5d8cfee47..151c3151d 100644 --- a/vendor/github.com/huandu/xstrings/convert.go +++ b/vendor/github.com/huandu/xstrings/convert.go @@ -12,38 +12,17 @@ import ( // ToCamelCase is to convert words separated by space, underscore and hyphen to camel case. // // Some samples. -// -// "some_words" => "someWords" -// "http_server" => "httpServer" -// "no_https" => "noHttps" -// "_complex__case_" => "_complex_Case_" -// "some words" => "someWords" -// "GOLANG_IS_GREAT" => "golangIsGreat" +// "some_words" => "SomeWords" +// "http_server" => "HttpServer" +// "no_https" => "NoHttps" +// "_complex__case_" => "_Complex_Case_" +// "some words" => "SomeWords" func ToCamelCase(str string) string { - return toCamelCase(str, false) -} - -// ToPascalCase is to convert words separated by space, underscore and hyphen to pascal case. -// -// Some samples. -// -// "some_words" => "SomeWords" -// "http_server" => "HttpServer" -// "no_https" => "NoHttps" -// "_complex__case_" => "_Complex_Case_" -// "some words" => "SomeWords" -// "GOLANG_IS_GREAT" => "GolangIsGreat" -func ToPascalCase(str string) string { - return toCamelCase(str, true) -} - -func toCamelCase(str string, isBig bool) string { if len(str) == 0 { return "" } buf := &stringBuilder{} - var isFirstRuneUpper bool var r0, r1 rune var size int @@ -53,14 +32,7 @@ func toCamelCase(str string, isBig bool) string { str = str[size:] if !isConnector(r0) { - isFirstRuneUpper = unicode.IsUpper(r0) - - if isBig { - r0 = unicode.ToUpper(r0) - } else { - r0 = unicode.ToLower(r0) - } - + r0 = unicode.ToUpper(r0) break } @@ -87,25 +59,13 @@ func toCamelCase(str string, isBig bool) string { } if isConnector(r1) { - isFirstRuneUpper = unicode.IsUpper(r0) r0 = unicode.ToUpper(r0) } else { - if isFirstRuneUpper { - if unicode.IsUpper(r0) { - r0 = unicode.ToLower(r0) - } else { - isFirstRuneUpper = false - } - } - + r0 = unicode.ToLower(r0) buf.WriteRune(r1) } } - if isFirstRuneUpper && !isBig { - r0 = unicode.ToLower(r0) - } - buf.WriteRune(r0) return buf.String() } @@ -114,17 +74,16 @@ func toCamelCase(str string, isBig bool) string { // snake case format. // // Some samples. -// -// "FirstName" => "first_name" -// "HTTPServer" => "http_server" -// "NoHTTPS" => "no_https" -// "GO_PATH" => "go_path" -// "GO PATH" => "go_path" // space is converted to underscore. -// "GO-PATH" => "go_path" // hyphen is converted to underscore. -// "http2xx" => "http_2xx" // insert an underscore before a number and after an alphabet. -// "HTTP20xOK" => "http_20x_ok" -// "Duration2m3s" => "duration_2m3s" -// "Bld4Floor3rd" => "bld4_floor_3rd" +// "FirstName" => "first_name" +// "HTTPServer" => "http_server" +// "NoHTTPS" => "no_https" +// "GO_PATH" => "go_path" +// "GO PATH" => "go_path" // space is converted to underscore. +// "GO-PATH" => "go_path" // hyphen is converted to underscore. +// "http2xx" => "http_2xx" // insert an underscore before a number and after an alphabet. +// "HTTP20xOK" => "http_20x_ok" +// "Duration2m3s" => "duration_2m3s" +// "Bld4Floor3rd" => "bld4_floor_3rd" func ToSnakeCase(str string) string { return camelCaseToLowerCase(str, '_') } @@ -133,17 +92,16 @@ func ToSnakeCase(str string) string { // kebab case format. // // Some samples. -// -// "FirstName" => "first-name" -// "HTTPServer" => "http-server" -// "NoHTTPS" => "no-https" -// "GO_PATH" => "go-path" -// "GO PATH" => "go-path" // space is converted to '-'. -// "GO-PATH" => "go-path" // hyphen is converted to '-'. -// "http2xx" => "http-2xx" // insert an underscore before a number and after an alphabet. -// "HTTP20xOK" => "http-20x-ok" -// "Duration2m3s" => "duration-2m3s" -// "Bld4Floor3rd" => "bld4-floor-3rd" +// "FirstName" => "first-name" +// "HTTPServer" => "http-server" +// "NoHTTPS" => "no-https" +// "GO_PATH" => "go-path" +// "GO PATH" => "go-path" // space is converted to '-'. +// "GO-PATH" => "go-path" // hyphen is converted to '-'. +// "http2xx" => "http-2xx" // insert an underscore before a number and after an alphabet. +// "HTTP20xOK" => "http-20x-ok" +// "Duration2m3s" => "duration-2m3s" +// "Bld4Floor3rd" => "bld4-floor-3rd" func ToKebabCase(str string) string { return camelCaseToLowerCase(str, '-') } @@ -552,18 +510,17 @@ func ShuffleSource(str string, src rand.Source) string { // regardless whether the result is a valid rune or not. // // Only following characters are alphanumeric. -// - a - z -// - A - Z -// - 0 - 9 +// * a - z +// * A - Z +// * 0 - 9 // // Samples (borrowed from ruby's String#succ document): -// -// "abcd" => "abce" -// "THX1138" => "THX1139" -// "<>" => "<>" -// "1999zzz" => "2000aaa" -// "ZZZ9999" => "AAAA0000" -// "***" => "**+" +// "abcd" => "abce" +// "THX1138" => "THX1139" +// "<>" => "<>" +// "1999zzz" => "2000aaa" +// "ZZZ9999" => "AAAA0000" +// "***" => "**+" func Successor(str string) string { if str == "" { return str diff --git a/vendor/github.com/huandu/xstrings/format.go b/vendor/github.com/huandu/xstrings/format.go index b32219bbd..8cd76c525 100644 --- a/vendor/github.com/huandu/xstrings/format.go +++ b/vendor/github.com/huandu/xstrings/format.go @@ -17,10 +17,9 @@ import ( // If tabSize <= 0, ExpandTabs panics with error. // // Samples: -// -// ExpandTabs("a\tbc\tdef\tghij\tk", 4) => "a bc def ghij k" -// ExpandTabs("abcdefg\thij\nk\tl", 4) => "abcdefg hij\nk l" -// ExpandTabs("z中\t文\tw", 4) => "z中 文 w" +// ExpandTabs("a\tbc\tdef\tghij\tk", 4) => "a bc def ghij k" +// ExpandTabs("abcdefg\thij\nk\tl", 4) => "abcdefg hij\nk l" +// ExpandTabs("z中\t文\tw", 4) => "z中 文 w" func ExpandTabs(str string, tabSize int) string { if tabSize <= 0 { panic("tab size must be positive") @@ -75,10 +74,9 @@ func ExpandTabs(str string, tabSize int) string { // If pad is an empty string, str will be returned. // // Samples: -// -// LeftJustify("hello", 4, " ") => "hello" -// LeftJustify("hello", 10, " ") => "hello " -// LeftJustify("hello", 10, "123") => "hello12312" +// LeftJustify("hello", 4, " ") => "hello" +// LeftJustify("hello", 10, " ") => "hello " +// LeftJustify("hello", 10, "123") => "hello12312" func LeftJustify(str string, length int, pad string) string { l := Len(str) @@ -102,10 +100,9 @@ func LeftJustify(str string, length int, pad string) string { // If pad is an empty string, str will be returned. // // Samples: -// -// RightJustify("hello", 4, " ") => "hello" -// RightJustify("hello", 10, " ") => " hello" -// RightJustify("hello", 10, "123") => "12312hello" +// RightJustify("hello", 4, " ") => "hello" +// RightJustify("hello", 10, " ") => " hello" +// RightJustify("hello", 10, "123") => "12312hello" func RightJustify(str string, length int, pad string) string { l := Len(str) @@ -129,10 +126,9 @@ func RightJustify(str string, length int, pad string) string { // If pad is an empty string, str will be returned. // // Samples: -// -// Center("hello", 4, " ") => "hello" -// Center("hello", 10, " ") => " hello " -// Center("hello", 10, "123") => "12hello123" +// Center("hello", 4, " ") => "hello" +// Center("hello", 10, " ") => " hello " +// Center("hello", 10, "123") => "12hello123" func Center(str string, length int, pad string) string { l := Len(str) diff --git a/vendor/github.com/huandu/xstrings/manipulate.go b/vendor/github.com/huandu/xstrings/manipulate.go index ab42fe0fe..64075f9bb 100644 --- a/vendor/github.com/huandu/xstrings/manipulate.go +++ b/vendor/github.com/huandu/xstrings/manipulate.go @@ -79,12 +79,10 @@ func Slice(str string, start, end int) string { // The return value is a slice of strings with head, match and tail. // // If str contains sep, for example "hello" and "l", Partition returns -// -// "he", "l", "lo" +// "he", "l", "lo" // // If str doesn't contain sep, for example "hello" and "x", Partition returns -// -// "hello", "", "" +// "hello", "", "" func Partition(str, sep string) (head, match, tail string) { index := strings.Index(str, sep) @@ -103,12 +101,10 @@ func Partition(str, sep string) (head, match, tail string) { // The return value is a slice of strings with head, match and tail. // // If str contains sep, for example "hello" and "l", LastPartition returns -// -// "hel", "l", "o" +// "hel", "l", "o" // // If str doesn't contain sep, for example "hello" and "x", LastPartition returns -// -// "", "", "hello" +// "", "", "hello" func LastPartition(str, sep string) (head, match, tail string) { index := strings.LastIndex(str, sep) diff --git a/vendor/github.com/huandu/xstrings/stringbuilder.go b/vendor/github.com/huandu/xstrings/stringbuilder.go index 06812fea0..bb0919d32 100644 --- a/vendor/github.com/huandu/xstrings/stringbuilder.go +++ b/vendor/github.com/huandu/xstrings/stringbuilder.go @@ -1,5 +1,4 @@ -//go:build go1.10 -// +build go1.10 +//+build go1.10 package xstrings diff --git a/vendor/github.com/huandu/xstrings/stringbuilder_go110.go b/vendor/github.com/huandu/xstrings/stringbuilder_go110.go index ccaa5aedd..dac389d13 100644 --- a/vendor/github.com/huandu/xstrings/stringbuilder_go110.go +++ b/vendor/github.com/huandu/xstrings/stringbuilder_go110.go @@ -1,5 +1,4 @@ -//go:build !go1.10 -// +build !go1.10 +//+build !go1.10 package xstrings diff --git a/vendor/github.com/huandu/xstrings/translate.go b/vendor/github.com/huandu/xstrings/translate.go index 1fac6a00b..42e694fb1 100644 --- a/vendor/github.com/huandu/xstrings/translate.go +++ b/vendor/github.com/huandu/xstrings/translate.go @@ -416,16 +416,14 @@ func (tr *Translator) HasPattern() bool { // // From and to are patterns representing a set of characters. Pattern is defined as following. // -// Special characters: -// -// 1. '-' means a range of runes, e.g. -// "a-z" means all characters from 'a' to 'z' inclusive; -// "z-a" means all characters from 'z' to 'a' inclusive. -// 2. '^' as first character means a set of all runes excepted listed, e.g. -// "^a-z" means all characters except 'a' to 'z' inclusive. -// 3. '\' escapes special characters. -// -// Normal character represents itself, e.g. "abc" is a set including 'a', 'b' and 'c'. +// * Special characters +// * '-' means a range of runes, e.g. +// * "a-z" means all characters from 'a' to 'z' inclusive; +// * "z-a" means all characters from 'z' to 'a' inclusive. +// * '^' as first character means a set of all runes excepted listed, e.g. +// * "^a-z" means all characters except 'a' to 'z' inclusive. +// * '\' escapes special characters. +// * Normal character represents itself, e.g. "abc" is a set including 'a', 'b' and 'c'. // // Translate will try to find a 1:1 mapping from from to to. // If to is smaller than from, last rune in to will be used to map "out of range" characters in from. @@ -435,13 +433,12 @@ func (tr *Translator) HasPattern() bool { // If the to pattern is an empty string, Translate works exactly the same as Delete. // // Samples: -// -// Translate("hello", "aeiou", "12345") => "h2ll4" -// Translate("hello", "a-z", "A-Z") => "HELLO" -// Translate("hello", "z-a", "a-z") => "svool" -// Translate("hello", "aeiou", "*") => "h*ll*" -// Translate("hello", "^l", "*") => "**ll*" -// Translate("hello ^ world", `\^lo`, "*") => "he*** * w*r*d" +// Translate("hello", "aeiou", "12345") => "h2ll4" +// Translate("hello", "a-z", "A-Z") => "HELLO" +// Translate("hello", "z-a", "a-z") => "svool" +// Translate("hello", "aeiou", "*") => "h*ll*" +// Translate("hello", "^l", "*") => "**ll*" +// Translate("hello ^ world", `\^lo`, "*") => "he*** * w*r*d" func Translate(str, from, to string) string { tr := NewTranslator(from, to) return tr.Translate(str) @@ -451,10 +448,9 @@ func Translate(str, from, to string) string { // Pattern is defined in Translate function. // // Samples: -// -// Delete("hello", "aeiou") => "hll" -// Delete("hello", "a-k") => "llo" -// Delete("hello", "^a-k") => "he" +// Delete("hello", "aeiou") => "hll" +// Delete("hello", "a-k") => "llo" +// Delete("hello", "^a-k") => "he" func Delete(str, pattern string) string { tr := NewTranslator(pattern, "") return tr.Translate(str) @@ -464,10 +460,9 @@ func Delete(str, pattern string) string { // Pattern is defined in Translate function. // // Samples: -// -// Count("hello", "aeiou") => 3 -// Count("hello", "a-k") => 3 -// Count("hello", "^a-k") => 2 +// Count("hello", "aeiou") => 3 +// Count("hello", "a-k") => 3 +// Count("hello", "^a-k") => 2 func Count(str, pattern string) int { if pattern == "" || str == "" { return 0 @@ -496,10 +491,9 @@ func Count(str, pattern string) int { // If pattern is not empty, only runes matching the pattern will be squeezed. // // Samples: -// -// Squeeze("hello", "") => "helo" -// Squeeze("hello", "m-z") => "hello" -// Squeeze("hello world", " ") => "hello world" +// Squeeze("hello", "") => "helo" +// Squeeze("hello", "m-z") => "hello" +// Squeeze("hello world", " ") => "hello world" func Squeeze(str, pattern string) string { var last, r rune var size int diff --git a/vendor/github.com/jjti/go-spancheck/go.work b/vendor/github.com/jjti/go-spancheck/go.work new file mode 100644 index 000000000..ff04ca17e --- /dev/null +++ b/vendor/github.com/jjti/go-spancheck/go.work @@ -0,0 +1,8 @@ +go 1.22.1 + +use ( + . + ./testdata/base + ./testdata/disableerrorchecks + ./testdata/enableall +) diff --git a/vendor/github.com/jjti/go-spancheck/go.work.sum b/vendor/github.com/jjti/go-spancheck/go.work.sum new file mode 100644 index 000000000..c96d590d6 --- /dev/null +++ b/vendor/github.com/jjti/go-spancheck/go.work.sum @@ -0,0 +1,11 @@ +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= diff --git a/vendor/github.com/ldez/gomoddirectives/gomoddirectives.go b/vendor/github.com/ldez/gomoddirectives/gomoddirectives.go index 7e3df677c..ae416c17f 100644 --- a/vendor/github.com/ldez/gomoddirectives/gomoddirectives.go +++ b/vendor/github.com/ldez/gomoddirectives/gomoddirectives.go @@ -6,10 +6,12 @@ import ( "fmt" "go/token" "regexp" + "slices" "strings" "github.com/ldez/grignotin/gomod" "golang.org/x/mod/modfile" + "golang.org/x/mod/module" "golang.org/x/tools/go/analysis" ) @@ -60,6 +62,7 @@ type Options struct { ToolForbidden bool GoDebugForbidden bool GoVersionPattern *regexp.Regexp + CheckModulePath bool } // AnalyzePass analyzes a pass. @@ -101,6 +104,7 @@ func Analyze(opts Options) ([]Result, error) { // AnalyzeFile analyzes a mod file. func AnalyzeFile(file *modfile.File, opts Options) []Result { checks := []func(file *modfile.File, opts Options) []Result{ + checkModulePath, checkRetractDirectives, checkExcludeDirectives, checkToolDirectives, @@ -119,6 +123,19 @@ func AnalyzeFile(file *modfile.File, opts Options) []Result { return results } +func checkModulePath(file *modfile.File, opts Options) []Result { + if file.Module == nil || !opts.CheckModulePath { + return nil + } + + err := module.CheckPath(file.Module.Mod.Path) + if err != nil { + return []Result{NewResult(file, file.Module.Syntax, err.Error())} + } + + return nil +} + func checkGoVersionDirectives(file *modfile.File, opts Options) []Result { if file == nil || file.Go == nil || opts.GoVersionPattern == nil || opts.GoVersionPattern.MatchString(file.Go.Version) { return nil @@ -243,10 +260,8 @@ func checkReplaceDirective(opts Options, r *modfile.Replace) string { return fmt.Sprintf("%s: %s", reasonReplaceLocal, r.Old.Path) } - for _, v := range opts.ReplaceAllowList { - if r.Old.Path == v { - return "" - } + if slices.Contains(opts.ReplaceAllowList, r.Old.Path) { + return "" } return fmt.Sprintf("%s: %s", reasonReplace, r.Old.Path) diff --git a/vendor/github.com/ldez/gomoddirectives/readme.md b/vendor/github.com/ldez/gomoddirectives/readme.md index 054af4625..52c6a4cbd 100644 --- a/vendor/github.com/ldez/gomoddirectives/readme.md +++ b/vendor/github.com/ldez/gomoddirectives/readme.md @@ -58,6 +58,10 @@ linters: # Defines a pattern to validate `go` minimum version directive. # Default: '' (no match) go-version-pattern: '1\.\d+(\.0)?$' + + # Check the validity of the module path. + # Default: false + check-module-path: true ``` ### As a CLI @@ -66,6 +70,8 @@ linters: gomoddirectives [flags] Flags: + -check-module-path + Check module path validity -exclude Forbid the use of exclude directives -godebug @@ -220,3 +226,13 @@ module example.com/foo go 1.22.0 ``` + +### [`module`](https://go.dev/ref/mod#module-path) path + +- Check the validity of the module path. + +```go +module example.com/foo + +go 1.22 +``` diff --git a/vendor/github.com/ldez/structtags/LICENSE b/vendor/github.com/ldez/structtags/LICENSE new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/vendor/github.com/ldez/structtags/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/vendor/github.com/ldez/structtags/parser/tag.go b/vendor/github.com/ldez/structtags/parser/tag.go new file mode 100644 index 000000000..da9a97f67 --- /dev/null +++ b/vendor/github.com/ldez/structtags/parser/tag.go @@ -0,0 +1,115 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package parser + +import ( + "fmt" + "strconv" +) + +// Filler is the interface implemented by types that can fill elements from a struct tag. +type Filler[T any] interface { + // Data returns the [T] filled by the struct tag content. + Data() T + + // Fill fills the data from a struct tag. + Fill(key, value string) error +} + +// Tag parses a struct tag. +// +// Based on https://github.com/golang/go/blob/411c250d64304033181c46413a6e9381e8fe9b82/src/reflect/type.go#L1030-L1108 +// +//nolint:gocyclo +func Tag[T any](tag string, filler Filler[T]) (T, error) { + base := tag + + for tag != "" { + // Skip leading space. + i := 0 + for i < len(tag) && tag[i] == ' ' { + i++ + } + + tag = tag[i:] + if tag == "" { + break + } + + // Scan to colon. A space, a quote or a control character is a syntax error. + // Strictly speaking, control chars include the range [0x7f, 0x9f], not just + // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters + // as it is simpler to inspect the tag's bytes than the tag's runes. + i = 0 + for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f { + i++ + } + + switch { + case i == 0: + var zero T + + return zero, fmt.Errorf("invalid struct tag syntax `%s`", base) + + case i+1 > len(tag): + var zero T + + return zero, fmt.Errorf("invalid struct tag syntax `%s`: missing `:`", base) + + case i+1 == len(tag): + var zero T + + return zero, fmt.Errorf("invalid struct tag value `%s`", base) + + case tag[i] != ':': + var zero T + + return zero, fmt.Errorf("invalid struct tag syntax `%s`: missing `:`", base) + + case tag[i+1] != '"': + var zero T + + return zero, fmt.Errorf("invalid struct tag value `%s`: missing opening quote", base) + } + + name := tag[:i] + tag = tag[i+1:] + + // Scan quoted string to find value. + i = 1 + for i < len(tag) && tag[i] != '"' { + if tag[i] == '\\' { + i++ + } + + i++ + } + + if i >= len(tag) { + var zero T + + return zero, fmt.Errorf("invalid struct tag value `%s`: missing closing quote", base) + } + + qvalue := tag[:i+1] + tag = tag[i+1:] + + value, err := strconv.Unquote(qvalue) + if err != nil { + var zero T + + return zero, fmt.Errorf("invalid struct tag value `%s`: %w", base, err) + } + + err = filler.Fill(name, value) + if err != nil { + var zero T + + return zero, err + } + } + + return filler.Data(), nil +} diff --git a/vendor/github.com/ldez/structtags/parser/value.go b/vendor/github.com/ldez/structtags/parser/value.go new file mode 100644 index 000000000..cea0cfa81 --- /dev/null +++ b/vendor/github.com/ldez/structtags/parser/value.go @@ -0,0 +1,83 @@ +package parser + +import "fmt" + +// Value parses a tag value. +// The value is split on comma, and escaped commas are ignored. +func Value(raw string, escapeComma bool) ([]string, error) { + if raw == "" { + return []string{""}, nil + } + + var values []string + + for raw != "" { + i := indexEscaped(raw, 0, escapeComma) + + if i == 0 { + values = append(values, "") + raw = raw[i+1:] + + if raw == "" { + values = append(values, "") + + break + } + + continue + } + + if i == len(raw) { + values = append(values, raw[:i]) + + break + } + + if i > len(raw) { + return nil, fmt.Errorf("syntax error in struct tag value %q", raw) + } + + value := raw[:i] + + endComma := raw[i] == ',' && raw[i+1:] == "" + + raw = raw[i+1:] + + values = append(values, value) + + if endComma { + values = append(values, "") + } + } + + return values, nil +} + +func indexEscaped(raw string, i int, escapeComma bool) int { + for i < len(raw) && raw[i] != ',' { + i++ + } + + if !escapeComma { + return i + } + + if i-1 >= 0 && raw[i-1] == '\\' { + j := i - 1 + + count := 1 + + for j >= 0 && raw[j] == '\\' { + count++ + j-- + } + + if count%2 == 0 { + i++ + + return indexEscaped(raw, i, escapeComma) + } + } + + return i +} diff --git a/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work b/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work new file mode 100644 index 000000000..e7f4d93de --- /dev/null +++ b/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work @@ -0,0 +1,8 @@ +go 1.21.1 + +use ( + . + ./cmd/jv +) + +// replace github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 => ./ diff --git a/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work.sum b/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work.sum new file mode 100644 index 000000000..2b5b811d9 --- /dev/null +++ b/vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work.sum @@ -0,0 +1,4 @@ +github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= diff --git a/vendor/github.com/securego/gosec/v2/README.md b/vendor/github.com/securego/gosec/v2/README.md index cbd614b2e..355d4375b 100644 --- a/vendor/github.com/securego/gosec/v2/README.md +++ b/vendor/github.com/securego/gosec/v2/README.md @@ -256,17 +256,52 @@ gosec -exclude-generated ./... ``` ### Auto fixing vulnerabilities + gosec can suggest fixes based on AI recommendation. It will call an AI API to receive a suggestion for a security finding. You can enable this feature by providing the following command line arguments: -- `ai-api-provider`: the name of the AI API provider, currently only `gemini`is supported. -- `ai-api-key` or set the environment variable `GOSEC_AI_API_KEY`: the key to access the AI API, -For gemini, you can create an API key following [these instructions](https://ai.google.dev/gemini-api/docs/api-key). -- `ai-endpoint`: the endpoint of the AI provider, this is optional argument. +- `ai-api-provider`: the name of the AI API provider. Supported providers: + - **Gemini**: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`, `gemini-2.0-flash`, `gemini-2.0-flash-lite` (default) + - **Claude**: `claude-sonnet-4-0` (default), `claude-opus-4-0`, `claude-opus-4-1`, `claude-sonnet-3-7` + - **OpenAI**: `gpt-4o` (default), `gpt-4o-mini` + - **Custom OpenAI-compatible**: Any custom model name (requires `ai-base-url`) +- `ai-api-key` or set the environment variable `GOSEC_AI_API_KEY`: the key to access the AI API + - For Gemini, you can create an API key following [these instructions](https://ai.google.dev/gemini-api/docs/api-key) + - For Claude, get your API key from [Anthropic Console](https://console.anthropic.com/) + - For OpenAI, get your API key from [OpenAI Platform](https://platform.openai.com/api-keys) +- `ai-base-url`: (optional) custom base URL for OpenAI-compatible APIs (e.g., Azure OpenAI, LocalAI, Ollama) +- `ai-skip-ssl`: (optional) skip SSL certificate verification for AI API (useful for self-signed certificates) + +**Examples:** ```bash -gosec -ai-api-provider="gemini" -ai-api-key="your_key" ./... +# Using Gemini +gosec -ai-api-provider="gemini-2.0-flash" -ai-api-key="your_key" ./... + +# Using Claude +gosec -ai-api-provider="claude-sonnet-4-0" -ai-api-key="your_key" ./... + +# Using OpenAI +gosec -ai-api-provider="gpt-4o" -ai-api-key="your_key" ./... + +# Using Azure OpenAI +gosec -ai-api-provider="gpt-4o" \ + -ai-api-key="your_azure_key" \ + -ai-base-url="https://your-resource.openai.azure.com/openai/deployments/your-deployment" \ + ./... + +# Using local Ollama with custom model +gosec -ai-api-provider="llama3.2" \ + -ai-base-url="http://localhost:11434/v1" \ + ./... + +# Using self-signed certificate API +gosec -ai-api-provider="custom-model" \ + -ai-api-key="your_key" \ + -ai-base-url="https://internal-api.company.com/v1" \ + -ai-skip-ssl \ + ./... ``` ### Annotating code diff --git a/vendor/github.com/securego/gosec/v2/issue/issue.go b/vendor/github.com/securego/gosec/v2/issue/issue.go index b7c804e45..28c876b33 100644 --- a/vendor/github.com/securego/gosec/v2/issue/issue.go +++ b/vendor/github.com/securego/gosec/v2/issue/issue.go @@ -67,6 +67,7 @@ var ruleToCWE = map[string]string{ "G112": "400", "G114": "676", "G115": "190", + "G116": "838", "G201": "89", "G202": "89", "G203": "79", diff --git a/vendor/github.com/securego/gosec/v2/rules/rulelist.go b/vendor/github.com/securego/gosec/v2/rules/rulelist.go index 3f8598009..bd8dbbb7d 100644 --- a/vendor/github.com/securego/gosec/v2/rules/rulelist.go +++ b/vendor/github.com/securego/gosec/v2/rules/rulelist.go @@ -76,6 +76,7 @@ func Generate(trackSuppressions bool, filters ...RuleFilter) RuleList { {"G111", "Detect http.Dir('/') as a potential risk", NewDirectoryTraversal}, {"G112", "Detect ReadHeaderTimeout not configured as a potential risk", NewSlowloris}, {"G114", "Use of net/http serve function that has no support for setting timeouts", NewHTTPServeWithoutTimeouts}, + {"G116", "Detect Trojan Source attacks using bidirectional Unicode characters", NewTrojanSource}, // injection {"G201", "SQL query construction using format string", NewSQLStrFormat}, diff --git a/vendor/github.com/securego/gosec/v2/rules/trojansource.go b/vendor/github.com/securego/gosec/v2/rules/trojansource.go new file mode 100644 index 000000000..e2765d269 --- /dev/null +++ b/vendor/github.com/securego/gosec/v2/rules/trojansource.go @@ -0,0 +1,96 @@ +package rules + +import ( + "go/ast" + "os" + + "github.com/securego/gosec/v2" + "github.com/securego/gosec/v2/issue" +) + +type trojanSource struct { + issue.MetaData + bidiChars map[rune]struct{} +} + +func (r *trojanSource) ID() string { + return r.MetaData.ID +} + +func (r *trojanSource) Match(node ast.Node, c *gosec.Context) (*issue.Issue, error) { + if file, ok := node.(*ast.File); ok { + fobj := c.FileSet.File(file.Pos()) + if fobj == nil { + return nil, nil + } + + content, err := os.ReadFile(fobj.Name()) + if err != nil { + return nil, nil + } + + for _, ch := range string(content) { + if _, exists := r.bidiChars[ch]; exists { + return c.NewIssue(node, r.ID(), r.What, r.Severity, r.Confidence), nil + } + } + } + + return nil, nil +} + +// func (r *trojanSource) Match(node ast.Node, c *gosec.Context) (*issue.Issue, error) { +// if file, ok := node.(*ast.File); ok { +// fobj := c.FileSet.File(file.Pos()) +// if fobj == nil { +// return nil, nil +// } + +// file, err := os.Open(fobj.Name()) +// if err != nil { +// log.Fatal(err) +// } + +// defer file.Close() + +// scanner := bufio.NewScanner(file) +// for scanner.Scan() { +// line := scanner.Text() +// for _, ch := range line { +// if _, exists := r.bidiChars[ch]; exists { +// return c.NewIssue(node, r.ID(), r.What, r.Severity, r.Confidence), nil +// } +// } +// } + +// if err := scanner.Err(); err != nil { +// log.Fatal(err) +// } +// } + +// return nil, nil +// } + +func NewTrojanSource(id string, _ gosec.Config) (gosec.Rule, []ast.Node) { + return &trojanSource{ + MetaData: issue.MetaData{ + ID: id, + Severity: issue.High, + Confidence: issue.Medium, + What: "Potential Trojan Source vulnerability via use of bidirectional text control characters", + }, + bidiChars: map[rune]struct{}{ + '\u202a': {}, + '\u202b': {}, + '\u202c': {}, + '\u202d': {}, + '\u202e': {}, + '\u2066': {}, + '\u2067': {}, + '\u2068': {}, + '\u2069': {}, + '\u200e': {}, + '\u200f': {}, + }, + }, []ast.Node{(*ast.File)(nil)} +} diff --git a/vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go b/vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go index 08c36e74f..2a9f2dc3b 100644 --- a/vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go +++ b/vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go @@ -34,6 +34,8 @@ const ( DiffInsert Operation = 1 // DiffEqual item represents an equal diff. DiffEqual Operation = 0 + //IndexSeparator is used to seperate the array indexes in an index string + IndexSeparator = "," ) // Diff represents one diff operation @@ -404,11 +406,14 @@ func (dmp *DiffMatchPatch) DiffLinesToRunes(text1, text2 string) ([]rune, []rune func (dmp *DiffMatchPatch) DiffCharsToLines(diffs []Diff, lineArray []string) []Diff { hydrated := make([]Diff, 0, len(diffs)) for _, aDiff := range diffs { - runes := []rune(aDiff.Text) - text := make([]string, len(runes)) + chars := strings.Split(aDiff.Text, IndexSeparator) + text := make([]string, len(chars)) - for i, r := range runes { - text[i] = lineArray[runeToInt(r)] + for i, r := range chars { + i1, err := strconv.Atoi(r) + if err == nil { + text[i] = lineArray[i1] + } } aDiff.Text = strings.Join(text, "") @@ -1146,28 +1151,13 @@ func (dmp *DiffMatchPatch) DiffPrettyText(diffs []Diff) string { switch diff.Type { case DiffInsert: - lines := strings.Split(text, "\n") - for i, line := range lines { - _, _ = buff.WriteString("\x1b[32m") - _, _ = buff.WriteString(line) - if i < len(lines)-1 { - _, _ = buff.WriteString("\x1b[0m\n") - } else { - _, _ = buff.WriteString("\x1b[0m") - } - } - + _, _ = buff.WriteString("\x1b[32m") + _, _ = buff.WriteString(text) + _, _ = buff.WriteString("\x1b[0m") case DiffDelete: - lines := strings.Split(text, "\n") - for i, line := range lines { - _, _ = buff.WriteString("\x1b[31m") - _, _ = buff.WriteString(line) - if i < len(lines)-1 { - _, _ = buff.WriteString("\x1b[0m\n") - } else { - _, _ = buff.WriteString("\x1b[0m") - } - } + _, _ = buff.WriteString("\x1b[31m") + _, _ = buff.WriteString(text) + _, _ = buff.WriteString("\x1b[0m") case DiffEqual: _, _ = buff.WriteString(text) } @@ -1320,21 +1310,23 @@ func (dmp *DiffMatchPatch) DiffFromDelta(text1 string, delta string) (diffs []Di // diffLinesToStrings splits two texts into a list of strings. Each string represents one line. func (dmp *DiffMatchPatch) diffLinesToStrings(text1, text2 string) (string, string, []string) { + // '\x00' is a valid character, but various debuggers don't like it. So we'll insert a junk entry to avoid generating a null character. lineArray := []string{""} // e.g. lineArray[4] == 'Hello\n' - lineHash := make(map[string]int) //Each string has the index of lineArray which it points to - strIndexArray1 := dmp.diffLinesToStringsMunge(text1, &lineArray, lineHash) - strIndexArray2 := dmp.diffLinesToStringsMunge(text2, &lineArray, lineHash) + strIndexArray1 := dmp.diffLinesToStringsMunge(text1, &lineArray) + strIndexArray2 := dmp.diffLinesToStringsMunge(text2, &lineArray) return intArrayToString(strIndexArray1), intArrayToString(strIndexArray2), lineArray } -// diffLinesToStringsMunge splits a text into an array of strings, and reduces the texts to a []index. -func (dmp *DiffMatchPatch) diffLinesToStringsMunge(text string, lineArray *[]string, lineHash map[string]int) []index { +// diffLinesToStringsMunge splits a text into an array of strings, and reduces the texts to a []string. +func (dmp *DiffMatchPatch) diffLinesToStringsMunge(text string, lineArray *[]string) []uint32 { + // Walk the text, pulling out a substring for each line. text.split('\n') would would temporarily double our memory footprint. Modifying text would create many large strings to garbage collect. + lineHash := map[string]int{} // e.g. lineHash['Hello\n'] == 4 lineStart := 0 lineEnd := -1 - strs := []index{} + strs := []uint32{} for lineEnd < len(text)-1 { lineEnd = indexOf(text, "\n", lineStart) @@ -1348,11 +1340,11 @@ func (dmp *DiffMatchPatch) diffLinesToStringsMunge(text string, lineArray *[]str lineValue, ok := lineHash[line] if ok { - strs = append(strs, index(lineValue)) + strs = append(strs, uint32(lineValue)) } else { *lineArray = append(*lineArray, line) lineHash[line] = len(*lineArray) - 1 - strs = append(strs, index(len(*lineArray)-1)) + strs = append(strs, uint32(len(*lineArray)-1)) } } diff --git a/vendor/github.com/sergi/go-diff/diffmatchpatch/index.go b/vendor/github.com/sergi/go-diff/diffmatchpatch/index.go deleted file mode 100644 index 965a1c64b..000000000 --- a/vendor/github.com/sergi/go-diff/diffmatchpatch/index.go +++ /dev/null @@ -1,32 +0,0 @@ -package diffmatchpatch - -type index uint32 - -const runeSkipStart = 0xd800 -const runeSkipEnd = 0xdfff + 1 -const runeMax = 0x110000 // next invalid code point - -func stringToIndex(text string) []index { - runes := []rune(text) - indexes := make([]index, len(runes)) - for i, r := range runes { - if r < runeSkipEnd { - indexes[i] = index(r) - } else { - indexes[i] = index(r) - (runeSkipEnd - runeSkipStart) - } - } - return indexes -} - -func indexesToString(indexes []index) string { - runes := make([]rune, len(indexes)) - for i, index := range indexes { - if index < runeSkipStart { - runes[i] = rune(index) - } else { - runes[i] = rune(index + (runeSkipEnd - runeSkipStart)) - } - } - return string(runes) -} diff --git a/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go b/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go index 573b6bf75..44c435954 100644 --- a/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go +++ b/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go @@ -9,16 +9,11 @@ package diffmatchpatch import ( - "fmt" + "strconv" "strings" "unicode/utf8" ) -const UNICODE_INVALID_RANGE_START = 0xD800 -const UNICODE_INVALID_RANGE_END = 0xDFFF -const UNICODE_INVALID_RANGE_DELTA = UNICODE_INVALID_RANGE_END - UNICODE_INVALID_RANGE_START + 1 -const UNICODE_RANGE_MAX = 0x10FFFF - // unescaper unescapes selected chars for compatibility with JavaScript's encodeURI. // In speed critical applications this could be dropped since the receiving application will certainly decode these fine. Note that this function is case-sensitive. Thus "%3F" would not be unescaped. But this is ok because it is only called with the output of HttpUtility.UrlEncode which returns lowercase hex. Example: "%3f" -> "?", "%24" -> "$", etc. var unescaper = strings.NewReplacer( @@ -93,98 +88,19 @@ func runesIndex(r1, r2 []rune) int { return -1 } -func intArrayToString(ns []index) string { +func intArrayToString(ns []uint32) string { if len(ns) == 0 { return "" } - b := []rune{} + indexSeparator := IndexSeparator[0] + + // Appr. 3 chars per num plus the comma. + b := []byte{} for _, n := range ns { - b = append(b, intToRune(uint32(n))) + b = strconv.AppendInt(b, int64(n), 10) + b = append(b, indexSeparator) } + b = b[:len(b)-1] return string(b) } - -// These constants define the number of bits representable -// in 1,2,3,4 byte utf8 sequences, respectively. -const ONE_BYTE_BITS = 7 -const TWO_BYTE_BITS = 11 -const THREE_BYTE_BITS = 16 -const FOUR_BYTE_BITS = 21 - -// Helper for getting a sequence of bits from an integer. -func getBits(i uint32, cnt byte, from byte) byte { - return byte((i >> from) & ((1 << cnt) - 1)) -} - -// Converts an integer in the range 0~1112060 into a rune. -// Based on the ranges table in https://en.wikipedia.org/wiki/UTF-8 -func intToRune(i uint32) rune { - if i < (1 << ONE_BYTE_BITS) { - return rune(i) - } - - if i < (1 << TWO_BYTE_BITS) { - r, size := utf8.DecodeRune([]byte{0b11000000 | getBits(i, 5, 6), 0b10000000 | getBits(i, 6, 0)}) - if size != 2 || r == utf8.RuneError { - panic(fmt.Sprintf("Error encoding an int %d with size 2, got rune %v and size %d", size, r, i)) - } - return r - } - - // Last -3 here needed because for some reason 3rd to last codepoint 65533 in this range - // was returning utf8.RuneError during encoding. - if i < ((1 << THREE_BYTE_BITS) - UNICODE_INVALID_RANGE_DELTA - 3) { - if i >= UNICODE_INVALID_RANGE_START { - i += UNICODE_INVALID_RANGE_DELTA - } - - r, size := utf8.DecodeRune([]byte{0b11100000 | getBits(i, 4, 12), 0b10000000 | getBits(i, 6, 6), 0b10000000 | getBits(i, 6, 0)}) - if size != 3 || r == utf8.RuneError { - panic(fmt.Sprintf("Error encoding an int %d with size 3, got rune %v and size %d", size, r, i)) - } - return r - } - - if i < (1<= UNICODE_INVALID_RANGE_END { - return result - UNICODE_INVALID_RANGE_DELTA - } - - return result - } - - if size == 4 { - result := uint32(bytes[0]&0b111)<<18 | uint32(bytes[1]&0b111111)<<12 | uint32(bytes[2]&0b111111)<<6 | uint32(bytes[3]&0b111111) - return result - UNICODE_INVALID_RANGE_DELTA - 3 - } - - panic(fmt.Sprintf("Unexpected state decoding rune=%v size=%d", r, size)) -} diff --git a/vendor/github.com/spf13/cast/.editorconfig b/vendor/github.com/spf13/cast/.editorconfig deleted file mode 100644 index a85749f19..000000000 --- a/vendor/github.com/spf13/cast/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.go] -indent_style = tab - -[{*.yml,*.yaml}] -indent_size = 2 diff --git a/vendor/github.com/spf13/cast/.golangci.yaml b/vendor/github.com/spf13/cast/.golangci.yaml deleted file mode 100644 index e00fd47aa..000000000 --- a/vendor/github.com/spf13/cast/.golangci.yaml +++ /dev/null @@ -1,39 +0,0 @@ -version: "2" - -run: - timeout: 10m - -linters: - enable: - - errcheck - - govet - - ineffassign - - misspell - - nolintlint - # - revive - - unused - - disable: - - staticcheck - - settings: - misspell: - locale: US - nolintlint: - allow-unused: false # report any unused nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped - -formatters: - enable: - - gci - - gofmt - # - gofumpt - - goimports - # - golines - - settings: - gci: - sections: - - standard - - default - - localmodule diff --git a/vendor/github.com/spf13/cast/README.md b/vendor/github.com/spf13/cast/README.md index c58eccb3f..120a57342 100644 --- a/vendor/github.com/spf13/cast/README.md +++ b/vendor/github.com/spf13/cast/README.md @@ -1,9 +1,8 @@ -# cast - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/spf13/cast) -![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/spf13/cast?style=flat-square&color=61CFDD) -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/spf13/cast/badge?style=flat-square)](https://deps.dev/go/github.com%252Fspf13%252Fcast) +cast +==== +[![GoDoc](https://godoc.org/github.com/spf13/cast?status.svg)](https://godoc.org/github.com/spf13/cast) +[![Build Status](https://github.com/spf13/cast/actions/workflows/go.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/go.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast)](https://goreportcard.com/report/github.com/spf13/cast) Easy and safe casting from one type to another in Go @@ -18,7 +17,7 @@ interface into a bool, etc. Cast does this intelligently when an obvious conversion is possible. It doesn’t make any attempts to guess what you meant, for example you can only convert a string to an int when it is a string representation of an int such as “8”. Cast was developed for use in -[Hugo](https://gohugo.io), a website engine which uses YAML, TOML or JSON +[Hugo](http://hugo.spf13.com), a website engine which uses YAML, TOML or JSON for meta data. ## Why use Cast? @@ -74,6 +73,3 @@ the code for a complete set. cast.ToInt(eight) // 8 cast.ToInt(nil) // 0 -## License - -The project is licensed under the [MIT License](LICENSE). diff --git a/vendor/github.com/spf13/cast/alias.go b/vendor/github.com/spf13/cast/alias.go deleted file mode 100644 index 855d60005..000000000 --- a/vendor/github.com/spf13/cast/alias.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. -package cast - -import ( - "reflect" - "slices" -) - -var kindNames = []string{ - reflect.String: "string", - reflect.Bool: "bool", - reflect.Int: "int", - reflect.Int8: "int8", - reflect.Int16: "int16", - reflect.Int32: "int32", - reflect.Int64: "int64", - reflect.Uint: "uint", - reflect.Uint8: "uint8", - reflect.Uint16: "uint16", - reflect.Uint32: "uint32", - reflect.Uint64: "uint64", - reflect.Float32: "float32", - reflect.Float64: "float64", -} - -var kinds = map[reflect.Kind]func(reflect.Value) any{ - reflect.String: func(v reflect.Value) any { return v.String() }, - reflect.Bool: func(v reflect.Value) any { return v.Bool() }, - reflect.Int: func(v reflect.Value) any { return int(v.Int()) }, - reflect.Int8: func(v reflect.Value) any { return int8(v.Int()) }, - reflect.Int16: func(v reflect.Value) any { return int16(v.Int()) }, - reflect.Int32: func(v reflect.Value) any { return int32(v.Int()) }, - reflect.Int64: func(v reflect.Value) any { return v.Int() }, - reflect.Uint: func(v reflect.Value) any { return uint(v.Uint()) }, - reflect.Uint8: func(v reflect.Value) any { return uint8(v.Uint()) }, - reflect.Uint16: func(v reflect.Value) any { return uint16(v.Uint()) }, - reflect.Uint32: func(v reflect.Value) any { return uint32(v.Uint()) }, - reflect.Uint64: func(v reflect.Value) any { return v.Uint() }, - reflect.Float32: func(v reflect.Value) any { return float32(v.Float()) }, - reflect.Float64: func(v reflect.Value) any { return v.Float() }, -} - -// resolveAlias attempts to resolve a named type to its underlying basic type (if possible). -// -// Pointers are expected to be indirected by this point. -func resolveAlias(i any) (any, bool) { - if i == nil { - return nil, false - } - - t := reflect.TypeOf(i) - - // Not a named type - if t.Name() == "" || slices.Contains(kindNames, t.Name()) { - return i, false - } - - resolve, ok := kinds[t.Kind()] - if !ok { // Not a supported kind - return i, false - } - - v := reflect.ValueOf(i) - - return resolve(v), true -} diff --git a/vendor/github.com/spf13/cast/basic.go b/vendor/github.com/spf13/cast/basic.go deleted file mode 100644 index fa330e207..000000000 --- a/vendor/github.com/spf13/cast/basic.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "encoding/json" - "fmt" - "html/template" - "strconv" - "time" -) - -// ToBoolE casts any value to a bool type. -func ToBoolE(i any) (bool, error) { - i, _ = indirect(i) - - switch b := i.(type) { - case bool: - return b, nil - case nil: - return false, nil - case int: - return b != 0, nil - case int8: - return b != 0, nil - case int16: - return b != 0, nil - case int32: - return b != 0, nil - case int64: - return b != 0, nil - case uint: - return b != 0, nil - case uint8: - return b != 0, nil - case uint16: - return b != 0, nil - case uint32: - return b != 0, nil - case uint64: - return b != 0, nil - case float32: - return b != 0, nil - case float64: - return b != 0, nil - case time.Duration: - return b != 0, nil - case string: - return strconv.ParseBool(b) - case json.Number: - v, err := ToInt64E(b) - if err == nil { - return v != 0, nil - } - - return false, fmt.Errorf(errorMsg, i, i, false) - default: - if i, ok := resolveAlias(i); ok { - return ToBoolE(i) - } - - return false, fmt.Errorf(errorMsg, i, i, false) - } -} - -// ToStringE casts any value to a string type. -func ToStringE(i any) (string, error) { - switch s := i.(type) { - case string: - return s, nil - case bool: - return strconv.FormatBool(s), nil - case float64: - return strconv.FormatFloat(s, 'f', -1, 64), nil - case float32: - return strconv.FormatFloat(float64(s), 'f', -1, 32), nil - case int: - return strconv.Itoa(s), nil - case int8: - return strconv.FormatInt(int64(s), 10), nil - case int16: - return strconv.FormatInt(int64(s), 10), nil - case int32: - return strconv.FormatInt(int64(s), 10), nil - case int64: - return strconv.FormatInt(s, 10), nil - case uint: - return strconv.FormatUint(uint64(s), 10), nil - case uint8: - return strconv.FormatUint(uint64(s), 10), nil - case uint16: - return strconv.FormatUint(uint64(s), 10), nil - case uint32: - return strconv.FormatUint(uint64(s), 10), nil - case uint64: - return strconv.FormatUint(s, 10), nil - case json.Number: - return s.String(), nil - case []byte: - return string(s), nil - case template.HTML: - return string(s), nil - case template.URL: - return string(s), nil - case template.JS: - return string(s), nil - case template.CSS: - return string(s), nil - case template.HTMLAttr: - return string(s), nil - case nil: - return "", nil - case fmt.Stringer: - return s.String(), nil - case error: - return s.Error(), nil - default: - if i, ok := indirect(i); ok { - return ToStringE(i) - } - - if i, ok := resolveAlias(i); ok { - return ToStringE(i) - } - - return "", fmt.Errorf(errorMsg, i, i, "") - } -} diff --git a/vendor/github.com/spf13/cast/cast.go b/vendor/github.com/spf13/cast/cast.go index 8d85539b3..0cfe9418d 100644 --- a/vendor/github.com/spf13/cast/cast.go +++ b/vendor/github.com/spf13/cast/cast.go @@ -8,77 +8,169 @@ package cast import "time" -const errorMsg = "unable to cast %#v of type %T to %T" -const errorMsgWith = "unable to cast %#v of type %T to %T: %w" +// ToBool casts an interface to a bool type. +func ToBool(i interface{}) bool { + v, _ := ToBoolE(i) + return v +} -// Basic is a type parameter constraint for functions accepting basic types. -// -// It represents the supported basic types this package can cast to. -type Basic interface { - string | bool | Number | time.Time | time.Duration -} - -// ToE casts any value to a [Basic] type. -func ToE[T Basic](i any) (T, error) { - var t T - - var v any - var err error - - switch any(t).(type) { - case string: - v, err = ToStringE(i) - case bool: - v, err = ToBoolE(i) - case int: - v, err = toNumberE[int](i, parseInt[int]) - case int8: - v, err = toNumberE[int8](i, parseInt[int8]) - case int16: - v, err = toNumberE[int16](i, parseInt[int16]) - case int32: - v, err = toNumberE[int32](i, parseInt[int32]) - case int64: - v, err = toNumberE[int64](i, parseInt[int64]) - case uint: - v, err = toUnsignedNumberE[uint](i, parseUint[uint]) - case uint8: - v, err = toUnsignedNumberE[uint8](i, parseUint[uint8]) - case uint16: - v, err = toUnsignedNumberE[uint16](i, parseUint[uint16]) - case uint32: - v, err = toUnsignedNumberE[uint32](i, parseUint[uint32]) - case uint64: - v, err = toUnsignedNumberE[uint64](i, parseUint[uint64]) - case float32: - v, err = toNumberE[float32](i, parseFloat[float32]) - case float64: - v, err = toNumberE[float64](i, parseFloat[float64]) - case time.Time: - v, err = ToTimeE(i) - case time.Duration: - v, err = ToDurationE(i) - } - - if err != nil { - return t, err - } - - return v.(T), nil -} - -// Must is a helper that wraps a call to a cast function and panics if the error is non-nil. -func Must[T any](i any, err error) T { - if err != nil { - panic(err) - } - - return i.(T) -} - -// To casts any value to a [Basic] type. -func To[T Basic](i any) T { - v, _ := ToE[T](i) +// ToTime casts an interface to a time.Time type. +func ToTime(i interface{}) time.Time { + v, _ := ToTimeE(i) + return v +} + +func ToTimeInDefaultLocation(i interface{}, location *time.Location) time.Time { + v, _ := ToTimeInDefaultLocationE(i, location) + return v +} + +// ToDuration casts an interface to a time.Duration type. +func ToDuration(i interface{}) time.Duration { + v, _ := ToDurationE(i) + return v +} + +// ToFloat64 casts an interface to a float64 type. +func ToFloat64(i interface{}) float64 { + v, _ := ToFloat64E(i) + return v +} + +// ToFloat32 casts an interface to a float32 type. +func ToFloat32(i interface{}) float32 { + v, _ := ToFloat32E(i) + return v +} + +// ToInt64 casts an interface to an int64 type. +func ToInt64(i interface{}) int64 { + v, _ := ToInt64E(i) + return v +} + +// ToInt32 casts an interface to an int32 type. +func ToInt32(i interface{}) int32 { + v, _ := ToInt32E(i) + return v +} + +// ToInt16 casts an interface to an int16 type. +func ToInt16(i interface{}) int16 { + v, _ := ToInt16E(i) + return v +} + +// ToInt8 casts an interface to an int8 type. +func ToInt8(i interface{}) int8 { + v, _ := ToInt8E(i) + return v +} + +// ToInt casts an interface to an int type. +func ToInt(i interface{}) int { + v, _ := ToIntE(i) + return v +} + +// ToUint casts an interface to a uint type. +func ToUint(i interface{}) uint { + v, _ := ToUintE(i) + return v +} + +// ToUint64 casts an interface to a uint64 type. +func ToUint64(i interface{}) uint64 { + v, _ := ToUint64E(i) + return v +} + +// ToUint32 casts an interface to a uint32 type. +func ToUint32(i interface{}) uint32 { + v, _ := ToUint32E(i) + return v +} + +// ToUint16 casts an interface to a uint16 type. +func ToUint16(i interface{}) uint16 { + v, _ := ToUint16E(i) + return v +} + +// ToUint8 casts an interface to a uint8 type. +func ToUint8(i interface{}) uint8 { + v, _ := ToUint8E(i) + return v +} + +// ToString casts an interface to a string type. +func ToString(i interface{}) string { + v, _ := ToStringE(i) + return v +} + +// ToStringMapString casts an interface to a map[string]string type. +func ToStringMapString(i interface{}) map[string]string { + v, _ := ToStringMapStringE(i) + return v +} + +// ToStringMapStringSlice casts an interface to a map[string][]string type. +func ToStringMapStringSlice(i interface{}) map[string][]string { + v, _ := ToStringMapStringSliceE(i) + return v +} + +// ToStringMapBool casts an interface to a map[string]bool type. +func ToStringMapBool(i interface{}) map[string]bool { + v, _ := ToStringMapBoolE(i) + return v +} + +// ToStringMapInt casts an interface to a map[string]int type. +func ToStringMapInt(i interface{}) map[string]int { + v, _ := ToStringMapIntE(i) + return v +} + +// ToStringMapInt64 casts an interface to a map[string]int64 type. +func ToStringMapInt64(i interface{}) map[string]int64 { + v, _ := ToStringMapInt64E(i) + return v +} + +// ToStringMap casts an interface to a map[string]interface{} type. +func ToStringMap(i interface{}) map[string]interface{} { + v, _ := ToStringMapE(i) + return v +} + +// ToSlice casts an interface to a []interface{} type. +func ToSlice(i interface{}) []interface{} { + v, _ := ToSliceE(i) + return v +} + +// ToBoolSlice casts an interface to a []bool type. +func ToBoolSlice(i interface{}) []bool { + v, _ := ToBoolSliceE(i) + return v +} + +// ToStringSlice casts an interface to a []string type. +func ToStringSlice(i interface{}) []string { + v, _ := ToStringSliceE(i) + return v +} + +// ToIntSlice casts an interface to a []int type. +func ToIntSlice(i interface{}) []int { + v, _ := ToIntSliceE(i) + return v +} +// ToDurationSlice casts an interface to a []time.Duration type. +func ToDurationSlice(i interface{}) []time.Duration { + v, _ := ToDurationSliceE(i) return v } diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go new file mode 100644 index 000000000..514d759bf --- /dev/null +++ b/vendor/github.com/spf13/cast/caste.go @@ -0,0 +1,1476 @@ +// Copyright © 2014 Steve Francia . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + +package cast + +import ( + "encoding/json" + "errors" + "fmt" + "html/template" + "reflect" + "strconv" + "strings" + "time" +) + +var errNegativeNotAllowed = errors.New("unable to cast negative value") + +// ToTimeE casts an interface to a time.Time type. +func ToTimeE(i interface{}) (tim time.Time, err error) { + return ToTimeInDefaultLocationE(i, time.UTC) +} + +// ToTimeInDefaultLocationE casts an empty interface to time.Time, +// interpreting inputs without a timezone to be in the given location, +// or the local timezone if nil. +func ToTimeInDefaultLocationE(i interface{}, location *time.Location) (tim time.Time, err error) { + i = indirect(i) + + switch v := i.(type) { + case time.Time: + return v, nil + case string: + return StringToDateInDefaultLocation(v, location) + case json.Number: + s, err1 := ToInt64E(v) + if err1 != nil { + return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i) + } + return time.Unix(s, 0), nil + case int: + return time.Unix(int64(v), 0), nil + case int64: + return time.Unix(v, 0), nil + case int32: + return time.Unix(int64(v), 0), nil + case uint: + return time.Unix(int64(v), 0), nil + case uint64: + return time.Unix(int64(v), 0), nil + case uint32: + return time.Unix(int64(v), 0), nil + default: + return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i) + } +} + +// ToDurationE casts an interface to a time.Duration type. +func ToDurationE(i interface{}) (d time.Duration, err error) { + i = indirect(i) + + switch s := i.(type) { + case time.Duration: + return s, nil + case int, int64, int32, int16, int8, uint, uint64, uint32, uint16, uint8: + d = time.Duration(ToInt64(s)) + return + case float32, float64: + d = time.Duration(ToFloat64(s)) + return + case string: + if strings.ContainsAny(s, "nsuµmh") { + d, err = time.ParseDuration(s) + } else { + d, err = time.ParseDuration(s + "ns") + } + return + case json.Number: + var v float64 + v, err = s.Float64() + d = time.Duration(v) + return + default: + err = fmt.Errorf("unable to cast %#v of type %T to Duration", i, i) + return + } +} + +// ToBoolE casts an interface to a bool type. +func ToBoolE(i interface{}) (bool, error) { + i = indirect(i) + + switch b := i.(type) { + case bool: + return b, nil + case nil: + return false, nil + case int: + if i.(int) != 0 { + return true, nil + } + return false, nil + case string: + return strconv.ParseBool(i.(string)) + case json.Number: + v, err := ToInt64E(b) + if err == nil { + return v != 0, nil + } + return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) + default: + return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i) + } +} + +// ToFloat64E casts an interface to a float64 type. +func ToFloat64E(i interface{}) (float64, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return float64(intv), nil + } + + switch s := i.(type) { + case float64: + return s, nil + case float32: + return float64(s), nil + case int64: + return float64(s), nil + case int32: + return float64(s), nil + case int16: + return float64(s), nil + case int8: + return float64(s), nil + case uint: + return float64(s), nil + case uint64: + return float64(s), nil + case uint32: + return float64(s), nil + case uint16: + return float64(s), nil + case uint8: + return float64(s), nil + case string: + v, err := strconv.ParseFloat(s, 64) + if err == nil { + return v, nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) + case json.Number: + v, err := s.Float64() + if err == nil { + return v, nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i) + } +} + +// ToFloat32E casts an interface to a float32 type. +func ToFloat32E(i interface{}) (float32, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return float32(intv), nil + } + + switch s := i.(type) { + case float64: + return float32(s), nil + case float32: + return s, nil + case int64: + return float32(s), nil + case int32: + return float32(s), nil + case int16: + return float32(s), nil + case int8: + return float32(s), nil + case uint: + return float32(s), nil + case uint64: + return float32(s), nil + case uint32: + return float32(s), nil + case uint16: + return float32(s), nil + case uint8: + return float32(s), nil + case string: + v, err := strconv.ParseFloat(s, 32) + if err == nil { + return float32(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) + case json.Number: + v, err := s.Float64() + if err == nil { + return float32(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i) + } +} + +// ToInt64E casts an interface to an int64 type. +func ToInt64E(i interface{}) (int64, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return int64(intv), nil + } + + switch s := i.(type) { + case int64: + return s, nil + case int32: + return int64(s), nil + case int16: + return int64(s), nil + case int8: + return int64(s), nil + case uint: + return int64(s), nil + case uint64: + return int64(s), nil + case uint32: + return int64(s), nil + case uint16: + return int64(s), nil + case uint8: + return int64(s), nil + case float64: + return int64(s), nil + case float32: + return int64(s), nil + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + return v, nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) + case json.Number: + return ToInt64E(string(s)) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) + } +} + +// ToInt32E casts an interface to an int32 type. +func ToInt32E(i interface{}) (int32, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return int32(intv), nil + } + + switch s := i.(type) { + case int64: + return int32(s), nil + case int32: + return s, nil + case int16: + return int32(s), nil + case int8: + return int32(s), nil + case uint: + return int32(s), nil + case uint64: + return int32(s), nil + case uint32: + return int32(s), nil + case uint16: + return int32(s), nil + case uint8: + return int32(s), nil + case float64: + return int32(s), nil + case float32: + return int32(s), nil + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + return int32(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i) + case json.Number: + return ToInt32E(string(s)) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i) + } +} + +// ToInt16E casts an interface to an int16 type. +func ToInt16E(i interface{}) (int16, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return int16(intv), nil + } + + switch s := i.(type) { + case int64: + return int16(s), nil + case int32: + return int16(s), nil + case int16: + return s, nil + case int8: + return int16(s), nil + case uint: + return int16(s), nil + case uint64: + return int16(s), nil + case uint32: + return int16(s), nil + case uint16: + return int16(s), nil + case uint8: + return int16(s), nil + case float64: + return int16(s), nil + case float32: + return int16(s), nil + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + return int16(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i) + case json.Number: + return ToInt16E(string(s)) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i) + } +} + +// ToInt8E casts an interface to an int8 type. +func ToInt8E(i interface{}) (int8, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return int8(intv), nil + } + + switch s := i.(type) { + case int64: + return int8(s), nil + case int32: + return int8(s), nil + case int16: + return int8(s), nil + case int8: + return s, nil + case uint: + return int8(s), nil + case uint64: + return int8(s), nil + case uint32: + return int8(s), nil + case uint16: + return int8(s), nil + case uint8: + return int8(s), nil + case float64: + return int8(s), nil + case float32: + return int8(s), nil + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + return int8(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i) + case json.Number: + return ToInt8E(string(s)) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i) + } +} + +// ToIntE casts an interface to an int type. +func ToIntE(i interface{}) (int, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + return intv, nil + } + + switch s := i.(type) { + case int64: + return int(s), nil + case int32: + return int(s), nil + case int16: + return int(s), nil + case int8: + return int(s), nil + case uint: + return int(s), nil + case uint64: + return int(s), nil + case uint32: + return int(s), nil + case uint16: + return int(s), nil + case uint8: + return int(s), nil + case float64: + return int(s), nil + case float32: + return int(s), nil + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + return int(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i) + case json.Number: + return ToIntE(string(s)) + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i) + } +} + +// ToUintE casts an interface to a uint type. +func ToUintE(i interface{}) (uint, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint(intv), nil + } + + switch s := i.(type) { + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i) + case json.Number: + return ToUintE(string(s)) + case int64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case int32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case int16: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case int8: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case uint: + return s, nil + case uint64: + return uint(s), nil + case uint32: + return uint(s), nil + case uint16: + return uint(s), nil + case uint8: + return uint(s), nil + case float64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case float32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint(s), nil + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i) + } +} + +// ToUint64E casts an interface to a uint64 type. +func ToUint64E(i interface{}) (uint64, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint64(intv), nil + } + + switch s := i.(type) { + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint64(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) + case json.Number: + return ToUint64E(string(s)) + case int64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case int32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case int16: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case int8: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case uint: + return uint64(s), nil + case uint64: + return s, nil + case uint32: + return uint64(s), nil + case uint16: + return uint64(s), nil + case uint8: + return uint64(s), nil + case float32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case float64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint64(s), nil + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i) + } +} + +// ToUint32E casts an interface to a uint32 type. +func ToUint32E(i interface{}) (uint32, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint32(intv), nil + } + + switch s := i.(type) { + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint32(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i) + case json.Number: + return ToUint32E(string(s)) + case int64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case int32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case int16: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case int8: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case uint: + return uint32(s), nil + case uint64: + return uint32(s), nil + case uint32: + return s, nil + case uint16: + return uint32(s), nil + case uint8: + return uint32(s), nil + case float64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case float32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint32(s), nil + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i) + } +} + +// ToUint16E casts an interface to a uint16 type. +func ToUint16E(i interface{}) (uint16, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint16(intv), nil + } + + switch s := i.(type) { + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint16(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i) + case json.Number: + return ToUint16E(string(s)) + case int64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case int32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case int16: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case int8: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case uint: + return uint16(s), nil + case uint64: + return uint16(s), nil + case uint32: + return uint16(s), nil + case uint16: + return s, nil + case uint8: + return uint16(s), nil + case float64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case float32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint16(s), nil + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i) + } +} + +// ToUint8E casts an interface to a uint type. +func ToUint8E(i interface{}) (uint8, error) { + i = indirect(i) + + intv, ok := toInt(i) + if ok { + if intv < 0 { + return 0, errNegativeNotAllowed + } + return uint8(intv), nil + } + + switch s := i.(type) { + case string: + v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) + if err == nil { + if v < 0 { + return 0, errNegativeNotAllowed + } + return uint8(v), nil + } + return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i) + case json.Number: + return ToUint8E(string(s)) + case int64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case int32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case int16: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case int8: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case uint: + return uint8(s), nil + case uint64: + return uint8(s), nil + case uint32: + return uint8(s), nil + case uint16: + return uint8(s), nil + case uint8: + return s, nil + case float64: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case float32: + if s < 0 { + return 0, errNegativeNotAllowed + } + return uint8(s), nil + case bool: + if s { + return 1, nil + } + return 0, nil + case nil: + return 0, nil + default: + return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i) + } +} + +// From html/template/content.go +// Copyright 2011 The Go Authors. All rights reserved. +// indirect returns the value, after dereferencing as many times +// as necessary to reach the base type (or nil). +func indirect(a interface{}) interface{} { + if a == nil { + return nil + } + if t := reflect.TypeOf(a); t.Kind() != reflect.Ptr { + // Avoid creating a reflect.Value if it's not a pointer. + return a + } + v := reflect.ValueOf(a) + for v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + return v.Interface() +} + +// From html/template/content.go +// Copyright 2011 The Go Authors. All rights reserved. +// indirectToStringerOrError returns the value, after dereferencing as many times +// as necessary to reach the base type (or nil) or an implementation of fmt.Stringer +// or error, +func indirectToStringerOrError(a interface{}) interface{} { + if a == nil { + return nil + } + + var errorType = reflect.TypeOf((*error)(nil)).Elem() + var fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() + + v := reflect.ValueOf(a) + for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + return v.Interface() +} + +// ToStringE casts an interface to a string type. +func ToStringE(i interface{}) (string, error) { + i = indirectToStringerOrError(i) + + switch s := i.(type) { + case string: + return s, nil + case bool: + return strconv.FormatBool(s), nil + case float64: + return strconv.FormatFloat(s, 'f', -1, 64), nil + case float32: + return strconv.FormatFloat(float64(s), 'f', -1, 32), nil + case int: + return strconv.Itoa(s), nil + case int64: + return strconv.FormatInt(s, 10), nil + case int32: + return strconv.Itoa(int(s)), nil + case int16: + return strconv.FormatInt(int64(s), 10), nil + case int8: + return strconv.FormatInt(int64(s), 10), nil + case uint: + return strconv.FormatUint(uint64(s), 10), nil + case uint64: + return strconv.FormatUint(uint64(s), 10), nil + case uint32: + return strconv.FormatUint(uint64(s), 10), nil + case uint16: + return strconv.FormatUint(uint64(s), 10), nil + case uint8: + return strconv.FormatUint(uint64(s), 10), nil + case json.Number: + return s.String(), nil + case []byte: + return string(s), nil + case template.HTML: + return string(s), nil + case template.URL: + return string(s), nil + case template.JS: + return string(s), nil + case template.CSS: + return string(s), nil + case template.HTMLAttr: + return string(s), nil + case nil: + return "", nil + case fmt.Stringer: + return s.String(), nil + case error: + return s.Error(), nil + default: + return "", fmt.Errorf("unable to cast %#v of type %T to string", i, i) + } +} + +// ToStringMapStringE casts an interface to a map[string]string type. +func ToStringMapStringE(i interface{}) (map[string]string, error) { + var m = map[string]string{} + + switch v := i.(type) { + case map[string]string: + return v, nil + case map[string]interface{}: + for k, val := range v { + m[ToString(k)] = ToString(val) + } + return m, nil + case map[interface{}]string: + for k, val := range v { + m[ToString(k)] = ToString(val) + } + return m, nil + case map[interface{}]interface{}: + for k, val := range v { + m[ToString(k)] = ToString(val) + } + return m, nil + case string: + err := jsonStringToObject(v, &m) + return m, err + default: + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]string", i, i) + } +} + +// ToStringMapStringSliceE casts an interface to a map[string][]string type. +func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) { + var m = map[string][]string{} + + switch v := i.(type) { + case map[string][]string: + return v, nil + case map[string][]interface{}: + for k, val := range v { + m[ToString(k)] = ToStringSlice(val) + } + return m, nil + case map[string]string: + for k, val := range v { + m[ToString(k)] = []string{val} + } + case map[string]interface{}: + for k, val := range v { + switch vt := val.(type) { + case []interface{}: + m[ToString(k)] = ToStringSlice(vt) + case []string: + m[ToString(k)] = vt + default: + m[ToString(k)] = []string{ToString(val)} + } + } + return m, nil + case map[interface{}][]string: + for k, val := range v { + m[ToString(k)] = ToStringSlice(val) + } + return m, nil + case map[interface{}]string: + for k, val := range v { + m[ToString(k)] = ToStringSlice(val) + } + return m, nil + case map[interface{}][]interface{}: + for k, val := range v { + m[ToString(k)] = ToStringSlice(val) + } + return m, nil + case map[interface{}]interface{}: + for k, val := range v { + key, err := ToStringE(k) + if err != nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) + } + value, err := ToStringSliceE(val) + if err != nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) + } + m[key] = value + } + case string: + err := jsonStringToObject(v, &m) + return m, err + default: + return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i) + } + return m, nil +} + +// ToStringMapBoolE casts an interface to a map[string]bool type. +func ToStringMapBoolE(i interface{}) (map[string]bool, error) { + var m = map[string]bool{} + + switch v := i.(type) { + case map[interface{}]interface{}: + for k, val := range v { + m[ToString(k)] = ToBool(val) + } + return m, nil + case map[string]interface{}: + for k, val := range v { + m[ToString(k)] = ToBool(val) + } + return m, nil + case map[string]bool: + return v, nil + case string: + err := jsonStringToObject(v, &m) + return m, err + default: + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]bool", i, i) + } +} + +// ToStringMapE casts an interface to a map[string]interface{} type. +func ToStringMapE(i interface{}) (map[string]interface{}, error) { + var m = map[string]interface{}{} + + switch v := i.(type) { + case map[interface{}]interface{}: + for k, val := range v { + m[ToString(k)] = val + } + return m, nil + case map[string]interface{}: + return v, nil + case string: + err := jsonStringToObject(v, &m) + return m, err + default: + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]interface{}", i, i) + } +} + +// ToStringMapIntE casts an interface to a map[string]int{} type. +func ToStringMapIntE(i interface{}) (map[string]int, error) { + var m = map[string]int{} + if i == nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) + } + + switch v := i.(type) { + case map[interface{}]interface{}: + for k, val := range v { + m[ToString(k)] = ToInt(val) + } + return m, nil + case map[string]interface{}: + for k, val := range v { + m[k] = ToInt(val) + } + return m, nil + case map[string]int: + return v, nil + case string: + err := jsonStringToObject(v, &m) + return m, err + } + + if reflect.TypeOf(i).Kind() != reflect.Map { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) + } + + mVal := reflect.ValueOf(m) + v := reflect.ValueOf(i) + for _, keyVal := range v.MapKeys() { + val, err := ToIntE(v.MapIndex(keyVal).Interface()) + if err != nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int", i, i) + } + mVal.SetMapIndex(keyVal, reflect.ValueOf(val)) + } + return m, nil +} + +// ToStringMapInt64E casts an interface to a map[string]int64{} type. +func ToStringMapInt64E(i interface{}) (map[string]int64, error) { + var m = map[string]int64{} + if i == nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) + } + + switch v := i.(type) { + case map[interface{}]interface{}: + for k, val := range v { + m[ToString(k)] = ToInt64(val) + } + return m, nil + case map[string]interface{}: + for k, val := range v { + m[k] = ToInt64(val) + } + return m, nil + case map[string]int64: + return v, nil + case string: + err := jsonStringToObject(v, &m) + return m, err + } + + if reflect.TypeOf(i).Kind() != reflect.Map { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) + } + mVal := reflect.ValueOf(m) + v := reflect.ValueOf(i) + for _, keyVal := range v.MapKeys() { + val, err := ToInt64E(v.MapIndex(keyVal).Interface()) + if err != nil { + return m, fmt.Errorf("unable to cast %#v of type %T to map[string]int64", i, i) + } + mVal.SetMapIndex(keyVal, reflect.ValueOf(val)) + } + return m, nil +} + +// ToSliceE casts an interface to a []interface{} type. +func ToSliceE(i interface{}) ([]interface{}, error) { + var s []interface{} + + switch v := i.(type) { + case []interface{}: + return append(s, v...), nil + case []map[string]interface{}: + for _, u := range v { + s = append(s, u) + } + return s, nil + default: + return s, fmt.Errorf("unable to cast %#v of type %T to []interface{}", i, i) + } +} + +// ToBoolSliceE casts an interface to a []bool type. +func ToBoolSliceE(i interface{}) ([]bool, error) { + if i == nil { + return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) + } + + switch v := i.(type) { + case []bool: + return v, nil + } + + kind := reflect.TypeOf(i).Kind() + switch kind { + case reflect.Slice, reflect.Array: + s := reflect.ValueOf(i) + a := make([]bool, s.Len()) + for j := 0; j < s.Len(); j++ { + val, err := ToBoolE(s.Index(j).Interface()) + if err != nil { + return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) + } + a[j] = val + } + return a, nil + default: + return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i) + } +} + +// ToStringSliceE casts an interface to a []string type. +func ToStringSliceE(i interface{}) ([]string, error) { + var a []string + + switch v := i.(type) { + case []interface{}: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []string: + return v, nil + case []int8: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []int: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []int32: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []int64: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []float32: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case []float64: + for _, u := range v { + a = append(a, ToString(u)) + } + return a, nil + case string: + return strings.Fields(v), nil + case []error: + for _, err := range i.([]error) { + a = append(a, err.Error()) + } + return a, nil + case interface{}: + str, err := ToStringE(v) + if err != nil { + return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i) + } + return []string{str}, nil + default: + return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i) + } +} + +// ToIntSliceE casts an interface to a []int type. +func ToIntSliceE(i interface{}) ([]int, error) { + if i == nil { + return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) + } + + switch v := i.(type) { + case []int: + return v, nil + } + + kind := reflect.TypeOf(i).Kind() + switch kind { + case reflect.Slice, reflect.Array: + s := reflect.ValueOf(i) + a := make([]int, s.Len()) + for j := 0; j < s.Len(); j++ { + val, err := ToIntE(s.Index(j).Interface()) + if err != nil { + return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) + } + a[j] = val + } + return a, nil + default: + return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i) + } +} + +// ToDurationSliceE casts an interface to a []time.Duration type. +func ToDurationSliceE(i interface{}) ([]time.Duration, error) { + if i == nil { + return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) + } + + switch v := i.(type) { + case []time.Duration: + return v, nil + } + + kind := reflect.TypeOf(i).Kind() + switch kind { + case reflect.Slice, reflect.Array: + s := reflect.ValueOf(i) + a := make([]time.Duration, s.Len()) + for j := 0; j < s.Len(); j++ { + val, err := ToDurationE(s.Index(j).Interface()) + if err != nil { + return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) + } + a[j] = val + } + return a, nil + default: + return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i) + } +} + +// StringToDate attempts to parse a string into a time.Time type using a +// predefined list of formats. If no suitable format is found, an error is +// returned. +func StringToDate(s string) (time.Time, error) { + return parseDateWith(s, time.UTC, timeFormats) +} + +// StringToDateInDefaultLocation casts an empty interface to a time.Time, +// interpreting inputs without a timezone to be in the given location, +// or the local timezone if nil. +func StringToDateInDefaultLocation(s string, location *time.Location) (time.Time, error) { + return parseDateWith(s, location, timeFormats) +} + +type timeFormatType int + +const ( + timeFormatNoTimezone timeFormatType = iota + timeFormatNamedTimezone + timeFormatNumericTimezone + timeFormatNumericAndNamedTimezone + timeFormatTimeOnly +) + +type timeFormat struct { + format string + typ timeFormatType +} + +func (f timeFormat) hasTimezone() bool { + // We don't include the formats with only named timezones, see + // https://github.com/golang/go/issues/19694#issuecomment-289103522 + return f.typ >= timeFormatNumericTimezone && f.typ <= timeFormatNumericAndNamedTimezone +} + +var ( + timeFormats = []timeFormat{ + {time.RFC3339, timeFormatNumericTimezone}, + {"2006-01-02T15:04:05", timeFormatNoTimezone}, // iso8601 without timezone + {time.RFC1123Z, timeFormatNumericTimezone}, + {time.RFC1123, timeFormatNamedTimezone}, + {time.RFC822Z, timeFormatNumericTimezone}, + {time.RFC822, timeFormatNamedTimezone}, + {time.RFC850, timeFormatNamedTimezone}, + {"2006-01-02 15:04:05.999999999 -0700 MST", timeFormatNumericAndNamedTimezone}, // Time.String() + {"2006-01-02T15:04:05-0700", timeFormatNumericTimezone}, // RFC3339 without timezone hh:mm colon + {"2006-01-02 15:04:05Z0700", timeFormatNumericTimezone}, // RFC3339 without T or timezone hh:mm colon + {"2006-01-02 15:04:05", timeFormatNoTimezone}, + {time.ANSIC, timeFormatNoTimezone}, + {time.UnixDate, timeFormatNamedTimezone}, + {time.RubyDate, timeFormatNumericTimezone}, + {"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, + {"2006-01-02", timeFormatNoTimezone}, + {"02 Jan 2006", timeFormatNoTimezone}, + {"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, + {"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, + {time.Kitchen, timeFormatTimeOnly}, + {time.Stamp, timeFormatTimeOnly}, + {time.StampMilli, timeFormatTimeOnly}, + {time.StampMicro, timeFormatTimeOnly}, + {time.StampNano, timeFormatTimeOnly}, + } +) + +func parseDateWith(s string, location *time.Location, formats []timeFormat) (d time.Time, e error) { + + for _, format := range formats { + if d, e = time.Parse(format.format, s); e == nil { + + // Some time formats have a zone name, but no offset, so it gets + // put in that zone name (not the default one passed in to us), but + // without that zone's offset. So set the location manually. + if format.typ <= timeFormatNamedTimezone { + if location == nil { + location = time.Local + } + year, month, day := d.Date() + hour, min, sec := d.Clock() + d = time.Date(year, month, day, hour, min, sec, d.Nanosecond(), location) + } + + return + } + } + return d, fmt.Errorf("unable to parse date: %s", s) +} + +// jsonStringToObject attempts to unmarshall a string as JSON into +// the object passed as pointer. +func jsonStringToObject(s string, v interface{}) error { + data := []byte(s) + return json.Unmarshal(data, v) +} + +// toInt returns the int value of v if v or v's underlying type +// is an int. +// Note that this will return false for int64 etc. types. +func toInt(v interface{}) (int, bool) { + switch v := v.(type) { + case int: + return v, true + case time.Weekday: + return int(v), true + case time.Month: + return int(v), true + default: + return 0, false + } +} + +func trimZeroDecimal(s string) string { + var foundZero bool + for i := len(s); i > 0; i-- { + switch s[i-1] { + case '.': + if foundZero { + return s[:i-1] + } + case '0': + foundZero = true + default: + return s + } + } + return s +} diff --git a/vendor/github.com/spf13/cast/indirect.go b/vendor/github.com/spf13/cast/indirect.go deleted file mode 100644 index 093345f73..000000000 --- a/vendor/github.com/spf13/cast/indirect.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "reflect" -) - -// From html/template/content.go -// Copyright 2011 The Go Authors. All rights reserved. -// indirect returns the value, after dereferencing as many times -// as necessary to reach the base type (or nil). -func indirect(i any) (any, bool) { - if i == nil { - return nil, false - } - - if t := reflect.TypeOf(i); t.Kind() != reflect.Ptr { - // Avoid creating a reflect.Value if it's not a pointer. - return i, false - } - - v := reflect.ValueOf(i) - - for v.Kind() == reflect.Ptr || (v.Kind() == reflect.Interface && v.Elem().Kind() == reflect.Ptr) { - if v.IsNil() { - return nil, true - } - - v = v.Elem() - } - - return v.Interface(), true -} diff --git a/vendor/github.com/spf13/cast/internal/time.go b/vendor/github.com/spf13/cast/internal/time.go deleted file mode 100644 index 906e9aece..000000000 --- a/vendor/github.com/spf13/cast/internal/time.go +++ /dev/null @@ -1,79 +0,0 @@ -package internal - -import ( - "fmt" - "time" -) - -//go:generate stringer -type=TimeFormatType - -type TimeFormatType int - -const ( - TimeFormatNoTimezone TimeFormatType = iota - TimeFormatNamedTimezone - TimeFormatNumericTimezone - TimeFormatNumericAndNamedTimezone - TimeFormatTimeOnly -) - -type TimeFormat struct { - Format string - Typ TimeFormatType -} - -func (f TimeFormat) HasTimezone() bool { - // We don't include the formats with only named timezones, see - // https://github.com/golang/go/issues/19694#issuecomment-289103522 - return f.Typ >= TimeFormatNumericTimezone && f.Typ <= TimeFormatNumericAndNamedTimezone -} - -var TimeFormats = []TimeFormat{ - // Keep common formats at the top. - {"2006-01-02", TimeFormatNoTimezone}, - {time.RFC3339, TimeFormatNumericTimezone}, - {"2006-01-02T15:04:05", TimeFormatNoTimezone}, // iso8601 without timezone - {time.RFC1123Z, TimeFormatNumericTimezone}, - {time.RFC1123, TimeFormatNamedTimezone}, - {time.RFC822Z, TimeFormatNumericTimezone}, - {time.RFC822, TimeFormatNamedTimezone}, - {time.RFC850, TimeFormatNamedTimezone}, - {"2006-01-02 15:04:05.999999999 -0700 MST", TimeFormatNumericAndNamedTimezone}, // Time.String() - {"2006-01-02T15:04:05-0700", TimeFormatNumericTimezone}, // RFC3339 without timezone hh:mm colon - {"2006-01-02 15:04:05Z0700", TimeFormatNumericTimezone}, // RFC3339 without T or timezone hh:mm colon - {"2006-01-02 15:04:05", TimeFormatNoTimezone}, - {time.ANSIC, TimeFormatNoTimezone}, - {time.UnixDate, TimeFormatNamedTimezone}, - {time.RubyDate, TimeFormatNumericTimezone}, - {"2006-01-02 15:04:05Z07:00", TimeFormatNumericTimezone}, - {"02 Jan 2006", TimeFormatNoTimezone}, - {"2006-01-02 15:04:05 -07:00", TimeFormatNumericTimezone}, - {"2006-01-02 15:04:05 -0700", TimeFormatNumericTimezone}, - {time.Kitchen, TimeFormatTimeOnly}, - {time.Stamp, TimeFormatTimeOnly}, - {time.StampMilli, TimeFormatTimeOnly}, - {time.StampMicro, TimeFormatTimeOnly}, - {time.StampNano, TimeFormatTimeOnly}, -} - -func ParseDateWith(s string, location *time.Location, formats []TimeFormat) (d time.Time, e error) { - for _, format := range formats { - if d, e = time.Parse(format.Format, s); e == nil { - - // Some time formats have a zone name, but no offset, so it gets - // put in that zone name (not the default one passed in to us), but - // without that zone's offset. So set the location manually. - if format.Typ <= TimeFormatNamedTimezone { - if location == nil { - location = time.Local - } - year, month, day := d.Date() - hour, min, sec := d.Clock() - d = time.Date(year, month, day, hour, min, sec, d.Nanosecond(), location) - } - - return - } - } - return d, fmt.Errorf("unable to parse date: %s", s) -} diff --git a/vendor/github.com/spf13/cast/internal/timeformattype_string.go b/vendor/github.com/spf13/cast/internal/timeformattype_string.go deleted file mode 100644 index 60a29a862..000000000 --- a/vendor/github.com/spf13/cast/internal/timeformattype_string.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by "stringer -type=TimeFormatType"; DO NOT EDIT. - -package internal - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[TimeFormatNoTimezone-0] - _ = x[TimeFormatNamedTimezone-1] - _ = x[TimeFormatNumericTimezone-2] - _ = x[TimeFormatNumericAndNamedTimezone-3] - _ = x[TimeFormatTimeOnly-4] -} - -const _TimeFormatType_name = "TimeFormatNoTimezoneTimeFormatNamedTimezoneTimeFormatNumericTimezoneTimeFormatNumericAndNamedTimezoneTimeFormatTimeOnly" - -var _TimeFormatType_index = [...]uint8{0, 20, 43, 68, 101, 119} - -func (i TimeFormatType) String() string { - if i < 0 || i >= TimeFormatType(len(_TimeFormatType_index)-1) { - return "TimeFormatType(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _TimeFormatType_name[_TimeFormatType_index[i]:_TimeFormatType_index[i+1]] -} diff --git a/vendor/github.com/spf13/cast/map.go b/vendor/github.com/spf13/cast/map.go deleted file mode 100644 index 858d4ee43..000000000 --- a/vendor/github.com/spf13/cast/map.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "encoding/json" - "fmt" - "reflect" -) - -func toMapE[K comparable, V any](i any, keyFn func(any) K, valFn func(any) V) (map[K]V, error) { - m := map[K]V{} - - if i == nil { - return m, fmt.Errorf(errorMsg, i, i, m) - } - - switch v := i.(type) { - case map[K]V: - return v, nil - - case map[K]any: - for k, val := range v { - m[k] = valFn(val) - } - - return m, nil - - case map[any]V: - for k, val := range v { - m[keyFn(k)] = val - } - - return m, nil - - case map[any]any: - for k, val := range v { - m[keyFn(k)] = valFn(val) - } - - return m, nil - - case string: - err := jsonStringToObject(v, &m) - return m, err - - default: - return m, fmt.Errorf(errorMsg, i, i, m) - } -} - -func toStringMapE[T any](i any, fn func(any) T) (map[string]T, error) { - return toMapE(i, ToString, fn) -} - -// ToStringMapStringE casts any value to a map[string]string type. -func ToStringMapStringE(i any) (map[string]string, error) { - return toStringMapE(i, ToString) -} - -// ToStringMapStringSliceE casts any value to a map[string][]string type. -func ToStringMapStringSliceE(i any) (map[string][]string, error) { - m := map[string][]string{} - - switch v := i.(type) { - case map[string][]string: - return v, nil - case map[string][]any: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[string]string: - for k, val := range v { - m[ToString(k)] = []string{val} - } - case map[string]any: - for k, val := range v { - switch vt := val.(type) { - case []any: - m[ToString(k)] = ToStringSlice(vt) - case []string: - m[ToString(k)] = vt - default: - m[ToString(k)] = []string{ToString(val)} - } - } - return m, nil - case map[any][]string: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[any]string: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[any][]any: - for k, val := range v { - m[ToString(k)] = ToStringSlice(val) - } - return m, nil - case map[any]any: - for k, val := range v { - key, err := ToStringE(k) - if err != nil { - return m, fmt.Errorf(errorMsg, i, i, m) - } - value, err := ToStringSliceE(val) - if err != nil { - return m, fmt.Errorf(errorMsg, i, i, m) - } - m[key] = value - } - case string: - err := jsonStringToObject(v, &m) - return m, err - default: - return m, fmt.Errorf(errorMsg, i, i, m) - } - - return m, nil -} - -// ToStringMapBoolE casts any value to a map[string]bool type. -func ToStringMapBoolE(i any) (map[string]bool, error) { - return toStringMapE(i, ToBool) -} - -// ToStringMapE casts any value to a map[string]any type. -func ToStringMapE(i any) (map[string]any, error) { - fn := func(i any) any { return i } - - return toStringMapE(i, fn) -} - -func toStringMapIntE[T int | int64](i any, fn func(any) T, fnE func(any) (T, error)) (map[string]T, error) { - m := map[string]T{} - - if i == nil { - return nil, fmt.Errorf(errorMsg, i, i, m) - } - - switch v := i.(type) { - case map[string]T: - return v, nil - - case map[string]any: - for k, val := range v { - m[k] = fn(val) - } - - return m, nil - - case map[any]T: - for k, val := range v { - m[ToString(k)] = val - } - - return m, nil - - case map[any]any: - for k, val := range v { - m[ToString(k)] = fn(val) - } - - return m, nil - - case string: - err := jsonStringToObject(v, &m) - return m, err - } - - if reflect.TypeOf(i).Kind() != reflect.Map { - return m, fmt.Errorf(errorMsg, i, i, m) - } - - mVal := reflect.ValueOf(m) - v := reflect.ValueOf(i) - - for _, keyVal := range v.MapKeys() { - val, err := fnE(v.MapIndex(keyVal).Interface()) - if err != nil { - return m, fmt.Errorf(errorMsg, i, i, m) - } - - mVal.SetMapIndex(keyVal, reflect.ValueOf(val)) - } - - return m, nil -} - -// ToStringMapIntE casts any value to a map[string]int type. -func ToStringMapIntE(i any) (map[string]int, error) { - return toStringMapIntE(i, ToInt, ToIntE) -} - -// ToStringMapInt64E casts any value to a map[string]int64 type. -func ToStringMapInt64E(i any) (map[string]int64, error) { - return toStringMapIntE(i, ToInt64, ToInt64E) -} - -// jsonStringToObject attempts to unmarshall a string as JSON into -// the object passed as pointer. -func jsonStringToObject(s string, v any) error { - data := []byte(s) - return json.Unmarshal(data, v) -} diff --git a/vendor/github.com/spf13/cast/number.go b/vendor/github.com/spf13/cast/number.go deleted file mode 100644 index a58dc4d1e..000000000 --- a/vendor/github.com/spf13/cast/number.go +++ /dev/null @@ -1,549 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "encoding/json" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - "time" -) - -var errNegativeNotAllowed = errors.New("unable to cast negative value") - -type float64EProvider interface { - Float64() (float64, error) -} - -type float64Provider interface { - Float64() float64 -} - -// Number is a type parameter constraint for functions accepting number types. -// -// It represents the supported number types this package can cast to. -type Number interface { - int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64 -} - -type integer interface { - int | int8 | int16 | int32 | int64 -} - -type unsigned interface { - uint | uint8 | uint16 | uint32 | uint64 -} - -type float interface { - float32 | float64 -} - -// ToNumberE casts any value to a [Number] type. -func ToNumberE[T Number](i any) (T, error) { - var t T - - switch any(t).(type) { - case int: - return toNumberE[T](i, parseNumber[T]) - case int8: - return toNumberE[T](i, parseNumber[T]) - case int16: - return toNumberE[T](i, parseNumber[T]) - case int32: - return toNumberE[T](i, parseNumber[T]) - case int64: - return toNumberE[T](i, parseNumber[T]) - case uint: - return toUnsignedNumberE[T](i, parseNumber[T]) - case uint8: - return toUnsignedNumberE[T](i, parseNumber[T]) - case uint16: - return toUnsignedNumberE[T](i, parseNumber[T]) - case uint32: - return toUnsignedNumberE[T](i, parseNumber[T]) - case uint64: - return toUnsignedNumberE[T](i, parseNumber[T]) - case float32: - return toNumberE[T](i, parseNumber[T]) - case float64: - return toNumberE[T](i, parseNumber[T]) - default: - return 0, fmt.Errorf("unknown number type: %T", t) - } -} - -// ToNumber casts any value to a [Number] type. -func ToNumber[T Number](i any) T { - v, _ := ToNumberE[T](i) - - return v -} - -// toNumber's semantics differ from other "to" functions. -// It returns false as the second parameter if the conversion fails. -// This is to signal other callers that they should proceed with their own conversions. -func toNumber[T Number](i any) (T, bool) { - i, _ = indirect(i) - - switch s := i.(type) { - case T: - return s, true - case int: - return T(s), true - case int8: - return T(s), true - case int16: - return T(s), true - case int32: - return T(s), true - case int64: - return T(s), true - case uint: - return T(s), true - case uint8: - return T(s), true - case uint16: - return T(s), true - case uint32: - return T(s), true - case uint64: - return T(s), true - case float32: - return T(s), true - case float64: - return T(s), true - case bool: - if s { - return 1, true - } - - return 0, true - case nil: - return 0, true - case time.Weekday: - return T(s), true - case time.Month: - return T(s), true - } - - return 0, false -} - -func toNumberE[T Number](i any, parseFn func(string) (T, error)) (T, error) { - n, ok := toNumber[T](i) - if ok { - return n, nil - } - - i, _ = indirect(i) - - switch s := i.(type) { - case string: - if s == "" { - return 0, nil - } - - v, err := parseFn(s) - if err != nil { - return 0, fmt.Errorf(errorMsgWith, i, i, n, err) - } - - return v, nil - case json.Number: - if s == "" { - return 0, nil - } - - v, err := parseFn(string(s)) - if err != nil { - return 0, fmt.Errorf(errorMsgWith, i, i, n, err) - } - - return v, nil - case float64EProvider: - if _, ok := any(n).(float64); !ok { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - v, err := s.Float64() - if err != nil { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - return T(v), nil - case float64Provider: - if _, ok := any(n).(float64); !ok { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - return T(s.Float64()), nil - default: - if i, ok := resolveAlias(i); ok { - return toNumberE(i, parseFn) - } - - return 0, fmt.Errorf(errorMsg, i, i, n) - } -} - -func toUnsignedNumber[T Number](i any) (T, bool, bool) { - i, _ = indirect(i) - - switch s := i.(type) { - case T: - return s, true, true - case int: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case int8: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case int16: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case int32: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case int64: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case uint: - return T(s), true, true - case uint8: - return T(s), true, true - case uint16: - return T(s), true, true - case uint32: - return T(s), true, true - case uint64: - return T(s), true, true - case float32: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case float64: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case bool: - if s { - return 1, true, true - } - - return 0, true, true - case nil: - return 0, true, true - case time.Weekday: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - case time.Month: - if s < 0 { - return 0, false, false - } - - return T(s), true, true - } - - return 0, true, false -} - -func toUnsignedNumberE[T Number](i any, parseFn func(string) (T, error)) (T, error) { - n, valid, ok := toUnsignedNumber[T](i) - if ok { - return n, nil - } - - i, _ = indirect(i) - - if !valid { - return 0, errNegativeNotAllowed - } - - switch s := i.(type) { - case string: - if s == "" { - return 0, nil - } - - v, err := parseFn(s) - if err != nil { - return 0, fmt.Errorf(errorMsgWith, i, i, n, err) - } - - return v, nil - case json.Number: - if s == "" { - return 0, nil - } - - v, err := parseFn(string(s)) - if err != nil { - return 0, fmt.Errorf(errorMsgWith, i, i, n, err) - } - - return v, nil - case float64EProvider: - if _, ok := any(n).(float64); !ok { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - v, err := s.Float64() - if err != nil { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - if v < 0 { - return 0, errNegativeNotAllowed - } - - return T(v), nil - case float64Provider: - if _, ok := any(n).(float64); !ok { - return 0, fmt.Errorf(errorMsg, i, i, n) - } - - v := s.Float64() - - if v < 0 { - return 0, errNegativeNotAllowed - } - - return T(v), nil - default: - if i, ok := resolveAlias(i); ok { - return toUnsignedNumberE(i, parseFn) - } - - return 0, fmt.Errorf(errorMsg, i, i, n) - } -} - -func parseNumber[T Number](s string) (T, error) { - var t T - - switch any(t).(type) { - case int: - v, err := parseInt[int](s) - - return T(v), err - case int8: - v, err := parseInt[int8](s) - - return T(v), err - case int16: - v, err := parseInt[int16](s) - - return T(v), err - case int32: - v, err := parseInt[int32](s) - - return T(v), err - case int64: - v, err := parseInt[int64](s) - - return T(v), err - case uint: - v, err := parseUint[uint](s) - - return T(v), err - case uint8: - v, err := parseUint[uint8](s) - - return T(v), err - case uint16: - v, err := parseUint[uint16](s) - - return T(v), err - case uint32: - v, err := parseUint[uint32](s) - - return T(v), err - case uint64: - v, err := parseUint[uint64](s) - - return T(v), err - case float32: - v, err := strconv.ParseFloat(s, 32) - - return T(v), err - case float64: - v, err := strconv.ParseFloat(s, 64) - - return T(v), err - - default: - return 0, fmt.Errorf("unknown number type: %T", t) - } -} - -func parseInt[T integer](s string) (T, error) { - v, err := strconv.ParseInt(trimDecimal(s), 0, 0) - if err != nil { - return 0, err - } - - return T(v), nil -} - -func parseUint[T unsigned](s string) (T, error) { - v, err := strconv.ParseUint(strings.TrimLeft(trimDecimal(s), "+"), 0, 0) - if err != nil { - return 0, err - } - - return T(v), nil -} - -func parseFloat[T float](s string) (T, error) { - var t T - - var v any - var err error - - switch any(t).(type) { - case float32: - n, e := strconv.ParseFloat(s, 32) - - v = float32(n) - err = e - case float64: - n, e := strconv.ParseFloat(s, 64) - - v = float64(n) - err = e - } - - return v.(T), err -} - -// ToFloat64E casts an interface to a float64 type. -func ToFloat64E(i any) (float64, error) { - return toNumberE[float64](i, parseFloat[float64]) -} - -// ToFloat32E casts an interface to a float32 type. -func ToFloat32E(i any) (float32, error) { - return toNumberE[float32](i, parseFloat[float32]) -} - -// ToInt64E casts an interface to an int64 type. -func ToInt64E(i any) (int64, error) { - return toNumberE[int64](i, parseInt[int64]) -} - -// ToInt32E casts an interface to an int32 type. -func ToInt32E(i any) (int32, error) { - return toNumberE[int32](i, parseInt[int32]) -} - -// ToInt16E casts an interface to an int16 type. -func ToInt16E(i any) (int16, error) { - return toNumberE[int16](i, parseInt[int16]) -} - -// ToInt8E casts an interface to an int8 type. -func ToInt8E(i any) (int8, error) { - return toNumberE[int8](i, parseInt[int8]) -} - -// ToIntE casts an interface to an int type. -func ToIntE(i any) (int, error) { - return toNumberE[int](i, parseInt[int]) -} - -// ToUintE casts an interface to a uint type. -func ToUintE(i any) (uint, error) { - return toUnsignedNumberE[uint](i, parseUint[uint]) -} - -// ToUint64E casts an interface to a uint64 type. -func ToUint64E(i any) (uint64, error) { - return toUnsignedNumberE[uint64](i, parseUint[uint64]) -} - -// ToUint32E casts an interface to a uint32 type. -func ToUint32E(i any) (uint32, error) { - return toUnsignedNumberE[uint32](i, parseUint[uint32]) -} - -// ToUint16E casts an interface to a uint16 type. -func ToUint16E(i any) (uint16, error) { - return toUnsignedNumberE[uint16](i, parseUint[uint16]) -} - -// ToUint8E casts an interface to a uint type. -func ToUint8E(i any) (uint8, error) { - return toUnsignedNumberE[uint8](i, parseUint[uint8]) -} - -func trimZeroDecimal(s string) string { - var foundZero bool - for i := len(s); i > 0; i-- { - switch s[i-1] { - case '.': - if foundZero { - return s[:i-1] - } - case '0': - foundZero = true - default: - return s - } - } - return s -} - -var stringNumberRe = regexp.MustCompile(`^([-+]?\d*)(\.\d*)?$`) - -// see [BenchmarkDecimal] for details about the implementation -func trimDecimal(s string) string { - if !strings.Contains(s, ".") { - return s - } - - matches := stringNumberRe.FindStringSubmatch(s) - if matches != nil { - // matches[1] is the captured integer part with sign - s = matches[1] - - // handle special cases - switch s { - case "-", "+": - s += "0" - case "": - s = "0" - } - - return s - } - - return s -} diff --git a/vendor/github.com/spf13/cast/slice.go b/vendor/github.com/spf13/cast/slice.go deleted file mode 100644 index e6a8328c6..000000000 --- a/vendor/github.com/spf13/cast/slice.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "fmt" - "reflect" - "strings" -) - -// ToSliceE casts any value to a []any type. -func ToSliceE(i any) ([]any, error) { - i, _ = indirect(i) - - var s []any - - switch v := i.(type) { - case []any: - // TODO: use slices.Clone - return append(s, v...), nil - case []map[string]any: - for _, u := range v { - s = append(s, u) - } - - return s, nil - default: - return s, fmt.Errorf(errorMsg, i, i, s) - } -} - -func toSliceE[T Basic](i any) ([]T, error) { - v, ok, err := toSliceEOk[T](i) - if err != nil { - return nil, err - } - - if !ok { - return nil, fmt.Errorf(errorMsg, i, i, []T{}) - } - - return v, nil -} - -func toSliceEOk[T Basic](i any) ([]T, bool, error) { - i, _ = indirect(i) - if i == nil { - return nil, true, fmt.Errorf(errorMsg, i, i, []T{}) - } - - switch v := i.(type) { - case []T: - // TODO: clone slice - return v, true, nil - } - - kind := reflect.TypeOf(i).Kind() - switch kind { - case reflect.Slice, reflect.Array: - s := reflect.ValueOf(i) - a := make([]T, s.Len()) - - for j := 0; j < s.Len(); j++ { - val, err := ToE[T](s.Index(j).Interface()) - if err != nil { - return nil, true, fmt.Errorf(errorMsg, i, i, []T{}) - } - - a[j] = val - } - - return a, true, nil - default: - return nil, false, nil - } -} - -// ToStringSliceE casts any value to a []string type. -func ToStringSliceE(i any) ([]string, error) { - if a, ok, err := toSliceEOk[string](i); ok { - if err != nil { - return nil, err - } - - return a, nil - } - - var a []string - - switch v := i.(type) { - case string: - return strings.Fields(v), nil - case any: - str, err := ToStringE(v) - if err != nil { - return nil, fmt.Errorf(errorMsg, i, i, a) - } - - return []string{str}, nil - default: - return nil, fmt.Errorf(errorMsg, i, i, a) - } -} diff --git a/vendor/github.com/spf13/cast/time.go b/vendor/github.com/spf13/cast/time.go deleted file mode 100644 index 744cd5acc..000000000 --- a/vendor/github.com/spf13/cast/time.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "encoding/json" - "errors" - "fmt" - "strings" - "time" - - "github.com/spf13/cast/internal" -) - -// ToTimeE any value to a [time.Time] type. -func ToTimeE(i any) (time.Time, error) { - return ToTimeInDefaultLocationE(i, time.UTC) -} - -// ToTimeInDefaultLocationE casts an empty interface to [time.Time], -// interpreting inputs without a timezone to be in the given location, -// or the local timezone if nil. -func ToTimeInDefaultLocationE(i any, location *time.Location) (tim time.Time, err error) { - i, _ = indirect(i) - - switch v := i.(type) { - case time.Time: - return v, nil - case string: - return StringToDateInDefaultLocation(v, location) - case json.Number: - // Originally this used ToInt64E, but adding string float conversion broke ToTime. - // the behavior of ToTime would have changed if we continued using it. - // For now, using json.Number's own Int64 method should be good enough to preserve backwards compatibility. - v = json.Number(trimZeroDecimal(string(v))) - s, err1 := v.Int64() - if err1 != nil { - return time.Time{}, fmt.Errorf(errorMsg, i, i, time.Time{}) - } - return time.Unix(s, 0), nil - case int: - return time.Unix(int64(v), 0), nil - case int32: - return time.Unix(int64(v), 0), nil - case int64: - return time.Unix(v, 0), nil - case uint: - return time.Unix(int64(v), 0), nil - case uint32: - return time.Unix(int64(v), 0), nil - case uint64: - return time.Unix(int64(v), 0), nil - case nil: - return time.Time{}, nil - default: - return time.Time{}, fmt.Errorf(errorMsg, i, i, time.Time{}) - } -} - -// ToDurationE casts any value to a [time.Duration] type. -func ToDurationE(i any) (time.Duration, error) { - i, _ = indirect(i) - - switch s := i.(type) { - case time.Duration: - return s, nil - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - v, err := ToInt64E(s) - if err != nil { - // TODO: once there is better error handling, this should be easier - return 0, errors.New(strings.ReplaceAll(err.Error(), " int64", "time.Duration")) - } - - return time.Duration(v), nil - case float32, float64, float64EProvider, float64Provider: - v, err := ToFloat64E(s) - if err != nil { - // TODO: once there is better error handling, this should be easier - return 0, errors.New(strings.ReplaceAll(err.Error(), " float64", "time.Duration")) - } - - return time.Duration(v), nil - case string: - if !strings.ContainsAny(s, "nsuµmh") { - return time.ParseDuration(s + "ns") - } - - return time.ParseDuration(s) - case nil: - return time.Duration(0), nil - default: - if i, ok := resolveAlias(i); ok { - return ToDurationE(i) - } - - return 0, fmt.Errorf(errorMsg, i, i, time.Duration(0)) - } -} - -// StringToDate attempts to parse a string into a [time.Time] type using a -// predefined list of formats. -// -// If no suitable format is found, an error is returned. -func StringToDate(s string) (time.Time, error) { - return internal.ParseDateWith(s, time.UTC, internal.TimeFormats) -} - -// StringToDateInDefaultLocation casts an empty interface to a [time.Time], -// interpreting inputs without a timezone to be in the given location, -// or the local timezone if nil. -func StringToDateInDefaultLocation(s string, location *time.Location) (time.Time, error) { - return internal.ParseDateWith(s, location, internal.TimeFormats) -} diff --git a/vendor/github.com/spf13/cast/timeformattype_string.go b/vendor/github.com/spf13/cast/timeformattype_string.go new file mode 100644 index 000000000..1524fc82c --- /dev/null +++ b/vendor/github.com/spf13/cast/timeformattype_string.go @@ -0,0 +1,27 @@ +// Code generated by "stringer -type timeFormatType"; DO NOT EDIT. + +package cast + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[timeFormatNoTimezone-0] + _ = x[timeFormatNamedTimezone-1] + _ = x[timeFormatNumericTimezone-2] + _ = x[timeFormatNumericAndNamedTimezone-3] + _ = x[timeFormatTimeOnly-4] +} + +const _timeFormatType_name = "timeFormatNoTimezonetimeFormatNamedTimezonetimeFormatNumericTimezonetimeFormatNumericAndNamedTimezonetimeFormatTimeOnly" + +var _timeFormatType_index = [...]uint8{0, 20, 43, 68, 101, 119} + +func (i timeFormatType) String() string { + if i < 0 || i >= timeFormatType(len(_timeFormatType_index)-1) { + return "timeFormatType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _timeFormatType_name[_timeFormatType_index[i]:_timeFormatType_index[i+1]] +} diff --git a/vendor/github.com/spf13/cast/zz_generated.go b/vendor/github.com/spf13/cast/zz_generated.go deleted file mode 100644 index ce3ec0f78..000000000 --- a/vendor/github.com/spf13/cast/zz_generated.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by cast generator. DO NOT EDIT. - -package cast - -import "time" - -// ToBool casts any value to a(n) bool type. -func ToBool(i any) bool { - v, _ := ToBoolE(i) - return v -} - -// ToString casts any value to a(n) string type. -func ToString(i any) string { - v, _ := ToStringE(i) - return v -} - -// ToTime casts any value to a(n) time.Time type. -func ToTime(i any) time.Time { - v, _ := ToTimeE(i) - return v -} - -// ToTimeInDefaultLocation casts any value to a(n) time.Time type. -func ToTimeInDefaultLocation(i any, location *time.Location) time.Time { - v, _ := ToTimeInDefaultLocationE(i, location) - return v -} - -// ToDuration casts any value to a(n) time.Duration type. -func ToDuration(i any) time.Duration { - v, _ := ToDurationE(i) - return v -} - -// ToInt casts any value to a(n) int type. -func ToInt(i any) int { - v, _ := ToIntE(i) - return v -} - -// ToInt8 casts any value to a(n) int8 type. -func ToInt8(i any) int8 { - v, _ := ToInt8E(i) - return v -} - -// ToInt16 casts any value to a(n) int16 type. -func ToInt16(i any) int16 { - v, _ := ToInt16E(i) - return v -} - -// ToInt32 casts any value to a(n) int32 type. -func ToInt32(i any) int32 { - v, _ := ToInt32E(i) - return v -} - -// ToInt64 casts any value to a(n) int64 type. -func ToInt64(i any) int64 { - v, _ := ToInt64E(i) - return v -} - -// ToUint casts any value to a(n) uint type. -func ToUint(i any) uint { - v, _ := ToUintE(i) - return v -} - -// ToUint8 casts any value to a(n) uint8 type. -func ToUint8(i any) uint8 { - v, _ := ToUint8E(i) - return v -} - -// ToUint16 casts any value to a(n) uint16 type. -func ToUint16(i any) uint16 { - v, _ := ToUint16E(i) - return v -} - -// ToUint32 casts any value to a(n) uint32 type. -func ToUint32(i any) uint32 { - v, _ := ToUint32E(i) - return v -} - -// ToUint64 casts any value to a(n) uint64 type. -func ToUint64(i any) uint64 { - v, _ := ToUint64E(i) - return v -} - -// ToFloat32 casts any value to a(n) float32 type. -func ToFloat32(i any) float32 { - v, _ := ToFloat32E(i) - return v -} - -// ToFloat64 casts any value to a(n) float64 type. -func ToFloat64(i any) float64 { - v, _ := ToFloat64E(i) - return v -} - -// ToStringMapString casts any value to a(n) map[string]string type. -func ToStringMapString(i any) map[string]string { - v, _ := ToStringMapStringE(i) - return v -} - -// ToStringMapStringSlice casts any value to a(n) map[string][]string type. -func ToStringMapStringSlice(i any) map[string][]string { - v, _ := ToStringMapStringSliceE(i) - return v -} - -// ToStringMapBool casts any value to a(n) map[string]bool type. -func ToStringMapBool(i any) map[string]bool { - v, _ := ToStringMapBoolE(i) - return v -} - -// ToStringMapInt casts any value to a(n) map[string]int type. -func ToStringMapInt(i any) map[string]int { - v, _ := ToStringMapIntE(i) - return v -} - -// ToStringMapInt64 casts any value to a(n) map[string]int64 type. -func ToStringMapInt64(i any) map[string]int64 { - v, _ := ToStringMapInt64E(i) - return v -} - -// ToStringMap casts any value to a(n) map[string]any type. -func ToStringMap(i any) map[string]any { - v, _ := ToStringMapE(i) - return v -} - -// ToSlice casts any value to a(n) []any type. -func ToSlice(i any) []any { - v, _ := ToSliceE(i) - return v -} - -// ToBoolSlice casts any value to a(n) []bool type. -func ToBoolSlice(i any) []bool { - v, _ := ToBoolSliceE(i) - return v -} - -// ToStringSlice casts any value to a(n) []string type. -func ToStringSlice(i any) []string { - v, _ := ToStringSliceE(i) - return v -} - -// ToIntSlice casts any value to a(n) []int type. -func ToIntSlice(i any) []int { - v, _ := ToIntSliceE(i) - return v -} - -// ToInt64Slice casts any value to a(n) []int64 type. -func ToInt64Slice(i any) []int64 { - v, _ := ToInt64SliceE(i) - return v -} - -// ToUintSlice casts any value to a(n) []uint type. -func ToUintSlice(i any) []uint { - v, _ := ToUintSliceE(i) - return v -} - -// ToFloat64Slice casts any value to a(n) []float64 type. -func ToFloat64Slice(i any) []float64 { - v, _ := ToFloat64SliceE(i) - return v -} - -// ToDurationSlice casts any value to a(n) []time.Duration type. -func ToDurationSlice(i any) []time.Duration { - v, _ := ToDurationSliceE(i) - return v -} - -// ToBoolSliceE casts any value to a(n) []bool type. -func ToBoolSliceE(i any) ([]bool, error) { - return toSliceE[bool](i) -} - -// ToDurationSliceE casts any value to a(n) []time.Duration type. -func ToDurationSliceE(i any) ([]time.Duration, error) { - return toSliceE[time.Duration](i) -} - -// ToIntSliceE casts any value to a(n) []int type. -func ToIntSliceE(i any) ([]int, error) { - return toSliceE[int](i) -} - -// ToInt8SliceE casts any value to a(n) []int8 type. -func ToInt8SliceE(i any) ([]int8, error) { - return toSliceE[int8](i) -} - -// ToInt16SliceE casts any value to a(n) []int16 type. -func ToInt16SliceE(i any) ([]int16, error) { - return toSliceE[int16](i) -} - -// ToInt32SliceE casts any value to a(n) []int32 type. -func ToInt32SliceE(i any) ([]int32, error) { - return toSliceE[int32](i) -} - -// ToInt64SliceE casts any value to a(n) []int64 type. -func ToInt64SliceE(i any) ([]int64, error) { - return toSliceE[int64](i) -} - -// ToUintSliceE casts any value to a(n) []uint type. -func ToUintSliceE(i any) ([]uint, error) { - return toSliceE[uint](i) -} - -// ToUint8SliceE casts any value to a(n) []uint8 type. -func ToUint8SliceE(i any) ([]uint8, error) { - return toSliceE[uint8](i) -} - -// ToUint16SliceE casts any value to a(n) []uint16 type. -func ToUint16SliceE(i any) ([]uint16, error) { - return toSliceE[uint16](i) -} - -// ToUint32SliceE casts any value to a(n) []uint32 type. -func ToUint32SliceE(i any) ([]uint32, error) { - return toSliceE[uint32](i) -} - -// ToUint64SliceE casts any value to a(n) []uint64 type. -func ToUint64SliceE(i any) ([]uint64, error) { - return toSliceE[uint64](i) -} - -// ToFloat32SliceE casts any value to a(n) []float32 type. -func ToFloat32SliceE(i any) ([]float32, error) { - return toSliceE[float32](i) -} - -// ToFloat64SliceE casts any value to a(n) []float64 type. -func ToFloat64SliceE(i any) ([]float64, error) { - return toSliceE[float64](i) -} diff --git a/vendor/golang.org/x/mod/modfile/print.go b/vendor/golang.org/x/mod/modfile/print.go index 2a0123d4b..48dbd82ae 100644 --- a/vendor/golang.org/x/mod/modfile/print.go +++ b/vendor/golang.org/x/mod/modfile/print.go @@ -33,7 +33,7 @@ type printer struct { } // printf prints to the buffer. -func (p *printer) printf(format string, args ...interface{}) { +func (p *printer) printf(format string, args ...any) { fmt.Fprintf(p, format, args...) } diff --git a/vendor/golang.org/x/mod/modfile/read.go b/vendor/golang.org/x/mod/modfile/read.go index f58de029e..504a2f1df 100644 --- a/vendor/golang.org/x/mod/modfile/read.go +++ b/vendor/golang.org/x/mod/modfile/read.go @@ -600,7 +600,7 @@ func (in *input) readToken() { // Checked all punctuation. Must be identifier token. if c := in.peekRune(); !isIdent(c) { - in.Error(fmt.Sprintf("unexpected input character %#q", c)) + in.Error(fmt.Sprintf("unexpected input character %#q", rune(c))) } // Scan over identifier. diff --git a/vendor/golang.org/x/mod/modfile/rule.go b/vendor/golang.org/x/mod/modfile/rule.go index a86ee4fd8..c5b8305de 100644 --- a/vendor/golang.org/x/mod/modfile/rule.go +++ b/vendor/golang.org/x/mod/modfile/rule.go @@ -368,7 +368,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a Err: err, }) } - errorf := func(format string, args ...interface{}) { + errorf := func(format string, args ...any) { wrapError(fmt.Errorf(format, args...)) } @@ -574,7 +574,7 @@ func parseReplace(filename string, line *Line, verb string, args []string, fix V Err: err, } } - errorf := func(format string, args ...interface{}) *Error { + errorf := func(format string, args ...any) *Error { return wrapError(fmt.Errorf(format, args...)) } @@ -685,7 +685,7 @@ func (f *WorkFile) add(errs *ErrorList, line *Line, verb string, args []string, Err: err, }) } - errorf := func(format string, args ...interface{}) { + errorf := func(format string, args ...any) { wrapError(fmt.Errorf(format, args...)) } @@ -1594,7 +1594,7 @@ func (f *File) AddRetract(vi VersionInterval, rationale string) error { r.Syntax = f.Syntax.addLine(nil, "retract", "[", AutoQuote(vi.Low), ",", AutoQuote(vi.High), "]") } if rationale != "" { - for _, line := range strings.Split(rationale, "\n") { + for line := range strings.SplitSeq(rationale, "\n") { com := Comment{Token: "// " + line} r.Syntax.Comment().Before = append(r.Syntax.Comment().Before, com) } diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go index 9d3955bd7..739c13f48 100644 --- a/vendor/golang.org/x/mod/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -802,8 +802,8 @@ func MatchPrefixPatterns(globs, target string) bool { for globs != "" { // Extract next non-empty glob in comma-separated list. var glob string - if i := strings.Index(globs, ","); i >= 0 { - glob, globs = globs[:i], globs[i+1:] + if before, after, ok := strings.Cut(globs, ","); ok { + glob, globs = before, after } else { glob, globs = globs, "" } diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 1965913e5..ccb87e6da 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -376,11 +376,24 @@ type ClientConn struct { // completely unresponsive connection. pendingResets int + // readBeforeStreamID is the smallest stream ID that has not been followed by + // a frame read from the peer. We use this to determine when a request may + // have been sent to a completely unresponsive connection: + // If the request ID is less than readBeforeStreamID, then we have had some + // indication of life on the connection since sending the request. + readBeforeStreamID uint32 + // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. // Lock reqmu BEFORE mu or wmu. reqHeaderMu chan struct{} + // internalStateHook reports state changes back to the net/http.ClientConn. + // Note that this is different from the user state hook registered by + // net/http.ClientConn.SetStateHook: The internal hook calls ClientConn, + // which calls the user hook. + internalStateHook func() + // wmu is held while writing. // Acquire BEFORE mu when holding both, to avoid blocking mu on network writes. // Only acquire both at the same time when changing peer settings. @@ -710,7 +723,7 @@ func canRetryError(err error) bool { func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) { if t.transportTestHooks != nil { - return t.newClientConn(nil, singleUse) + return t.newClientConn(nil, singleUse, nil) } host, _, err := net.SplitHostPort(addr) if err != nil { @@ -720,7 +733,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b if err != nil { return nil, err } - return t.newClientConn(tconn, singleUse) + return t.newClientConn(tconn, singleUse, nil) } func (t *Transport) newTLSConfig(host string) *tls.Config { @@ -772,10 +785,10 @@ func (t *Transport) expectContinueTimeout() time.Duration { } func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { - return t.newClientConn(c, t.disableKeepAlives()) + return t.newClientConn(c, t.disableKeepAlives(), nil) } -func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { +func (t *Transport) newClientConn(c net.Conn, singleUse bool, internalStateHook func()) (*ClientConn, error) { conf := configFromTransport(t) cc := &ClientConn{ t: t, @@ -797,6 +810,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro pings: make(map[[8]byte]chan struct{}), reqHeaderMu: make(chan struct{}, 1), lastActive: time.Now(), + internalStateHook: internalStateHook, } if t.transportTestHooks != nil { t.transportTestHooks.newclientconn(cc) @@ -1037,10 +1051,7 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) { maxConcurrentOkay = cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) } - st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay && - !cc.doNotReuse && - int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 && - !cc.tooIdleLocked() + st.canTakeNewRequest = maxConcurrentOkay && cc.isUsableLocked() // If this connection has never been used for a request and is closed, // then let it take a request (which will fail). @@ -1056,6 +1067,31 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) { return } +func (cc *ClientConn) isUsableLocked() bool { + return cc.goAway == nil && + !cc.closed && + !cc.closing && + !cc.doNotReuse && + int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 && + !cc.tooIdleLocked() +} + +// canReserveLocked reports whether a net/http.ClientConn can reserve a slot on this conn. +// +// This follows slightly different rules than clientConnIdleState.canTakeNewRequest. +// We only permit reservations up to the conn's concurrency limit. +// This differs from ClientConn.ReserveNewRequest, which permits reservations +// past the limit when StrictMaxConcurrentStreams is set. +func (cc *ClientConn) canReserveLocked() bool { + if cc.currentRequestCountLocked() >= int(cc.maxConcurrentStreams) { + return false + } + if !cc.isUsableLocked() { + return false + } + return true +} + // currentRequestCountLocked reports the number of concurrency slots currently in use, // including active streams, reserved slots, and reset streams waiting for acknowledgement. func (cc *ClientConn) currentRequestCountLocked() int { @@ -1067,6 +1103,14 @@ func (cc *ClientConn) canTakeNewRequestLocked() bool { return st.canTakeNewRequest } +// availableLocked reports the number of concurrency slots available. +func (cc *ClientConn) availableLocked() int { + if !cc.canTakeNewRequestLocked() { + return 0 + } + return max(0, int(cc.maxConcurrentStreams)-cc.currentRequestCountLocked()) +} + // tooIdleLocked reports whether this connection has been been sitting idle // for too much wall time. func (cc *ClientConn) tooIdleLocked() bool { @@ -1091,6 +1135,7 @@ func (cc *ClientConn) closeConn() { t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn) defer t.Stop() cc.tconn.Close() + cc.maybeCallStateHook() } // A tls.Conn.Close can hang for a long time if the peer is unresponsive. @@ -1616,6 +1661,8 @@ func (cs *clientStream) cleanupWriteRequest(err error) { } bodyClosed := cs.reqBodyClosed closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil + // Have we read any frames from the connection since sending this request? + readSinceStream := cc.readBeforeStreamID > cs.ID cc.mu.Unlock() if mustCloseBody { cs.reqBody.Close() @@ -1647,8 +1694,10 @@ func (cs *clientStream) cleanupWriteRequest(err error) { // // This could be due to the server becoming unresponsive. // To avoid sending too many requests on a dead connection, - // we let the request continue to consume a concurrency slot - // until we can confirm the server is still responding. + // if we haven't read any frames from the connection since + // sending this request, we let it continue to consume + // a concurrency slot until we can confirm the server is + // still responding. // We do this by sending a PING frame along with the RST_STREAM // (unless a ping is already in flight). // @@ -1659,7 +1708,7 @@ func (cs *clientStream) cleanupWriteRequest(err error) { // because it's short lived and will probably be closed before // we get the ping response. ping := false - if !closeOnIdle { + if !closeOnIdle && !readSinceStream { cc.mu.Lock() // rstStreamPingsBlocked works around a gRPC behavior: // see comment on the field for details. @@ -1693,6 +1742,7 @@ func (cs *clientStream) cleanupWriteRequest(err error) { } close(cs.donec) + cc.maybeCallStateHook() } // awaitOpenSlotForStreamLocked waits until len(streams) < maxConcurrentStreams. @@ -2745,6 +2795,7 @@ func (rl *clientConnReadLoop) streamByID(id uint32, headerOrData bool) *clientSt // See comment on ClientConn.rstStreamPingsBlocked for details. rl.cc.rstStreamPingsBlocked = false } + rl.cc.readBeforeStreamID = rl.cc.nextStreamID cs := rl.cc.streams[id] if cs != nil && !cs.readAborted { return cs @@ -2795,6 +2846,7 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { cc := rl.cc + defer cc.maybeCallStateHook() cc.mu.Lock() defer cc.mu.Unlock() @@ -2975,6 +3027,7 @@ func (cc *ClientConn) Ping(ctx context.Context) error { func (rl *clientConnReadLoop) processPing(f *PingFrame) error { if f.IsAck() { cc := rl.cc + defer cc.maybeCallStateHook() cc.mu.Lock() defer cc.mu.Unlock() // If ack, notify listener if any @@ -3198,9 +3251,13 @@ func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err erro } // noDialH2RoundTripper is a RoundTripper which only tries to complete the request -// if there's already has a cached connection to the host. +// if there's already a cached connection to the host. // (The field is exported so it can be accessed via reflect from net/http; tested // by TestNoDialH2RoundTripperType) +// +// A noDialH2RoundTripper is registered with http1.Transport.RegisterProtocol, +// and the http1.Transport can use type assertions to call non-RoundTrip methods on it. +// This lets us expose, for example, NewClientConn to net/http. type noDialH2RoundTripper struct{ *Transport } func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { @@ -3211,6 +3268,85 @@ func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, err return res, err } +func (rt noDialH2RoundTripper) NewClientConn(conn net.Conn, internalStateHook func()) (http.RoundTripper, error) { + tr := rt.Transport + cc, err := tr.newClientConn(conn, tr.disableKeepAlives(), internalStateHook) + if err != nil { + return nil, err + } + + // RoundTrip should block when the conn is at its concurrency limit, + // not return an error. Setting strictMaxConcurrentStreams enables this. + cc.strictMaxConcurrentStreams = true + + return netHTTPClientConn{cc}, nil +} + +// netHTTPClientConn wraps ClientConn and implements the interface net/http expects from +// the RoundTripper returned by NewClientConn. +type netHTTPClientConn struct { + cc *ClientConn +} + +func (cc netHTTPClientConn) RoundTrip(req *http.Request) (*http.Response, error) { + return cc.cc.RoundTrip(req) +} + +func (cc netHTTPClientConn) Close() error { + return cc.cc.Close() +} + +func (cc netHTTPClientConn) Err() error { + cc.cc.mu.Lock() + defer cc.cc.mu.Unlock() + if cc.cc.closed { + return errors.New("connection closed") + } + return nil +} + +func (cc netHTTPClientConn) Reserve() error { + defer cc.cc.maybeCallStateHook() + cc.cc.mu.Lock() + defer cc.cc.mu.Unlock() + if !cc.cc.canReserveLocked() { + return errors.New("connection is unavailable") + } + cc.cc.streamsReserved++ + return nil +} + +func (cc netHTTPClientConn) Release() { + defer cc.cc.maybeCallStateHook() + cc.cc.mu.Lock() + defer cc.cc.mu.Unlock() + // We don't complain if streamsReserved is 0. + // + // This is consistent with RoundTrip: both Release and RoundTrip will + // consume a reservation iff one exists. + if cc.cc.streamsReserved > 0 { + cc.cc.streamsReserved-- + } +} + +func (cc netHTTPClientConn) Available() int { + cc.cc.mu.Lock() + defer cc.cc.mu.Unlock() + return cc.cc.availableLocked() +} + +func (cc netHTTPClientConn) InFlight() int { + cc.cc.mu.Lock() + defer cc.cc.mu.Unlock() + return cc.cc.currentRequestCountLocked() +} + +func (cc *ClientConn) maybeCallStateHook() { + if cc.internalStateHook != nil { + cc.internalStateHook() + } +} + func (t *Transport) idleConnTimeout() time.Duration { // to keep things backwards compatible, we use non-zero values of // IdleConnTimeout, followed by using the IdleConnTimeout on the underlying diff --git a/vendor/golang.org/x/net/trace/events.go b/vendor/golang.org/x/net/trace/events.go index 3aaffdd1f..c2b3c0098 100644 --- a/vendor/golang.org/x/net/trace/events.go +++ b/vendor/golang.org/x/net/trace/events.go @@ -58,8 +58,8 @@ func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) { Buckets: buckets, } - data.Families = make([]string, 0, len(families)) famMu.RLock() + data.Families = make([]string, 0, len(families)) for name := range families { data.Families = append(data.Families, name) } diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index 2f45dbc86..f69fd7546 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -144,8 +144,8 @@ func (g *Group) SetLimit(n int) { g.sem = nil return } - if len(g.sem) != 0 { - panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", len(g.sem))) + if active := len(g.sem); active != 0 { + panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", active)) } g.sem = make(chan token, n) } diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 42517077c..fd39be4ef 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -256,6 +256,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -613,7 +614,7 @@ ccflags="$@" $2 !~ /IOC_MAGIC/ && $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ || $2 ~ /^(VM|VMADDR)_/ || - $2 ~ /^IOCTL_VM_SOCKETS_/ || + $2 ~ /^(IOCTL_VM_SOCKETS_|IOCTL_MEI_)/ || $2 ~ /^(TASKSTATS|TS)_/ || $2 ~ /^CGROUPSTATS_/ || $2 ~ /^GENL_/ || diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index d0a75da57..120a7b35d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1615,6 +1615,8 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_MEI_CONNECT_CLIENT = 0xc0104801 + IOCTL_MEI_CONNECT_CLIENT_VTAG = 0xc0144804 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 1c37f9fbc..97a61fc5b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 6f54d34ae..a0d6d498c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 783ec5c12..dd9c903f9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index ca83d3ba1..384c61ca3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -120,6 +120,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 607e611c0..6384c9831 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index b9cb5bd3c..553c1c6f1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 65b078a63..b3339f209 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 5298a3033..177091d2b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 7bc557c87..c5abf156d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 152399bb0..f1f3fadf5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 1a1ce2409..203ad9c54 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 4231a1fb5..4b9abcb21 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 21c0e9526..f87983037 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index f00d1cd7c..64347eb35 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index bc8d539e6..7d7191171 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -119,6 +119,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x400000 IN_NONBLOCK = 0x4000 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index 439548ec9..50e8e6449 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -104,7 +104,7 @@ type Statvfs_t struct { Fsid uint32 Namemax uint32 Owner uint32 - Spare [4]uint32 + Spare [4]uint64 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]byte diff --git a/vendor/golang.org/x/text/encoding/japanese/eucjp.go b/vendor/golang.org/x/text/encoding/japanese/eucjp.go index 79313fa58..6fce8c5f5 100644 --- a/vendor/golang.org/x/text/encoding/japanese/eucjp.go +++ b/vendor/golang.org/x/text/encoding/japanese/eucjp.go @@ -17,9 +17,9 @@ import ( var EUCJP encoding.Encoding = &eucJP var eucJP = internal.Encoding{ - &internal.SimpleEncoding{eucJPDecoder{}, eucJPEncoder{}}, - "EUC-JP", - identifier.EUCPkdFmtJapanese, + Encoding: &internal.SimpleEncoding{Decoder: eucJPDecoder{}, Encoder: eucJPEncoder{}}, + Name: "EUC-JP", + MIB: identifier.EUCPkdFmtJapanese, } type eucJPDecoder struct{ transform.NopResetter } diff --git a/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go index 613226df5..6f7bd460a 100644 --- a/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go +++ b/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go @@ -17,9 +17,9 @@ import ( var ISO2022JP encoding.Encoding = &iso2022JP var iso2022JP = internal.Encoding{ - internal.FuncEncoding{iso2022JPNewDecoder, iso2022JPNewEncoder}, - "ISO-2022-JP", - identifier.ISO2022JP, + Encoding: internal.FuncEncoding{Decoder: iso2022JPNewDecoder, Encoder: iso2022JPNewEncoder}, + Name: "ISO-2022-JP", + MIB: identifier.ISO2022JP, } func iso2022JPNewDecoder() transform.Transformer { diff --git a/vendor/golang.org/x/text/encoding/japanese/shiftjis.go b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go index 16fd8a6e3..af65d43d9 100644 --- a/vendor/golang.org/x/text/encoding/japanese/shiftjis.go +++ b/vendor/golang.org/x/text/encoding/japanese/shiftjis.go @@ -18,9 +18,9 @@ import ( var ShiftJIS encoding.Encoding = &shiftJIS var shiftJIS = internal.Encoding{ - &internal.SimpleEncoding{shiftJISDecoder{}, shiftJISEncoder{}}, - "Shift JIS", - identifier.ShiftJIS, + Encoding: &internal.SimpleEncoding{Decoder: shiftJISDecoder{}, Encoder: shiftJISEncoder{}}, + Name: "Shift JIS", + MIB: identifier.ShiftJIS, } type shiftJISDecoder struct{ transform.NopResetter } diff --git a/vendor/golang.org/x/text/encoding/korean/euckr.go b/vendor/golang.org/x/text/encoding/korean/euckr.go index 034337f5d..81c834730 100644 --- a/vendor/golang.org/x/text/encoding/korean/euckr.go +++ b/vendor/golang.org/x/text/encoding/korean/euckr.go @@ -20,9 +20,9 @@ var All = []encoding.Encoding{EUCKR} var EUCKR encoding.Encoding = &eucKR var eucKR = internal.Encoding{ - &internal.SimpleEncoding{eucKRDecoder{}, eucKREncoder{}}, - "EUC-KR", - identifier.EUCKR, + Encoding: &internal.SimpleEncoding{Decoder: eucKRDecoder{}, Encoder: eucKREncoder{}}, + Name: "EUC-KR", + MIB: identifier.EUCKR, } type eucKRDecoder struct{ transform.NopResetter } diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go index 0e0fabfd6..2f2fd5d44 100644 --- a/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go @@ -22,21 +22,21 @@ var ( ) var gbk = internal.Encoding{ - &internal.SimpleEncoding{ - gbkDecoder{gb18030: false}, - gbkEncoder{gb18030: false}, + Encoding: &internal.SimpleEncoding{ + Decoder: gbkDecoder{gb18030: false}, + Encoder: gbkEncoder{gb18030: false}, }, - "GBK", - identifier.GBK, + Name: "GBK", + MIB: identifier.GBK, } var gbk18030 = internal.Encoding{ - &internal.SimpleEncoding{ - gbkDecoder{gb18030: true}, - gbkEncoder{gb18030: true}, + Encoding: &internal.SimpleEncoding{ + Decoder: gbkDecoder{gb18030: true}, + Encoder: gbkEncoder{gb18030: true}, }, - "GB18030", - identifier.GB18030, + Name: "GB18030", + MIB: identifier.GB18030, } type gbkDecoder struct { diff --git a/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go index e15b7bf6a..351750e60 100644 --- a/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go +++ b/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go @@ -17,9 +17,9 @@ import ( var HZGB2312 encoding.Encoding = &hzGB2312 var hzGB2312 = internal.Encoding{ - internal.FuncEncoding{hzGB2312NewDecoder, hzGB2312NewEncoder}, - "HZ-GB2312", - identifier.HZGB2312, + Encoding: internal.FuncEncoding{Decoder: hzGB2312NewDecoder, Encoder: hzGB2312NewEncoder}, + Name: "HZ-GB2312", + MIB: identifier.HZGB2312, } func hzGB2312NewDecoder() transform.Transformer { diff --git a/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go index 1fcddde08..5046920ee 100644 --- a/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go +++ b/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go @@ -20,9 +20,9 @@ var All = []encoding.Encoding{Big5} var Big5 encoding.Encoding = &big5 var big5 = internal.Encoding{ - &internal.SimpleEncoding{big5Decoder{}, big5Encoder{}}, - "Big5", - identifier.Big5, + Encoding: &internal.SimpleEncoding{Decoder: big5Decoder{}, Encoder: big5Encoder{}}, + Name: "Big5", + MIB: identifier.Big5, } type big5Decoder struct{ transform.NopResetter } diff --git a/vendor/golang.org/x/text/encoding/unicode/unicode.go b/vendor/golang.org/x/text/encoding/unicode/unicode.go index dd99ad14d..ce28c9062 100644 --- a/vendor/golang.org/x/text/encoding/unicode/unicode.go +++ b/vendor/golang.org/x/text/encoding/unicode/unicode.go @@ -60,9 +60,9 @@ func (utf8bomEncoding) NewDecoder() *encoding.Decoder { } var utf8enc = &internal.Encoding{ - &internal.SimpleEncoding{utf8Decoder{}, runes.ReplaceIllFormed()}, - "UTF-8", - identifier.UTF8, + Encoding: &internal.SimpleEncoding{Decoder: utf8Decoder{}, Encoder: runes.ReplaceIllFormed()}, + Name: "UTF-8", + MIB: identifier.UTF8, } type utf8bomDecoder struct { diff --git a/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go b/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go index d6c2586e7..b84c8d6fe 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go @@ -179,12 +179,13 @@ func (c *CFGs) buildDecl(fn *types.Func, di *declInfo) { } di.started = true - noreturn := isIntrinsicNoReturn(fn) - - if di.decl.Body != nil { - di.cfg = cfg.New(di.decl.Body, c.callMayReturn) - if cfginternal.IsNoReturn(di.cfg) { - noreturn = true + noreturn, known := knownIntrinsic(fn) + if !known { + if di.decl.Body != nil { + di.cfg = cfg.New(di.decl.Body, c.callMayReturn) + if cfginternal.IsNoReturn(di.cfg) { + noreturn = true + } } } if noreturn { @@ -233,11 +234,36 @@ func (c *CFGs) callMayReturn(call *ast.CallExpr) (r bool) { var panicBuiltin = types.Universe.Lookup("panic").(*types.Builtin) -// isIntrinsicNoReturn reports whether a function intrinsically never -// returns because it stops execution of the calling thread. +// knownIntrinsic reports whether a function intrinsically never +// returns because it stops execution of the calling thread, or does +// in fact return, contrary to its apparent body, because it is +// handled specially by the compiler. +// // It is the base case in the recursion. -func isIntrinsicNoReturn(fn *types.Func) bool { +func knownIntrinsic(fn *types.Func) (noreturn, known bool) { // Add functions here as the need arises, but don't allocate memory. - return typesinternal.IsFunctionNamed(fn, "syscall", "Exit", "ExitProcess", "ExitThread") || - typesinternal.IsFunctionNamed(fn, "runtime", "Goexit") + + // Functions known intrinsically never to return. + if typesinternal.IsFunctionNamed(fn, "syscall", "Exit", "ExitProcess", "ExitThread") || + typesinternal.IsFunctionNamed(fn, "runtime", "Goexit") { + return true, true + } + + // Compiler intrinsics known to return, contrary to + // what analysis of the function body would conclude. + // + // Not all such intrinsics must be listed here: ctrlflow + // considers any function called for its value--such as + // crypto/internal/constanttime.bool2Uint8--to potentially + // return; only functions called as a statement, for effects, + // are no-return candidates. + // + // Unfortunately this does sometimes mean peering into internals. + // Where possible, use the nearest enclosing public API function. + if typesinternal.IsFunctionNamed(fn, "internal/abi", "EscapeNonString") || + typesinternal.IsFunctionNamed(fn, "hash/maphash", "Comparable") { + return false, true + } + + return // unknown } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go index 7469002f5..03c21fa73 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go @@ -199,12 +199,19 @@ are often used to express optionality. omitzero: suggest replacing omitempty with omitzero for struct fields -The omitzero analyzer identifies uses of the `omitempty` JSON struct tag on -fields that are themselves structs. The `omitempty` tag has no effect on -struct-typed fields. The analyzer offers two suggestions: either remove the +The omitzero analyzer identifies uses of the `omitempty` JSON struct +tag on fields that are themselves structs. For struct-typed fields, +the `omitempty` tag has no effect on the behavior of json.Marshal and +json.Unmarshal. The analyzer offers two suggestions: either remove the tag, or replace it with `omitzero` (added in Go 1.24), which correctly omits the field if the struct value is zero. +However, some other serialization packages (notably kubebuilder, see +https://book.kubebuilder.io/reference/markers.html) may have their own +interpretation of the `json:",omitzero"` tag, so removing it may affect +program behavior. For this reason, the omitzero modernizer will not +make changes in any package that contains +kubebuilder annotations. + Replacing `omitempty` with `omitzero` is a change in behavior. The original code would always encode the struct field, whereas the modified code will omit it if it is a zero-value. @@ -475,6 +482,22 @@ with a single call to t.Context(), which was added in Go 1.24. This change is only suggested if the `cancel` function is not used for any other purpose. +# Analyzer unsafefuncs + +unsafefuncs: replace unsafe pointer arithmetic with function calls + +The unsafefuncs analyzer simplifies pointer arithmetic expressions by +replacing them with calls to helper functions such as unsafe.Add, +added in Go 1.17. + +Example: + + unsafe.Pointer(uintptr(ptr) + uintptr(n)) + +where ptr is an unsafe.Pointer, is replaced by: + + unsafe.Add(ptr, n) + # Analyzer waitgroup waitgroup: replace wg.Add(1)/go/wg.Done() with wg.Go diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/forvar.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/forvar.go index 67f60acaa..ba54daebb 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/forvar.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/forvar.go @@ -35,7 +35,7 @@ var ForVarAnalyzer = &analysis.Analyzer{ // where the two idents are the same, // and the ident is defined (:=) as a variable in the for statement. // (Note that this 'fix' does not work for three clause loops -// because the Go specfilesUsingGoVersionsays "The variable used by each subsequent iteration +// because the Go spec says "The variable used by each subsequent iteration // is declared implicitly before executing the post statement and initialized to the // value of the previous iteration's variable at that moment.") // diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go index 2352c8b60..f97541d4b 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go @@ -233,13 +233,16 @@ func mapsloop(pass *analysis.Pass) (any, error) { assign := rng.Body.List[0].(*ast.AssignStmt) if index, ok := assign.Lhs[0].(*ast.IndexExpr); ok && astutil.EqualSyntax(rng.Key, index.Index) && - astutil.EqualSyntax(rng.Value, assign.Rhs[0]) && - is[*types.Map](typeparams.CoreType(info.TypeOf(index.X))) && - types.Identical(info.TypeOf(index), info.TypeOf(rng.Value)) { // m[k], v + astutil.EqualSyntax(rng.Value, assign.Rhs[0]) { + if tmap, ok := typeparams.CoreType(info.TypeOf(index.X)).(*types.Map); ok && + types.Identical(info.TypeOf(index), info.TypeOf(rng.Value)) && // m[k], v + types.Identical(tmap.Key(), info.TypeOf(rng.Key)) { - // Have: for k, v := range x { m[k] = v } - // where there is no implicit conversion. - check(file, curRange, assign, index.X, rng.X) + // Have: for k, v := range x { m[k] = v } + // where there is no implicit conversion + // of either key or value. + check(file, curRange, assign, index.X, rng.X) + } } } } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go index 013ce79d6..da988a78a 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go @@ -53,6 +53,7 @@ var Suite = []*analysis.Analyzer{ StringsSeqAnalyzer, StringsBuilderAnalyzer, TestingContextAnalyzer, + unsafeFuncsAnalyzer, WaitGroupAnalyzer, } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/omitzero.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/omitzero.go index 4a05d64f4..59ba95065 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/omitzero.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/omitzero.go @@ -9,6 +9,8 @@ import ( "go/types" "reflect" "strconv" + "strings" + "sync" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" @@ -25,82 +27,106 @@ var OmitZeroAnalyzer = &analysis.Analyzer{ URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#omitzero", } -func checkOmitEmptyField(pass *analysis.Pass, info *types.Info, curField *ast.Field) { - typ := info.TypeOf(curField.Type) - _, ok := typ.Underlying().(*types.Struct) - if !ok { - // Not a struct - return - } - tag := curField.Tag - if tag == nil { - // No tag to check - return - } - // The omitempty tag may be used by other packages besides json, but we should only modify its use with json - tagconv, _ := strconv.Unquote(tag.Value) - match := omitemptyRegex.FindStringSubmatchIndex(tagconv) - if match == nil { - // No omitempty in json tag - return - } - omitEmpty, err := astutil.RangeInStringLiteral(curField.Tag, match[2], match[3]) - if err != nil { - return - } - var remove analysis.Range = omitEmpty +// The omitzero pass searches for instances of "omitempty" in a json field tag on a +// struct. Since "omitfilesUsingGoVersions not have any effect when applied to a struct field, +// it suggests either deleting "omitempty" or replacing it with "omitzero", which +// correctly excludes structs from a json encoding. +func omitzero(pass *analysis.Pass) (any, error) { + // usesKubebuilder reports whether "+kubebuilder:" appears in + // any comment in the package, since it has its own + // interpretation of what omitzero means; see go.dev/issue/76649. + // It is computed once, on demand. + usesKubebuilder := sync.OnceValue[bool](func() bool { + for _, file := range pass.Files { + for _, comment := range file.Comments { + if strings.Contains(comment.Text(), "+kubebuilder:") { + return true + } + } + } + return false + }) + + checkField := func(field *ast.Field) { + typ := pass.TypesInfo.TypeOf(field.Type) + _, ok := typ.Underlying().(*types.Struct) + if !ok { + // Not a struct + return + } + tag := field.Tag + if tag == nil { + // No tag to check + return + } + // The omitempty tag may be used by other packages besides json, but we should only modify its use with json + tagconv, _ := strconv.Unquote(tag.Value) + match := omitemptyRegex.FindStringSubmatchIndex(tagconv) + if match == nil { + // No omitempty in json tag + return + } + omitEmpty, err := astutil.RangeInStringLiteral(field.Tag, match[2], match[3]) + if err != nil { + return + } + var remove analysis.Range = omitEmpty - jsonTag := reflect.StructTag(tagconv).Get("json") - if jsonTag == ",omitempty" { - // Remove the entire struct tag if json is the only package used - if match[1]-match[0] == len(tagconv) { - remove = curField.Tag - } else { - // Remove the json tag if omitempty is the only field - remove, err = astutil.RangeInStringLiteral(curField.Tag, match[0], match[1]) - if err != nil { - return + jsonTag := reflect.StructTag(tagconv).Get("json") + if jsonTag == ",omitempty" { + // Remove the entire struct tag if json is the only package used + if match[1]-match[0] == len(tagconv) { + remove = field.Tag + } else { + // Remove the json tag if omitempty is the only field + remove, err = astutil.RangeInStringLiteral(field.Tag, match[0], match[1]) + if err != nil { + return + } } } - } - pass.Report(analysis.Diagnostic{ - Pos: curField.Tag.Pos(), - End: curField.Tag.End(), - Message: "Omitempty has no effect on nested struct fields", - SuggestedFixes: []analysis.SuggestedFix{ - { - Message: "Remove redundant omitempty tag", - TextEdits: []analysis.TextEdit{ - { - Pos: remove.Pos(), - End: remove.End(), + + // Don't offer a fix if the package seems to use kubebuilder, + // as it has its own intepretation of "omitzero" tags. + // https://book.kubebuilder.io/reference/markers.html + if usesKubebuilder() { + return + } + + pass.Report(analysis.Diagnostic{ + Pos: field.Tag.Pos(), + End: field.Tag.End(), + Message: "Omitempty has no effect on nested struct fields", + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Remove redundant omitempty tag", + TextEdits: []analysis.TextEdit{ + { + Pos: remove.Pos(), + End: remove.End(), + }, }, }, - }, - { - Message: "Replace omitempty with omitzero (behavior change)", - TextEdits: []analysis.TextEdit{ - { - Pos: omitEmpty.Pos(), - End: omitEmpty.End(), - NewText: []byte(",omitzero"), + { + Message: "Replace omitempty with omitzero (behavior change)", + TextEdits: []analysis.TextEdit{ + { + Pos: omitEmpty.Pos(), + End: omitEmpty.End(), + NewText: []byte(",omitzero"), + }, }, }, - }, - }}) -} + }}) + } -// The omitzero pass searches for instances of "omitempty" in a json field tag on a -// struct. Since "omitfilesUsingGoVersions not have any effect when applied to a struct field, -// it suggests either deleting "omitempty" or replacing it with "omitzero", which -// correctly excludes structs from a json encoding. -func omitzero(pass *analysis.Pass) (any, error) { for curFile := range filesUsingGoVersion(pass, versions.Go1_24) { for curStruct := range curFile.Preorder((*ast.StructType)(nil)) { for _, curField := range curStruct.Node().(*ast.StructType).Fields.List { - checkOmitEmptyField(pass, pass.TypesInfo, curField) + checkField(curField) } } } + return nil, nil } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go index 6b1edf38b..c42ec58ec 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go @@ -161,7 +161,22 @@ func rangeint(pass *analysis.Pass) (any, error) { // don't offer a fix, as a range loop // leaves i with a different final value (limit-1). if init.Tok == token.ASSIGN { - for curId := range curLoop.Parent().Preorder((*ast.Ident)(nil)) { + // Find the nearest ancestor that is not a label. + // Otherwise, checking for i usage outside of a for + // loop might not function properly further below. + // This is because the i usage might be a child of + // the loop's parent's parent, for example: + // var i int + // Loop: + // for i = 0; i < 10; i++ { break loop } + // // i is in the sibling of the label, not the loop + // fmt.Println(i) + // + ancestor := curLoop.Parent() + for is[*ast.LabeledStmt](ancestor.Node()) { + ancestor = ancestor.Parent() + } + for curId := range ancestor.Preorder((*ast.Ident)(nil)) { id := curId.Node().(*ast.Ident) if info.Uses[id] == v { // Is i used after loop? diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go index 0fc781813..2611f6cf0 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go @@ -102,6 +102,23 @@ func reflecttypefor(pass *analysis.Pass) (any, error) { continue // e.g. reflect was dot-imported } + // Don't offer a fix if the type contains an unnamed struct or unnamed + // interface because the replacement would be significantly more verbose. + // (See golang/go#76698) + if isComplicatedType(t) { + continue + } + + // Don't offer the fix if the type string is too long. We define "too + // long" as more than three times the length of the original expression + // and at least 16 characters (a 3x length increase of a very + // short expression should not be cause for skipping the fix). + oldLen := int(expr.End() - expr.Pos()) + newLen := len(tstr) + if newLen >= 16 && newLen > 3*oldLen { + continue + } + // If the call argument contains the last use // of a variable, as in: // var zero T @@ -137,3 +154,43 @@ func reflecttypefor(pass *analysis.Pass) (any, error) { return nil, nil } + +// isComplicatedType reports whether type t is complicated, e.g. it is or contains an +// unnamed struct, interface, or function signature. +func isComplicatedType(t types.Type) bool { + var check func(typ types.Type) bool + check = func(typ types.Type) bool { + switch t := typ.(type) { + case typesinternal.NamedOrAlias: + for ta := range t.TypeArgs().Types() { + if check(ta) { + return true + } + } + return false + case *types.Struct, *types.Interface, *types.Signature: + // These are complex types with potentially many elements + // so we should avoid duplicating their definition. + return true + case *types.Pointer: + return check(t.Elem()) + case *types.Slice: + return check(t.Elem()) + case *types.Array: + return check(t.Elem()) + case *types.Chan: + return check(t.Elem()) + case *types.Map: + return check(t.Key()) || check(t.Elem()) + case *types.Basic: + return false + case *types.TypeParam: + return false + default: + // Includes types.Union + return true + } + } + + return check(t) +} diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go index cc5958067..f7318b123 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go @@ -43,23 +43,29 @@ func init() { // iter.Seq. var stditeratorsTable = [...]struct { pkgpath, typename, lenmethod, atmethod, itermethod, elemname string + + seqn int // 1 or 2 => "for x" or "for _, x" }{ // Example: in go/types, (*Tuple).Variables returns an // iterator that replaces a loop over (*Tuple).{Len,At}. // The loop variable is named "v". - {"go/types", "Interface", "NumEmbeddeds", "EmbeddedType", "EmbeddedTypes", "etyp"}, - {"go/types", "Interface", "NumExplicitMethods", "ExplicitMethod", "ExplicitMethods", "method"}, - {"go/types", "Interface", "NumMethods", "Method", "Methods", "method"}, - {"go/types", "MethodSet", "Len", "At", "Methods", "method"}, - {"go/types", "Named", "NumMethods", "Method", "Methods", "method"}, - {"go/types", "Scope", "NumChildren", "Child", "Children", "child"}, - {"go/types", "Struct", "NumFields", "Field", "Fields", "field"}, - {"go/types", "Tuple", "Len", "At", "Variables", "v"}, - {"go/types", "TypeList", "Len", "At", "Types", "t"}, - {"go/types", "TypeParamList", "Len", "At", "TypeParams", "tparam"}, - {"go/types", "Union", "Len", "Term", "Terms", "term"}, - // TODO(adonovan): support Seq2. Bonus: transform uses of both key and value. - // {"reflect", "Value", "NumFields", "Field", "Fields", "field"}, + {"go/types", "Interface", "NumEmbeddeds", "EmbeddedType", "EmbeddedTypes", "etyp", 1}, + {"go/types", "Interface", "NumExplicitMethods", "ExplicitMethod", "ExplicitMethods", "method", 1}, + {"go/types", "Interface", "NumMethods", "Method", "Methods", "method", 1}, + {"go/types", "MethodSet", "Len", "At", "Methods", "method", 1}, + {"go/types", "Named", "NumMethods", "Method", "Methods", "method", 1}, + {"go/types", "Scope", "NumChildren", "Child", "Children", "child", 1}, + {"go/types", "Struct", "NumFields", "Field", "Fields", "field", 1}, + {"go/types", "Tuple", "Len", "At", "Variables", "v", 1}, + {"go/types", "TypeList", "Len", "At", "Types", "t", 1}, + {"go/types", "TypeParamList", "Len", "At", "TypeParams", "tparam", 1}, + {"go/types", "Union", "Len", "Term", "Terms", "term", 1}, + {"reflect", "Type", "NumField", "Field", "Fields", "field", 1}, + {"reflect", "Type", "NumMethod", "Method", "Methods", "method", 1}, + {"reflect", "Type", "NumIn", "In", "Ins", "in", 1}, + {"reflect", "Type", "NumOut", "Out", "Outs", "out", 1}, + {"reflect", "Value", "NumField", "Field", "Fields", "field", 2}, + {"reflect", "Value", "NumMethod", "Method", "Methods", "method", 2}, } // stditerators suggests fixes to replace loops using Len/At-style @@ -86,6 +92,19 @@ var stditeratorsTable = [...]struct { // the user hasn't intentionally chosen not to use an // iterator for that reason? We don't want to go fix to // undo optimizations. Do we need a suppression mechanism? +// +// TODO(adonovan): recognize the more complex patterns that +// could make full use of both components of an iter.Seq2, e.g. +// +// for i := 0; i < v.NumField(); i++ { +// use(v.Field(i), v.Type().Field(i)) +// } +// +// => +// +// for structField, field := range v.Fields() { +// use(structField, field) +// } func stditerators(pass *analysis.Pass) (any, error) { var ( index = pass.ResultOf[typeindexanalyzer.Analyzer].(*typeindex.Index) @@ -228,15 +247,17 @@ func stditerators(pass *analysis.Pass) (any, error) { indexVar = v curBody = curFor.ChildAt(edge.ForStmt_Body, -1) elem, elemVar = chooseName(curBody, lenSel.X, indexVar) + elemPrefix := cond(row.seqn == 2, "_, ", "") - // for i := 0; i < x.Len(); i++ { - // ---- ------- --- ----- - // for elem := range x.All() { + // for i := 0; i < x.Len(); i++ { + // ---- ------- --- ----- + // for elem := range x.All() { + // or for _, elem := ... edits = []analysis.TextEdit{ { Pos: v.Pos(), End: v.Pos() + token.Pos(len(v.Name())), - NewText: []byte(elem), + NewText: []byte(elemPrefix + elem), }, { Pos: loop.Init.(*ast.AssignStmt).Rhs[0].Pos(), @@ -271,6 +292,7 @@ func stditerators(pass *analysis.Pass) (any, error) { indexVar = info.Defs[id].(*types.Var) curBody = curRange.ChildAt(edge.RangeStmt_Body, -1) elem, elemVar = chooseName(curBody, lenSel.X, indexVar) + elemPrefix := cond(row.seqn == 2, "_, ", "") // for i := range x.Len() { // ---- --- @@ -279,7 +301,7 @@ func stditerators(pass *analysis.Pass) (any, error) { { Pos: loop.Key.Pos(), End: loop.Key.End(), - NewText: []byte(elem), + NewText: []byte(elemPrefix + elem), }, { Pos: lenSel.Sel.Pos(), @@ -344,8 +366,8 @@ func stditerators(pass *analysis.Pass) (any, error) { // (In the long run, version filters are not highly selective, // so there's no need to do them first, especially as this check // may be somewhat expensive.) - if v, ok := methodGoVersion(row.pkgpath, row.typename, row.itermethod); !ok { - panic("no version found") + if v, err := methodGoVersion(row.pkgpath, row.typename, row.itermethod); err != nil { + panic(err) } else if !analyzerutil.FileUsesGoVersion(pass, astutil.EnclosingFile(curLenCall), v.String()) { continue nextCall } @@ -371,7 +393,7 @@ func stditerators(pass *analysis.Pass) (any, error) { // methodGoVersion reports the version at which the method // (pkgpath.recvtype).method appeared in the standard library. -func methodGoVersion(pkgpath, recvtype, method string) (stdlib.Version, bool) { +func methodGoVersion(pkgpath, recvtype, method string) (stdlib.Version, error) { // TODO(adonovan): opt: this might be inefficient for large packages // like go/types. If so, memoize using a map (and kill two birds with // one stone by also memoizing the 'within' check above). @@ -379,9 +401,9 @@ func methodGoVersion(pkgpath, recvtype, method string) (stdlib.Version, bool) { if sym.Kind == stdlib.Method { _, recv, name := sym.SplitMethod() if recv == recvtype && name == method { - return sym.Version, true + return sym.Version, nil } } } - return 0, false + return 0, fmt.Errorf("methodGoVersion: %s.%s.%s missing from stdlib manifest", pkgpath, recvtype, method) } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go index 521c264c5..954997ad6 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go @@ -50,9 +50,14 @@ func init() { // The following must hold for a replacement to occur: // // 1. All instances of i and s must be in one of these forms. -// Binary expressions: -// (a): establishing that i < 0: e.g.: i < 0, 0 > i, i == -1, -1 == i -// (b): establishing that i > -1: e.g.: i >= 0, 0 <= i, i == 0, 0 == i +// +// Binary expressions must be inequalities equivalent to +// "Index failed" (e.g. i < 0) or "Index succeeded" (i >= 0), +// or identities such as these (and their negations): +// +// 0 > i (flips left and right) +// i <= -1, -1 >= i (replace strict inequality by non-strict) +// i == -1, -1 == i (Index() guarantees i < 0 => i == -1) // // Slice expressions: // a: s[:i], s[0:i] @@ -86,9 +91,9 @@ func init() { // use(before, after) // } // -// If the condition involving `i` establishes that i > -1, then we replace it with -// `if ok“. Variants listed above include i >= 0, i > 0, and i == 0. -// If the condition is negated (e.g. establishes `i < 0`), we use `if !ok` instead. +// If the condition involving `i` is equivalent to i >= 0, then we replace it with +// `if ok“. +// If the condition is negated (e.g. equivalent to `i < 0`), we use `if !ok` instead. // If the slices of `s` match `s[:i]` or `s[i+len(substr):]` or their variants listed above, // then we replace them with before and after. // @@ -178,16 +183,16 @@ func stringscut(pass *analysis.Pass) (any, error) { // len(substr)]), then we can replace the call to Index() // with a call to Cut() and use the returned ok, before, // and after variables accordingly. - lessZero, greaterNegOne, beforeSlice, afterSlice := checkIdxUses(pass.TypesInfo, index.Uses(iObj), s, substr) + negative, nonnegative, beforeSlice, afterSlice := checkIdxUses(pass.TypesInfo, index.Uses(iObj), s, substr) // Either there are no uses of before, after, or ok, or some use // of i does not match our criteria - don't suggest a fix. - if lessZero == nil && greaterNegOne == nil && beforeSlice == nil && afterSlice == nil { + if negative == nil && nonnegative == nil && beforeSlice == nil && afterSlice == nil { continue } // If the only uses are ok and !ok, don't suggest a Cut() fix - these should be using Contains() - isContains := (len(lessZero) > 0 || len(greaterNegOne) > 0) && len(beforeSlice) == 0 && len(afterSlice) == 0 + isContains := (len(negative) > 0 || len(nonnegative) > 0) && len(beforeSlice) == 0 && len(afterSlice) == 0 scope := iObj.Parent() var ( @@ -200,7 +205,7 @@ func stringscut(pass *analysis.Pass) (any, error) { // If there will be no uses of ok, before, or after, use the // blank identifier instead. - if len(lessZero) == 0 && len(greaterNegOne) == 0 { + if len(negative) == 0 && len(nonnegative) == 0 { okVarName = "_" } if len(beforeSlice) == 0 { @@ -226,8 +231,8 @@ func stringscut(pass *analysis.Pass) (any, error) { replacedFunc := "Cut" if isContains { replacedFunc = "Contains" - replace(lessZero, "!"+foundVarName) // idx < 0 -> !found - replace(greaterNegOne, foundVarName) // idx > -1 -> found + replace(negative, "!"+foundVarName) // idx < 0 -> !found + replace(nonnegative, foundVarName) // idx > -1 -> found // Replace the assignment with found, and replace the call to // Index or IndexByte with a call to Contains. @@ -244,8 +249,8 @@ func stringscut(pass *analysis.Pass) (any, error) { NewText: []byte("Contains"), }) } else { - replace(lessZero, "!"+okVarName) // idx < 0 -> !ok - replace(greaterNegOne, okVarName) // idx > -1 -> ok + replace(negative, "!"+okVarName) // idx < 0 -> !ok + replace(nonnegative, okVarName) // idx > -1 -> ok replace(beforeSlice, beforeVarName) // s[:idx] -> before replace(afterSlice, afterVarName) // s[idx+k:] -> after @@ -364,11 +369,11 @@ func indexArgValid(info *types.Info, index *typeindex.Index, expr ast.Expr, afte // one of the following four valid formats, it returns a list of occurrences for // each format. If any of the uses do not match one of the formats, return nil // for all values, since we should not offer a replacement. -// 1. lessZero - a condition involving i establishing that i is negative (e.g. i < 0, 0 > i, i == -1, -1 == i) -// 2. greaterNegOne - a condition involving i establishing that i is non-negative (e.g. i >= 0, 0 <= i, i == 0, 0 == i) +// 1. negative - a condition equivalent to i < 0 +// 2. nonnegative - a condition equivalent to i >= 0 // 3. beforeSlice - a slice of `s` that matches either s[:i], s[0:i] // 4. afterSlice - a slice of `s` that matches one of: s[i+len(substr):], s[len(substr) + i:], s[i + const], s[k + i] (where k = len(substr)) -func checkIdxUses(info *types.Info, uses iter.Seq[inspector.Cursor], s, substr ast.Expr) (lessZero, greaterNegOne, beforeSlice, afterSlice []ast.Expr) { +func checkIdxUses(info *types.Info, uses iter.Seq[inspector.Cursor], s, substr ast.Expr) (negative, nonnegative, beforeSlice, afterSlice []ast.Expr) { use := func(cur inspector.Cursor) bool { ek, _ := cur.ParentEdge() n := cur.Parent().Node() @@ -377,13 +382,13 @@ func checkIdxUses(info *types.Info, uses iter.Seq[inspector.Cursor], s, substr a check := n.(*ast.BinaryExpr) switch checkIdxComparison(info, check) { case -1: - lessZero = append(lessZero, check) + negative = append(negative, check) return true case 1: - greaterNegOne = append(greaterNegOne, check) + nonnegative = append(nonnegative, check) return true } - // Check does not establish that i < 0 or i > -1. + // Check is not equivalent to that i < 0 or i >= 0. // Might be part of an outer slice expression like s[i + k] // which requires a different check. // Check that the thing being sliced is s and that the slice @@ -421,7 +426,7 @@ func checkIdxUses(info *types.Info, uses iter.Seq[inspector.Cursor], s, substr a return nil, nil, nil, nil } } - return lessZero, greaterNegOne, beforeSlice, afterSlice + return negative, nonnegative, beforeSlice, afterSlice } // hasModifyingUses reports whether any of the uses involve potential @@ -451,52 +456,57 @@ func hasModifyingUses(info *types.Info, uses iter.Seq[inspector.Cursor], afterPo return false } -// checkIdxComparison reports whether the check establishes that i is negative -// or non-negative. It returns -1 in the first case, 1 in the second, and 0 if -// we can confirm neither condition. We assume that a check passed to -// checkIdxComparison has i as one of its operands. +// checkIdxComparison reports whether the check is equivalent to i < 0 or its negation, or neither. +// For equivalent to i >= 0, we only accept this exact BinaryExpr since +// expressions like i > 0 or i >= 1 make a stronger statement about the value of i. +// We avoid suggesting a fix in this case since it may result in an invalid +// transformation (See golang/go#76687). +// Since strings.Index returns exactly -1 if the substring is not found, we +// don't need to handle expressions like i <= -3. +// We return 0 if the expression does not match any of these options. +// We assume that a check passed to checkIdxComparison has i as one of its operands. func checkIdxComparison(info *types.Info, check *ast.BinaryExpr) int { - // Check establishes that i is negative. - // e.g.: i < 0, 0 > i, i == -1, -1 == i - if check.Op == token.LSS && (isNegativeConst(info, check.Y) || isZeroIntConst(info, check.Y)) || //i < (0 or neg) - check.Op == token.GTR && (isNegativeConst(info, check.X) || isZeroIntConst(info, check.X)) || // (0 or neg) > i - check.Op == token.LEQ && (isNegativeConst(info, check.Y)) || //i <= (neg) - check.Op == token.GEQ && (isNegativeConst(info, check.X)) || // (neg) >= i - check.Op == token.EQL && - (isNegativeConst(info, check.X) || isNegativeConst(info, check.Y)) { // i == neg; neg == i - return -1 + // Ensure that the constant (if any) is on the right. + x, op, y := check.X, check.Op, check.Y + if info.Types[x].Value != nil { + x, op, y = y, flip(op), x } - // Check establishes that i is non-negative. - // e.g.: i >= 0, 0 <= i, i == 0, 0 == i - if check.Op == token.GTR && (isNonNegativeConst(info, check.Y) || isIntLiteral(info, check.Y, -1)) || // i > (non-neg or -1) - check.Op == token.LSS && (isNonNegativeConst(info, check.X) || isIntLiteral(info, check.X, -1)) || // (non-neg or -1) < i - check.Op == token.GEQ && isNonNegativeConst(info, check.Y) || // i >= (non-neg) - check.Op == token.LEQ && isNonNegativeConst(info, check.X) || // (non-neg) <= i - check.Op == token.EQL && - (isNonNegativeConst(info, check.X) || isNonNegativeConst(info, check.Y)) { // i == non-neg; non-neg == i - return 1 + + yIsInt := func(k int64) bool { + return isIntLiteral(info, y, k) } - return 0 -} -// isNegativeConst returns true if the expr is a const int with value < zero. -func isNegativeConst(info *types.Info, expr ast.Expr) bool { - if tv, ok := info.Types[expr]; ok && tv.Value != nil && tv.Value.Kind() == constant.Int { - if v, ok := constant.Int64Val(tv.Value); ok { - return v < 0 - } + if op == token.LSS && yIsInt(0) || // i < 0 + op == token.EQL && yIsInt(-1) || // i == -1 + op == token.LEQ && yIsInt(-1) { // i <= -1 + return -1 // check <=> i is negative } - return false + + if op == token.GEQ && yIsInt(0) || // i >= 0 + op == token.NEQ && yIsInt(-1) || // i != -1 + op == token.GTR && yIsInt(-1) { // i > -1 + return +1 // check <=> i is non-negative + } + + return 0 // unknown } -// isNoneNegativeConst returns true if the expr is a const int with value >= zero. -func isNonNegativeConst(info *types.Info, expr ast.Expr) bool { - if tv, ok := info.Types[expr]; ok && tv.Value != nil && tv.Value.Kind() == constant.Int { - if v, ok := constant.Int64Val(tv.Value); ok { - return v >= 0 - } +// flip changes the comparison token as if the operands were flipped. +// It is defined only for == and the four inequalities. +func flip(op token.Token) token.Token { + switch op { + case token.EQL: + return token.EQL // (same) + case token.GEQ: + return token.LEQ + case token.GTR: + return token.LSS + case token.LEQ: + return token.GEQ + case token.LSS: + return token.GTR } - return false + return op } // isBeforeSlice reports whether the SliceExpr is of the form s[:i] or s[0:i]. diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go new file mode 100644 index 000000000..d3549e710 --- /dev/null +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go @@ -0,0 +1,210 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package modernize + +import ( + "fmt" + "go/ast" + "go/token" + "go/types" + + "golang.org/x/tools/go/analysis" + "golang.org/x/tools/go/analysis/passes/inspect" + "golang.org/x/tools/go/ast/edge" + "golang.org/x/tools/go/ast/inspector" + "golang.org/x/tools/internal/analysis/analyzerutil" + "golang.org/x/tools/internal/astutil" + "golang.org/x/tools/internal/goplsexport" + "golang.org/x/tools/internal/refactor" + "golang.org/x/tools/internal/typesinternal" + "golang.org/x/tools/internal/versions" +) + +// TODO(adonovan): also support: +// +// func String(ptr *byte, len IntegerType) string +// func StringData(str string) *byte +// func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType +// func SliceData(slice []ArbitraryType) *ArbitraryType + +var unsafeFuncsAnalyzer = &analysis.Analyzer{ + Name: "unsafefuncs", + Doc: analyzerutil.MustExtractDoc(doc, "unsafefuncs"), + Requires: []*analysis.Analyzer{inspect.Analyzer}, + Run: unsafefuncs, + URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#unsafefuncs", +} + +func init() { + // Export to gopls until this is a published modernizer. + goplsexport.UnsafeFuncsModernizer = unsafeFuncsAnalyzer +} + +func unsafefuncs(pass *analysis.Pass) (any, error) { + // Short circuit if the package doesn't use unsafe. + // (In theory one could use some imported alias of unsafe.Pointer, + // but let's ignore that.) + if !typesinternal.Imports(pass.Pkg, "unsafe") { + return nil, nil + } + + var ( + inspect = pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) + info = pass.TypesInfo + tUnsafePointer = types.Typ[types.UnsafePointer] + ) + + isInteger := func(t types.Type) bool { + basic, ok := t.Underlying().(*types.Basic) + return ok && basic.Info()&types.IsInteger != 0 + } + + // isConversion reports whether e is a conversion T(x). + // If so, it returns T and x. + isConversion := func(curExpr inspector.Cursor) (t types.Type, x inspector.Cursor) { + e := curExpr.Node().(ast.Expr) + if conv, ok := ast.Unparen(e).(*ast.CallExpr); ok && len(conv.Args) == 1 { + if tv := pass.TypesInfo.Types[conv.Fun]; tv.IsType() { + return tv.Type, curExpr.ChildAt(edge.CallExpr_Args, 0) + } + } + return + } + + // The general form is where ptr and the result are of type unsafe.Pointer: + // + // unsafe.Pointer(uintptr(ptr) + uintptr(n)) + // => + // unsafe.Add(ptr, n) + + // Search for 'unsafe.Pointer(uintptr + uintptr)' + // where the left operand was converted from a pointer. + // + // (Start from sum, not conversion, as it is not + // uncommon to use a local type alias for unsafe.Pointer.) + for curSum := range inspect.Root().Preorder((*ast.BinaryExpr)(nil)) { + if sum, ok := curSum.Node().(*ast.BinaryExpr); ok && + sum.Op == token.ADD && + types.Identical(info.TypeOf(sum.X), types.Typ[types.Uintptr]) && + astutil.IsChildOf(curSum, edge.CallExpr_Args) { + // Have: sum ≡ T(x:...uintptr... + y:...uintptr...) + curX := curSum.ChildAt(edge.BinaryExpr_X, -1) + curY := curSum.ChildAt(edge.BinaryExpr_Y, -1) + + // Is sum converted to unsafe.Pointer? + curResult := curSum.Parent() + if t, _ := isConversion(curResult); !(t != nil && types.Identical(t, tUnsafePointer)) { + continue + } + // Have: result ≡ unsafe.Pointer(x:...uintptr... + y:...uintptr...) + + // Is sum.x converted from unsafe.Pointer? + _, curPtr := isConversion(curX) + if !astutil.CursorValid(curPtr) { + continue + } + ptr := curPtr.Node().(ast.Expr) + if !types.Identical(info.TypeOf(ptr), tUnsafePointer) { + continue + } + // Have: result ≡ unsafe.Pointer(x:uintptr(...unsafe.Pointer...) + y:...uintptr...) + + file := astutil.EnclosingFile(curSum) + if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_17) { + continue // unsafe.Add not available in this file + } + + // import "unsafe" + unsafedot, edits := refactor.AddImport(info, file, "unsafe", "unsafe", "Add", sum.Pos()) + + // unsafe.Pointer(x + y) + // --------------- - + // x + y + edits = append(edits, deleteConv(curResult)...) + + // uintptr (ptr) + offset + // ----------- ---- - + // unsafe.Add(ptr, offset) + edits = append(edits, []analysis.TextEdit{ + { + Pos: sum.Pos(), + End: ptr.Pos(), + NewText: fmt.Appendf(nil, "%sAdd(", unsafedot), + }, + { + Pos: ptr.End(), + End: sum.Y.Pos(), + NewText: []byte(", "), + }, + { + Pos: sum.Y.End(), + End: sum.Y.End(), + NewText: []byte(")"), + }, + }...) + + // Variant: sum.y operand was converted from another integer type. + // Discard the conversion, as Add is generic over integers. + // + // e.g. unsafe.Pointer(uintptr(ptr) + uintptr(len(s))) + // -------- - + // unsafe.Add ( ptr, len(s)) + if t, _ := isConversion(curY); t != nil && isInteger(t) { + edits = append(edits, deleteConv(curY)...) + } + + pass.Report(analysis.Diagnostic{ + Pos: sum.Pos(), + End: sum.End(), + Message: "pointer + integer can be simplified using unsafe.Add", + SuggestedFixes: []analysis.SuggestedFix{{ + Message: "Simplify pointer addition using unsafe.Add", + TextEdits: edits, + }}, + }) + } + } + + return nil, nil +} + +// deleteConv returns edits for changing T(x) to x, respecting precedence. +func deleteConv(cur inspector.Cursor) []analysis.TextEdit { + conv := cur.Node().(*ast.CallExpr) + + usesPrec := func(n ast.Node) bool { + switch n.(type) { + case *ast.BinaryExpr, *ast.UnaryExpr: + return true + } + return false + } + + // Be careful not to change precedence of e.g. T(1+2) * 3. + // TODO(adonovan): refine this. + if usesPrec(cur.Parent().Node()) && usesPrec(conv.Args[0]) { + // T(x+y) * z + // - + // (x+y) * z + return []analysis.TextEdit{{ + Pos: conv.Fun.Pos(), + End: conv.Fun.End(), + }} + } + + // T(x) + // -- - + // x + return []analysis.TextEdit{ + { + Pos: conv.Pos(), + End: conv.Args[0].Pos(), + }, + { + Pos: conv.Args[0].End(), + End: conv.End(), + }, + } +} diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/waitgroup.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/waitgroup.go index 19564c69b..abf5885ce 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/waitgroup.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/waitgroup.go @@ -137,8 +137,10 @@ func waitgroup(pass *analysis.Pass) (any, error) { } pass.Report(analysis.Diagnostic{ - Pos: addCall.Pos(), - End: goStmt.End(), + // go func() { + // ~~~~~~~~~ + Pos: goStmt.Pos(), + End: lit.Type.End(), Message: "Goroutine creation can be simplified using WaitGroup.Go", SuggestedFixes: []analysis.SuggestedFix{{ Message: "Simplify by using WaitGroup.Go", diff --git a/vendor/golang.org/x/tools/go/analysis/passes/printf/doc.go b/vendor/golang.org/x/tools/go/analysis/passes/printf/doc.go index f04e44143..a09bfd1c6 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/printf/doc.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/printf/doc.go @@ -92,6 +92,36 @@ // } // logf("%s", 123) // logf format %s has arg 123 of wrong type int // +// Interface methods may also be analyzed as printf wrappers, if +// within the interface's package there is an assignment from a +// implementation type whose corresponding method is a printf wrapper. +// +// For example, the var declaration below causes a *myLoggerImpl value +// to be assigned to a Logger variable: +// +// type Logger interface { +// Logf(format string, args ...any) +// } +// +// type myLoggerImpl struct{ ... } +// +// var _ Logger = (*myLoggerImpl)(nil) +// +// func (*myLoggerImpl) Logf(format string, args ...any) { +// println(fmt.Sprintf(format, args...)) +// } +// +// Since myLoggerImpl's Logf method is a printf wrapper, this +// establishes that Logger.Logf is a printf wrapper too, causing +// dynamic calls through the interface to be checked: +// +// func f(log Logger) { +// log.Logf("%s", 123) // Logger.Logf format %s has arg 123 of wrong type int +// } +// +// This feature applies only to interface methods declared in files +// using at least Go 1.26. +// // # Specifying printf wrappers by flag // // The -funcs flag specifies a comma-separated list of names of diff --git a/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go b/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go index 337bc6af9..1afb07c45 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go @@ -27,6 +27,7 @@ import ( "golang.org/x/tools/internal/typeparams" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/versions" + "golang.org/x/tools/refactor/satisfy" ) func init() { @@ -65,7 +66,7 @@ func (kind Kind) String() string { case KindErrorf: return "errorf" } - return "" + return "(none)" } // Result is the printf analyzer's result type. Clients may query the result @@ -136,9 +137,10 @@ type wrapper struct { callers []printfCaller } +// printfCaller is a candidate print{,f} forwarding call from candidate wrapper w. type printfCaller struct { w *wrapper - call *ast.CallExpr + call *ast.CallExpr // forwarding call (nil for implicit interface method -> impl calls) } // formatArgsParams returns the "format string" and "args ...any" @@ -183,21 +185,42 @@ func findPrintLike(pass *analysis.Pass, res *Result) { wrappers []*wrapper byObj = make(map[types.Object]*wrapper) ) - for cur := range inspect.Root().Preorder((*ast.FuncDecl)(nil), (*ast.FuncLit)(nil)) { - var ( - curBody inspector.Cursor // for *ast.BlockStmt - sig *types.Signature - obj types.Object - ) + for cur := range inspect.Root().Preorder((*ast.FuncDecl)(nil), (*ast.FuncLit)(nil), (*ast.InterfaceType)(nil)) { + + // addWrapper records that a func (or var representing + // a FuncLit) is a potential print{,f} wrapper. + // curBody is its *ast.BlockStmt, if any. + addWrapper := func(obj types.Object, sig *types.Signature, curBody inspector.Cursor) *wrapper { + format, args := formatArgsParams(sig) + if args != nil { + // obj (the symbol for a function/method, or variable + // assigned to an anonymous function) is a potential + // print or printf wrapper. + // + // Later processing will analyze the graph of potential + // wrappers and their function bodies to pick out the + // ones that are true wrappers. + w := &wrapper{ + obj: obj, + curBody: curBody, + format: format, // non-nil => printf + args: args, + } + byObj[w.obj] = w + wrappers = append(wrappers, w) + return w + } + return nil + } + switch f := cur.Node().(type) { case *ast.FuncDecl: // named function or method: // // func wrapf(format string, args ...any) {...} if f.Body != nil { - curBody = cur.ChildAt(edge.FuncDecl_Body, -1) - obj = info.Defs[f.Name] - sig = obj.Type().(*types.Signature) + fn := info.Defs[f.Name].(*types.Func) + addWrapper(fn, fn.Signature(), cur.ChildAt(edge.FuncDecl_Body, -1)) } case *ast.FuncLit: @@ -210,8 +233,6 @@ func findPrintLike(pass *analysis.Pass, res *Result) { // The LHS may also be a struct field x.wrapf or // an imported var pkg.Wrapf. // - sig = info.TypeOf(f).(*types.Signature) - curBody = cur.ChildAt(edge.FuncLit_Body, -1) var lhs ast.Expr switch ek, idx := cur.ParentEdge(); ek { case edge.ValueSpec_Values: @@ -222,49 +243,89 @@ func findPrintLike(pass *analysis.Pass, res *Result) { lhs = curLhs.Node().(ast.Expr) } + var v *types.Var switch lhs := lhs.(type) { case *ast.Ident: // variable: wrapf = func(...) - obj = info.ObjectOf(lhs).(*types.Var) + v, _ = info.ObjectOf(lhs).(*types.Var) case *ast.SelectorExpr: if sel, ok := info.Selections[lhs]; ok { // struct field: x.wrapf = func(...) - obj = sel.Obj().(*types.Var) + v = sel.Obj().(*types.Var) } else { // imported var: pkg.Wrapf = func(...) - obj = info.Uses[lhs.Sel].(*types.Var) + v = info.Uses[lhs.Sel].(*types.Var) } } - } - if obj != nil { - format, args := formatArgsParams(sig) - if args != nil { - // obj (the symbol for a function/method, or variable - // assigned to an anonymous function) is a potential - // print or printf wrapper. - // - // Later processing will analyze the graph of potential - // wrappers and their function bodies to pick out the - // ones that are true wrappers. - w := &wrapper{ - obj: obj, - curBody: curBody, - format: format, // non-nil => printf - args: args, + if v != nil { + sig := info.TypeOf(f).(*types.Signature) + curBody := cur.ChildAt(edge.FuncLit_Body, -1) + addWrapper(v, sig, curBody) + } + + case *ast.InterfaceType: + // Induction through interface methods is gated as + // if it were a go1.26 language feature, to avoid + // surprises when go test's vet suite gets stricter. + if analyzerutil.FileUsesGoVersion(pass, astutil.EnclosingFile(cur), versions.Go1_26) { + for imeth := range info.TypeOf(f).(*types.Interface).Methods() { + addWrapper(imeth, imeth.Signature(), inspector.Cursor{}) } - byObj[w.obj] = w - wrappers = append(wrappers, w) } } } + // impls maps abstract methods to implementations. + // + // Interface methods are modelled as if they have a body + // that calls each implementing method. + // + // In the code below, impls maps Logger.Logf to + // [myLogger.Logf], and if myLogger.Logf is discovered to be + // printf-like, then so will be Logger.Logf. + // + // type Logger interface { + // Logf(format string, args ...any) + // } + // type myLogger struct{ ... } + // func (myLogger) Logf(format string, args ...any) {...} + // var _ Logger = myLogger{} + impls := methodImplementations(pass) + + // doCall records a call from one wrapper to another. + doCall := func(w *wrapper, callee types.Object, call *ast.CallExpr) { + // Call from one wrapper candidate to another? + // Record the edge so that if callee is found to be + // a true wrapper, w will be too. + if w2, ok := byObj[callee]; ok { + w2.callers = append(w2.callers, printfCaller{w, call}) + } + + // Is the candidate a true wrapper, because it calls + // a known print{,f}-like function from the allowlist + // or an imported fact, or another wrapper found + // to be a true wrapper? + // If so, convert all w's callers to kind. + kind := callKind(pass, callee, res) + if kind != KindNone { + propagate(pass, w, call, kind, res) + } + } + // Pass 2: scan the body of each wrapper function // for calls to other printf-like functions. - // - // Also, reject tricky cases where the parameters - // are potentially mutated by AssignStmt or UnaryExpr. - // TODO: Relax these checks; issue 26555. for _, w := range wrappers { + + // An interface method has no body, but acts + // like an implicit call to each implementing method. + if w.curBody.Inspector() == nil { + for impl := range impls[w.obj.(*types.Func)] { + doCall(w, impl, nil) + } + continue // (no body) + } + + // Process all calls in the wrapper function's body. scan: for cur := range w.curBody.Preorder( (*ast.AssignStmt)(nil), @@ -272,6 +333,12 @@ func findPrintLike(pass *analysis.Pass, res *Result) { (*ast.CallExpr)(nil), ) { switch n := cur.Node().(type) { + + // Reject tricky cases where the parameters + // are potentially mutated by AssignStmt or UnaryExpr. + // (This logic checks for mutation only before the call.) + // TODO: Relax these checks; issue 26555. + case *ast.AssignStmt: // If the wrapper updates format or args // it is not a simple wrapper. @@ -294,23 +361,7 @@ func findPrintLike(pass *analysis.Pass, res *Result) { case *ast.CallExpr: if len(n.Args) > 0 && match(info, n.Args[len(n.Args)-1], w.args) { if callee := typeutil.Callee(pass.TypesInfo, n); callee != nil { - - // Call from one wrapper candidate to another? - // Record the edge so that if callee is found to be - // a true wrapper, w will be too. - if w2, ok := byObj[callee]; ok { - w2.callers = append(w2.callers, printfCaller{w, n}) - } - - // Is the candidate a true wrapper, because it calls - // a known print{,f}-like function from the allowlist - // or an imported fact, or another wrapper found - // to be a true wrapper? - // If so, convert all w's callers to kind. - kind := callKind(pass, callee, res) - if kind != KindNone { - checkForward(pass, w, n, kind, res) - } + doCall(w, callee, n) } } } @@ -318,40 +369,60 @@ func findPrintLike(pass *analysis.Pass, res *Result) { } } +// methodImplementations returns the mapping from interface methods +// declared in this package to their corresponding implementing +// methods (which may also be interface methods), according to the set +// of assignments to interface types that appear within this package. +func methodImplementations(pass *analysis.Pass) map[*types.Func]map[*types.Func]bool { + impls := make(map[*types.Func]map[*types.Func]bool) + + // To find interface/implementation relations, + // we use the 'satisfy' pass, but proposal #70638 + // provides a better way. + // + // This pass over the syntax could be factored out as + // a separate analysis pass if it is needed by other + // analyzers. + var f satisfy.Finder + f.Find(pass.TypesInfo, pass.Files) + for assign := range f.Result { + // Have: LHS = RHS, where LHS is an interface type. + for imeth := range assign.LHS.Underlying().(*types.Interface).Methods() { + // Limit to interface methods of current package. + if imeth.Pkg() != pass.Pkg { + continue + } + + if _, args := formatArgsParams(imeth.Signature()); args == nil { + continue // not print{,f}-like + } + + // Add implementing method to the set. + impl, _, _ := types.LookupFieldOrMethod(assign.RHS, false, pass.Pkg, imeth.Name()) // can't fail + set, ok := impls[imeth] + if !ok { + set = make(map[*types.Func]bool) + impls[imeth] = set + } + set[impl.(*types.Func)] = true + } + } + return impls +} + func match(info *types.Info, arg ast.Expr, param *types.Var) bool { id, ok := arg.(*ast.Ident) return ok && info.ObjectOf(id) == param } -// checkForward checks that a forwarding wrapper is forwarding correctly. -// It diagnoses writing fmt.Printf(format, args) instead of fmt.Printf(format, args...). -func checkForward(pass *analysis.Pass, w *wrapper, call *ast.CallExpr, kind Kind, res *Result) { - matched := kind == KindPrint || - kind != KindNone && len(call.Args) >= 2 && match(pass.TypesInfo, call.Args[len(call.Args)-2], w.format) - if !matched { - return - } - - if !call.Ellipsis.IsValid() { - typ, ok := pass.TypesInfo.Types[call.Fun].Type.(*types.Signature) - if !ok { - return - } - if len(call.Args) > typ.Params().Len() { - // If we're passing more arguments than what the - // print/printf function can take, adding an ellipsis - // would break the program. For example: - // - // func foo(arg1 string, arg2 ...interface{}) { - // fmt.Printf("%s %v", arg1, arg2) - // } - return - } - desc := "printf" - if kind == KindPrint { - desc = "print" - } - pass.ReportRangef(call, "missing ... in args forwarded to %s-like function", desc) +// propagate propagates changes in wrapper (non-None) kind information backwards +// through through the wrapper.callers graph of well-formed forwarding calls. +func propagate(pass *analysis.Pass, w *wrapper, call *ast.CallExpr, kind Kind, res *Result) { + // Check correct call forwarding. + // + // Interface methods (call==nil) forward + // correctly by construction. + if call != nil && !checkForward(pass, w, call, kind) { return } @@ -372,11 +443,50 @@ func checkForward(pass *analysis.Pass, w *wrapper, call *ast.CallExpr, kind Kind // Propagate kind back to known callers. for _, caller := range w.callers { - checkForward(pass, caller.w, caller.call, kind, res) + propagate(pass, caller.w, caller.call, kind, res) } } } +// checkForward checks whether a call from wrapper w is a well-formed +// forwarding call of the specified (non-None) kind. +// +// If not, it reports a diagnostic that the user wrote +// fmt.Printf(format, args) instead of fmt.Printf(format, args...). +func checkForward(pass *analysis.Pass, w *wrapper, call *ast.CallExpr, kind Kind) bool { + // Printf/Errorf calls must delegate the format string. + switch kind { + case KindPrintf, KindErrorf: + if len(call.Args) < 2 || !match(pass.TypesInfo, call.Args[len(call.Args)-2], w.format) { + return false + } + } + + // The args... delegation must be variadic. + // (That args is actually delegated was + // established before the root call to doCall.) + if !call.Ellipsis.IsValid() { + typ, ok := pass.TypesInfo.Types[call.Fun].Type.(*types.Signature) + if !ok { + return false + } + if len(call.Args) > typ.Params().Len() { + // If we're passing more arguments than what the + // print/printf function can take, adding an ellipsis + // would break the program. For example: + // + // func foo(arg1 string, arg2 ...interface{}) { + // fmt.Printf("%s %v", arg1, arg2) + // } + return false + } + pass.ReportRangef(call, "missing ... in args forwarded to %s-like function", kind) + return false + } + + return true +} + func origin(obj types.Object) types.Object { switch obj := obj.(type) { case *types.Func: @@ -444,16 +554,14 @@ var isPrint = stringSet{ "(*testing.common).Logf": true, "(*testing.common).Skip": true, "(*testing.common).Skipf": true, - // *testing.T and B are detected by induction, but testing.TB is - // an interface and the inference can't follow dynamic calls. - "(testing.TB).Error": true, - "(testing.TB).Errorf": true, - "(testing.TB).Fatal": true, - "(testing.TB).Fatalf": true, - "(testing.TB).Log": true, - "(testing.TB).Logf": true, - "(testing.TB).Skip": true, - "(testing.TB).Skipf": true, + "(testing.TB).Error": true, + "(testing.TB).Errorf": true, + "(testing.TB).Fatal": true, + "(testing.TB).Fatalf": true, + "(testing.TB).Log": true, + "(testing.TB).Logf": true, + "(testing.TB).Skip": true, + "(testing.TB).Skipf": true, } // formatStringIndex returns the index of the format string (the last @@ -612,7 +720,7 @@ func checkPrintf(pass *analysis.Pass, fileVersion string, kind Kind, call *ast.C // breaking existing tests and CI scripts. if idx == len(call.Args)-1 && fileVersion != "" && // fail open - versions.AtLeast(fileVersion, "go1.24") { + versions.AtLeast(fileVersion, versions.Go1_24) { pass.Report(analysis.Diagnostic{ Pos: formatArg.Pos(), @@ -662,7 +770,7 @@ func checkPrintf(pass *analysis.Pass, fileVersion string, kind Kind, call *ast.C anyIndex = true } rng := opRange(formatArg, op) - if !okPrintfArg(pass, call, rng, &maxArgIndex, firstArg, name, op) { + if !okPrintfArg(pass, fileVersion, call, rng, &maxArgIndex, firstArg, name, op) { // One error per format is enough. return } @@ -707,6 +815,7 @@ type printfArgType int const ( argBool printfArgType = 1 << iota + argByte argInt argRune argString @@ -751,7 +860,7 @@ var printVerbs = []printVerb{ {'o', sharpNumFlag, argInt | argPointer}, {'O', sharpNumFlag, argInt | argPointer}, {'p', "-#", argPointer}, - {'q', " -+.0#", argRune | argInt | argString}, + {'q', " -+.0#", argRune | argInt | argString}, // note: when analyzing go1.26 code, argInt => argByte {'s', " -+.0", argString}, {'t', "-", argBool}, {'T', "-", anyType}, @@ -765,7 +874,7 @@ var printVerbs = []printVerb{ // okPrintfArg compares the operation to the arguments actually present, // reporting any discrepancies it can discern, maxArgIndex was the index of the highest used index. // If the final argument is ellipsissed, there's little it can do for that. -func okPrintfArg(pass *analysis.Pass, call *ast.CallExpr, rng analysis.Range, maxArgIndex *int, firstArg int, name string, operation *fmtstr.Operation) (ok bool) { +func okPrintfArg(pass *analysis.Pass, fileVersion string, call *ast.CallExpr, rng analysis.Range, maxArgIndex *int, firstArg int, name string, operation *fmtstr.Operation) (ok bool) { verb := operation.Verb.Verb var v printVerb found := false @@ -777,6 +886,13 @@ func okPrintfArg(pass *analysis.Pass, call *ast.CallExpr, rng analysis.Range, ma } } + // When analyzing go1.26 code, rune and byte are the only %q integers (#72850). + if verb == 'q' && + fileVersion != "" && // fail open + versions.AtLeast(fileVersion, versions.Go1_26) { + v.typ = argRune | argByte | argString + } + // Could verb's arg implement fmt.Formatter? // Skip check for the %w verb, which requires an error. formatter := false diff --git a/vendor/golang.org/x/tools/go/analysis/passes/printf/types.go b/vendor/golang.org/x/tools/go/analysis/passes/printf/types.go index 8aa3962d0..2cc5c23f1 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/printf/types.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/printf/types.go @@ -227,14 +227,20 @@ func (m *argMatcher) match(typ types.Type, topLevel bool) bool { types.Bool: return m.t&argBool != 0 + case types.Byte: + return m.t&(argInt|argByte) != 0 + + case types.Rune, types.UntypedRune: + return m.t&(argInt|argRune) != 0 + case types.UntypedInt, types.Int, types.Int8, types.Int16, - types.Int32, + // see case Rune for int32 types.Int64, types.Uint, - types.Uint8, + // see case Byte for uint8 types.Uint16, types.Uint32, types.Uint64, @@ -258,9 +264,6 @@ func (m *argMatcher) match(typ types.Type, topLevel bool) bool { case types.UnsafePointer: return m.t&(argPointer|argInt) != 0 - case types.UntypedRune: - return m.t&(argInt|argRune) != 0 - case types.UntypedNil: return false diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go index 5bacc0fa4..adb471101 100644 --- a/vendor/golang.org/x/tools/go/ast/astutil/imports.go +++ b/vendor/golang.org/x/tools/go/ast/astutil/imports.go @@ -9,6 +9,7 @@ import ( "fmt" "go/ast" "go/token" + "reflect" "slices" "strconv" "strings" @@ -149,7 +150,7 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string) (added if newImport.Name != nil { newImport.Name.NamePos = pos } - newImport.Path.ValuePos = pos + updateBasicLitPos(newImport.Path, pos) newImport.EndPos = pos // Clean up parens. impDecl contains at least one spec. @@ -184,7 +185,7 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string) (added first.Lparen = first.Pos() // Move the imports of the other import declaration to the first one. for _, spec := range gen.Specs { - spec.(*ast.ImportSpec).Path.ValuePos = first.Pos() + updateBasicLitPos(spec.(*ast.ImportSpec).Path, first.Pos()) first.Specs = append(first.Specs, spec) } f.Decls = slices.Delete(f.Decls, i, i+1) @@ -470,3 +471,17 @@ func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec { return groups } + +// updateBasicLitPos updates lit.Pos, +// ensuring that lit.End (if set) is displaced by the same amount. +// (See https://go.dev/issue/76395.) +func updateBasicLitPos(lit *ast.BasicLit, pos token.Pos) { + len := lit.End() - lit.Pos() + lit.ValuePos = pos + // TODO(adonovan): after go1.26, simplify to: + // lit.ValueEnd = pos + len + v := reflect.ValueOf(lit).Elem().FieldByName("ValueEnd") + if v.IsValid() && v.Int() != 0 { + v.SetInt(int64(pos + len)) + } +} diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go index 060ab08ef..ff607389d 100644 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ b/vendor/golang.org/x/tools/go/packages/packages.go @@ -1027,11 +1027,15 @@ func (ld *loader) refine(response *DriverResponse) ([]*Package, error) { // Precondition: ld.Mode&(NeedSyntax|NeedTypes|NeedTypesInfo) != 0. func (ld *loader) loadPackage(lpkg *loaderPackage) { if lpkg.PkgPath == "unsafe" { - // Fill in the blanks to avoid surprises. + // To avoid surprises, fill in the blanks consistent + // with other packages. (For example, some analyzers + // assert that each needed types.Info map is non-nil + // even when there is no syntax that would cause them + // to consult the map.) lpkg.Types = types.Unsafe lpkg.Fset = ld.Fset lpkg.Syntax = []*ast.File{} - lpkg.TypesInfo = new(types.Info) + lpkg.TypesInfo = ld.newTypesInfo() lpkg.TypesSizes = ld.sizes return } @@ -1180,20 +1184,7 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { return } - // Populate TypesInfo only if needed, as it - // causes the type checker to work much harder. - if ld.Config.Mode&NeedTypesInfo != 0 { - lpkg.TypesInfo = &types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Instances: make(map[*ast.Ident]types.Instance), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - FileVersions: make(map[*ast.File]string), - } - } + lpkg.TypesInfo = ld.newTypesInfo() lpkg.TypesSizes = ld.sizes importer := importerFunc(func(path string) (*types.Package, error) { @@ -1307,6 +1298,24 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { lpkg.IllTyped = illTyped } +func (ld *loader) newTypesInfo() *types.Info { + // Populate TypesInfo only if needed, as it + // causes the type checker to work much harder. + if ld.Config.Mode&NeedTypesInfo == 0 { + return nil + } + return &types.Info{ + Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), + Uses: make(map[*ast.Ident]types.Object), + Implicits: make(map[ast.Node]types.Object), + Instances: make(map[*ast.Ident]types.Instance), + Scopes: make(map[ast.Node]*types.Scope), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + FileVersions: make(map[*ast.File]string), + } +} + // An importFunc is an implementation of the single-method // types.Importer interface based on a function value. type importerFunc func(path string) (*types.Package, error) diff --git a/vendor/golang.org/x/tools/go/ssa/create.go b/vendor/golang.org/x/tools/go/ssa/create.go index a8778788a..bbf88567c 100644 --- a/vendor/golang.org/x/tools/go/ssa/create.go +++ b/vendor/golang.org/x/tools/go/ssa/create.go @@ -314,7 +314,7 @@ func (prog *Program) ImportedPackage(path string) *Package { return prog.imported[path] } -// setNoReturns sets the predicate used by the SSA builder to decide +// setNoReturn sets the predicate used by the SSA builder to decide // whether a call to the specified named function cannot return, // allowing the builder to prune control-flow edges following the // call, thus improving the precision of downstream analysis. diff --git a/vendor/golang.org/x/tools/go/types/typeutil/callee.go b/vendor/golang.org/x/tools/go/types/typeutil/callee.go index 5f10f56cb..3d24a8c63 100644 --- a/vendor/golang.org/x/tools/go/types/typeutil/callee.go +++ b/vendor/golang.org/x/tools/go/types/typeutil/callee.go @@ -12,6 +12,7 @@ import ( // Callee returns the named target of a function call, if any: // a function, method, builtin, or variable. +// It returns nil for a T(x) conversion. // // Functions and methods may potentially have type parameters. // diff --git a/vendor/golang.org/x/tools/internal/astutil/util.go b/vendor/golang.org/x/tools/internal/astutil/util.go index 7a02fca21..6986a5187 100644 --- a/vendor/golang.org/x/tools/internal/astutil/util.go +++ b/vendor/golang.org/x/tools/internal/astutil/util.go @@ -64,7 +64,7 @@ func NodeContains(n ast.Node, rng Range) bool { return NodeRange(n).Contains(rng) } -// NodeContainPos reports whether the Pos/End range of node n encloses +// NodeContainsPos reports whether the Pos/End range of node n encloses // the given pos. // // Like [NodeRange], it treats the range of an [ast.File] as the diff --git a/vendor/golang.org/x/tools/internal/event/core/export.go b/vendor/golang.org/x/tools/internal/event/core/export.go index 05f3a9a57..16ae6bb02 100644 --- a/vendor/golang.org/x/tools/internal/event/core/export.go +++ b/vendor/golang.org/x/tools/internal/event/core/export.go @@ -8,7 +8,6 @@ import ( "context" "sync/atomic" "time" - "unsafe" "golang.org/x/tools/internal/event/label" ) @@ -17,23 +16,21 @@ import ( // It may return a modified context and event. type Exporter func(context.Context, Event, label.Map) context.Context -var ( - exporter unsafe.Pointer -) +var exporter atomic.Pointer[Exporter] // SetExporter sets the global exporter function that handles all events. // The exporter is called synchronously from the event call site, so it should // return quickly so as not to hold up user code. func SetExporter(e Exporter) { - p := unsafe.Pointer(&e) if e == nil { // &e is always valid, and so p is always valid, but for the early abort // of ProcessEvent to be efficient it needs to make the nil check on the // pointer without having to dereference it, so we make the nil function // also a nil pointer - p = nil + exporter.Store(nil) + } else { + exporter.Store(&e) } - atomic.StorePointer(&exporter, p) } // deliver is called to deliver an event to the supplied exporter. @@ -48,7 +45,7 @@ func deliver(ctx context.Context, exporter Exporter, ev Event) context.Context { // Export is called to deliver an event to the global exporter if set. func Export(ctx context.Context, ev Event) context.Context { // get the global exporter and abort early if there is not one - exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + exporterPtr := exporter.Load() if exporterPtr == nil { return ctx } @@ -61,7 +58,7 @@ func Export(ctx context.Context, ev Event) context.Context { // It will fill in the time. func ExportPair(ctx context.Context, begin, end Event) (context.Context, func()) { // get the global exporter and abort early if there is not one - exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + exporterPtr := exporter.Load() if exporterPtr == nil { return ctx, func() {} } diff --git a/vendor/golang.org/x/tools/internal/event/label/label.go b/vendor/golang.org/x/tools/internal/event/label/label.go index 92a391057..c37584af9 100644 --- a/vendor/golang.org/x/tools/internal/event/label/label.go +++ b/vendor/golang.org/x/tools/internal/event/label/label.go @@ -7,7 +7,6 @@ package label import ( "fmt" "io" - "reflect" "slices" "unsafe" ) @@ -103,11 +102,10 @@ type stringptr unsafe.Pointer // This method is for implementing new key types, label creation should // normally be done with the Of method of the key. func OfString(k Key, v string) Label { - hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) return Label{ key: k, - packed: uint64(hdr.Len), - untyped: stringptr(hdr.Data), + packed: uint64(len(v)), + untyped: stringptr(unsafe.StringData(v)), } } @@ -116,11 +114,7 @@ func OfString(k Key, v string) Label { // This method is for implementing new key types, for type safety normal // access should be done with the From method of the key. func (t Label) UnpackString() string { - var v string - hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) - hdr.Data = uintptr(t.untyped.(stringptr)) - hdr.Len = int(t.packed) - return v + return unsafe.String((*byte)(t.untyped.(stringptr)), int(t.packed)) } // Valid returns true if the Label is a valid one (it has a key). diff --git a/vendor/golang.org/x/tools/internal/goplsexport/export.go b/vendor/golang.org/x/tools/internal/goplsexport/export.go index bca4d8a0b..b0572f596 100644 --- a/vendor/golang.org/x/tools/internal/goplsexport/export.go +++ b/vendor/golang.org/x/tools/internal/goplsexport/export.go @@ -13,4 +13,5 @@ var ( StdIteratorsModernizer *analysis.Analyzer // = modernize.stditeratorsAnalyzer PlusBuildModernizer *analysis.Analyzer // = modernize.plusbuildAnalyzer StringsCutModernizer *analysis.Analyzer // = modernize.stringscutAnalyzer + UnsafeFuncsModernizer *analysis.Analyzer // = modernize.unsafeFuncsAnalyzer ) diff --git a/vendor/golang.org/x/tools/internal/imports/sortimports.go b/vendor/golang.org/x/tools/internal/imports/sortimports.go index 67c17bc43..f390be90f 100644 --- a/vendor/golang.org/x/tools/internal/imports/sortimports.go +++ b/vendor/golang.org/x/tools/internal/imports/sortimports.go @@ -11,6 +11,7 @@ import ( "go/ast" "go/token" "log" + "reflect" "slices" "sort" "strconv" @@ -65,7 +66,7 @@ func sortImports(localPrefix string, tokFile *token.File, f *ast.File) { } // mergeImports merges all the import declarations into the first one. -// Taken from golang.org/x/tools/ast/astutil. +// Taken from golang.org/x/tools/go/ast/astutil. // This does not adjust line numbers properly func mergeImports(f *ast.File) { if len(f.Decls) <= 1 { @@ -89,7 +90,7 @@ func mergeImports(f *ast.File) { first.Lparen = first.Pos() // Move the imports of the other import declaration to the first one. for _, spec := range gen.Specs { - spec.(*ast.ImportSpec).Path.ValuePos = first.Pos() + updateBasicLitPos(spec.(*ast.ImportSpec).Path, first.Pos()) first.Specs = append(first.Specs, spec) } f.Decls = slices.Delete(f.Decls, i, i+1) @@ -98,7 +99,7 @@ func mergeImports(f *ast.File) { } // declImports reports whether gen contains an import of path. -// Taken from golang.org/x/tools/ast/astutil. +// Taken from golang.org/x/tools/go/ast/astutil. func declImports(gen *ast.GenDecl, path string) bool { if gen.Tok != token.IMPORT { return false @@ -221,7 +222,7 @@ func sortSpecs(localPrefix string, tokFile *token.File, f *ast.File, specs []ast if s.Name != nil { s.Name.NamePos = pos[i].Start } - s.Path.ValuePos = pos[i].Start + updateBasicLitPos(s.Path, pos[i].Start) s.EndPos = pos[i].End nextSpecPos := pos[i].End @@ -296,3 +297,17 @@ type byCommentPos []*ast.CommentGroup func (x byCommentPos) Len() int { return len(x) } func (x byCommentPos) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x byCommentPos) Less(i, j int) bool { return x[i].Pos() < x[j].Pos() } + +// updateBasicLitPos updates lit.Pos, +// ensuring that lit.End (if set) is displaced by the same amount. +// (See https://go.dev/issue/76395.) +func updateBasicLitPos(lit *ast.BasicLit, pos token.Pos) { + len := lit.End() - lit.Pos() + lit.ValuePos = pos + // TODO(adonovan): after go1.26, simplify to: + // lit.ValueEnd = pos + len + v := reflect.ValueOf(lit).Elem().FieldByName("ValueEnd") + if v.IsValid() && v.Int() != 0 { + v.SetInt(int64(pos + len)) + } +} diff --git a/vendor/golang.org/x/tools/internal/modindex/lookup.go b/vendor/golang.org/x/tools/internal/modindex/lookup.go index 0c011a99b..83bd49cd4 100644 --- a/vendor/golang.org/x/tools/internal/modindex/lookup.go +++ b/vendor/golang.org/x/tools/internal/modindex/lookup.go @@ -8,6 +8,8 @@ import ( "slices" "strconv" "strings" + + "golang.org/x/mod/module" ) type Candidate struct { @@ -104,11 +106,15 @@ func (ix *Index) Lookup(pkgName, name string, prefix bool) []Candidate { if len(flds) < 2 { continue // should never happen } + impPath, err := module.UnescapePath(e.ImportPath) + if err != nil { + continue + } px := Candidate{ PkgName: pkgName, Name: flds[0], Dir: string(e.Dir), - ImportPath: e.ImportPath, + ImportPath: impPath, Type: asLexType(flds[1][0]), Deprecated: len(flds[1]) > 1 && flds[1][1] == 'D', } diff --git a/vendor/golang.org/x/tools/internal/moreiters/iters.go b/vendor/golang.org/x/tools/internal/moreiters/iters.go index 69c76ccb9..9e4aaf948 100644 --- a/vendor/golang.org/x/tools/internal/moreiters/iters.go +++ b/vendor/golang.org/x/tools/internal/moreiters/iters.go @@ -45,3 +45,11 @@ func Any[T any](seq iter.Seq[T], pred func(T) bool) bool { } return false } + +// Len returns the number of elements in the sequence (by iterating). +func Len[T any](seq iter.Seq[T]) (n int) { + for range seq { + n++ + } + return +} diff --git a/vendor/golang.org/x/tools/internal/refactor/delete.go b/vendor/golang.org/x/tools/internal/refactor/delete.go index 9b96b1dbf..54d0b5f03 100644 --- a/vendor/golang.org/x/tools/internal/refactor/delete.go +++ b/vendor/golang.org/x/tools/internal/refactor/delete.go @@ -13,7 +13,6 @@ import ( "go/types" "slices" - "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/ast/edge" "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/internal/astutil" @@ -32,7 +31,7 @@ import ( // // If it cannot make the necessary edits, such as for a function // parameter or result, it returns nil. -func DeleteVar(tokFile *token.File, info *types.Info, curId inspector.Cursor) []analysis.TextEdit { +func DeleteVar(tokFile *token.File, info *types.Info, curId inspector.Cursor) []Edit { switch ek, _ := curId.ParentEdge(); ek { case edge.ValueSpec_Names: return deleteVarFromValueSpec(tokFile, info, curId) @@ -52,7 +51,7 @@ func DeleteVar(tokFile *token.File, info *types.Info, curId inspector.Cursor) [] // Precondition: curId is Ident beneath ValueSpec.Names beneath GenDecl. // // See also [deleteVarFromAssignStmt], which has parallel structure. -func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent inspector.Cursor) []analysis.TextEdit { +func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent inspector.Cursor) []Edit { var ( id = curIdent.Node().(*ast.Ident) curSpec = curIdent.Parent() @@ -95,7 +94,7 @@ func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent insp pos = spec.Names[index].Pos() end = spec.Names[index+1].Pos() } - return []analysis.TextEdit{{ + return []Edit{{ Pos: pos, End: end, }} @@ -111,7 +110,7 @@ func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent insp // // var _, lhs1 = rhs0, rhs1 // ------ ------ - return []analysis.TextEdit{ + return []Edit{ { Pos: spec.Names[index-1].End(), End: spec.Names[index].End(), @@ -126,7 +125,7 @@ func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent insp // // var lhs0, _ = rhs0, rhs1 // ------ ------ - return []analysis.TextEdit{ + return []Edit{ { Pos: spec.Names[index].Pos(), End: spec.Names[index+1].Pos(), @@ -141,7 +140,7 @@ func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent insp // We cannot delete the RHS. // Blank out the LHS. - return []analysis.TextEdit{{ + return []Edit{{ Pos: id.Pos(), End: id.End(), NewText: []byte("_"), @@ -151,7 +150,7 @@ func deleteVarFromValueSpec(tokFile *token.File, info *types.Info, curIdent insp // Precondition: curId is Ident beneath AssignStmt.Lhs. // // See also [deleteVarFromValueSpec], which has parallel structure. -func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent inspector.Cursor) []analysis.TextEdit { +func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent inspector.Cursor) []Edit { var ( id = curIdent.Node().(*ast.Ident) curStmt = curIdent.Parent() @@ -192,7 +191,7 @@ func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent ins // // _, lhs1 := rhs0, rhs1 // ------ ------ - return []analysis.TextEdit{ + return []Edit{ { Pos: assign.Lhs[index-1].End(), End: assign.Lhs[index].End(), @@ -207,7 +206,7 @@ func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent ins // // lhs0, _ := rhs0, rhs1 // ------ ------ - return []analysis.TextEdit{ + return []Edit{ { Pos: assign.Lhs[index].Pos(), End: assign.Lhs[index+1].Pos(), @@ -222,7 +221,7 @@ func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent ins // We cannot delete the RHS. // Blank out the LHS. - edits := []analysis.TextEdit{{ + edits := []Edit{{ Pos: id.Pos(), End: id.End(), NewText: []byte("_"), @@ -233,7 +232,7 @@ func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent ins // assignment to avoid a "no new variables on left // side of :=" error. if !declaresOtherNames { - edits = append(edits, analysis.TextEdit{ + edits = append(edits, Edit{ Pos: assign.TokPos, End: assign.TokPos + token.Pos(len(":=")), NewText: []byte("="), @@ -246,7 +245,7 @@ func deleteVarFromAssignStmt(tokFile *token.File, info *types.Info, curIdent ins // DeleteSpec returns edits to delete the {Type,Value}Spec identified by curSpec. // // TODO(adonovan): add test suite. Test for consts as well. -func DeleteSpec(tokFile *token.File, curSpec inspector.Cursor) []analysis.TextEdit { +func DeleteSpec(tokFile *token.File, curSpec inspector.Cursor) []Edit { var ( spec = curSpec.Node().(ast.Spec) curDecl = curSpec.Parent() @@ -277,7 +276,7 @@ func DeleteSpec(tokFile *token.File, curSpec inspector.Cursor) []analysis.TextEd // ----- end = decl.Specs[index+1].Pos() } - return []analysis.TextEdit{{ + return []Edit{{ Pos: pos, End: end, }} @@ -286,7 +285,7 @@ func DeleteSpec(tokFile *token.File, curSpec inspector.Cursor) []analysis.TextEd // DeleteDecl returns edits to delete the ast.Decl identified by curDecl. // // TODO(adonovan): add test suite. -func DeleteDecl(tokFile *token.File, curDecl inspector.Cursor) []analysis.TextEdit { +func DeleteDecl(tokFile *token.File, curDecl inspector.Cursor) []Edit { decl := curDecl.Node().(ast.Decl) ek, _ := curDecl.ParentEdge() @@ -321,7 +320,7 @@ func DeleteDecl(tokFile *token.File, curDecl inspector.Cursor) []analysis.TextEd } } - return []analysis.TextEdit{{ + return []Edit{{ Pos: pos, End: end, }} @@ -366,7 +365,7 @@ func filterPos(nds []*ast.Comment, start, end token.Pos) (token.Pos, token.Pos, // it removes whole lines like // // stmt // comment -func DeleteStmt(file *token.File, curStmt inspector.Cursor) []analysis.TextEdit { +func DeleteStmt(file *token.File, curStmt inspector.Cursor) []Edit { // if the stmt is on a line by itself, or a range of lines, delete the whole thing // including comments. Except for the heads of switches, type // switches, and for-statements that's the usual case. Complexity occurs where @@ -516,13 +515,13 @@ Big: } } - return []analysis.TextEdit{{Pos: leftEdit, End: rightEdit}} + return []Edit{{Pos: leftEdit, End: rightEdit}} } // DeleteUnusedVars computes the edits required to delete the // declarations of any local variables whose last uses are in the // curDelend subtree, which is about to be deleted. -func DeleteUnusedVars(index *typeindex.Index, info *types.Info, tokFile *token.File, curDelend inspector.Cursor) []analysis.TextEdit { +func DeleteUnusedVars(index *typeindex.Index, info *types.Info, tokFile *token.File, curDelend inspector.Cursor) []Edit { // TODO(adonovan): we might want to generalize this by // splitting the two phases below, so that we can gather // across a whole sequence of deletions then finally compute the @@ -539,7 +538,7 @@ func DeleteUnusedVars(index *typeindex.Index, info *types.Info, tokFile *token.F } // Delete declaration of each var that became unused. - var edits []analysis.TextEdit + var edits []Edit for v, count := range delcount { if len(slices.Collect(index.Uses(v))) == count { if curDefId, ok := index.Def(v); ok { diff --git a/vendor/golang.org/x/tools/internal/refactor/edit.go b/vendor/golang.org/x/tools/internal/refactor/edit.go new file mode 100644 index 000000000..42be9a54b --- /dev/null +++ b/vendor/golang.org/x/tools/internal/refactor/edit.go @@ -0,0 +1,15 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file.p + +package refactor + +// This is the only file in this package that should import analysis. +// +// TODO(adonovan): consider unaliasing the type to break the +// dependency. (The ergonomics of slice append are unfortunate.) + +import "golang.org/x/tools/go/analysis" + +// An Edit describes a deletion and/or an insertion. +type Edit = analysis.TextEdit diff --git a/vendor/golang.org/x/tools/internal/refactor/imports.go b/vendor/golang.org/x/tools/internal/refactor/imports.go index b5440d896..e1860ab06 100644 --- a/vendor/golang.org/x/tools/internal/refactor/imports.go +++ b/vendor/golang.org/x/tools/internal/refactor/imports.go @@ -7,13 +7,12 @@ package refactor // This file defines operations for computing edits to imports. import ( - "fmt" "go/ast" "go/token" "go/types" pathpkg "path" + "strconv" - "golang.org/x/tools/go/analysis" "golang.org/x/tools/internal/packagepath" ) @@ -35,7 +34,7 @@ import ( // package declares member. // // AddImport does not mutate its arguments. -func AddImport(info *types.Info, file *ast.File, preferredName, pkgpath, member string, pos token.Pos) (prefix string, edits []analysis.TextEdit) { +func AddImport(info *types.Info, file *ast.File, preferredName, pkgpath, member string, pos token.Pos) (prefix string, edits []Edit) { // Find innermost enclosing lexical block. scope := info.Scopes[file].Innermost(pos) if scope == nil { @@ -69,33 +68,53 @@ func AddImport(info *types.Info, file *ast.File, preferredName, pkgpath, member newName := preferredName if preferredName != "_" { newName = FreshName(scope, pos, preferredName) + prefix = newName + "." } - // Create a new import declaration either before the first existing - // declaration (which must exist), including its comments; or - // inside the declaration, if it is an import group. - // // Use a renaming import whenever the preferred name is not // available, or the chosen name does not match the last // segment of its path. - newText := fmt.Sprintf("%q", pkgpath) - if newName != preferredName || newName != pathpkg.Base(pkgpath) { - newText = fmt.Sprintf("%s %q", newName, pkgpath) + if newName == preferredName && newName == pathpkg.Base(pkgpath) { + newName = "" + } + + return prefix, AddImportEdits(file, newName, pkgpath) +} + +// AddImportEdits returns the edits to add an import of the specified +// package, without any analysis of whether this is necessary or safe. +// If name is nonempty, it is used as an explicit [ImportSpec.Name]. +// +// A sequence of calls to AddImportEdits that each add the file's +// first import (or in a file that does not have a grouped import) may +// result in multiple import declarations, rather than a single one +// with multiple ImportSpecs. However, a subsequent run of +// x/tools/cmd/goimports ([imports.Process]) will combine them. +// +// AddImportEdits does not mutate the AST. +func AddImportEdits(file *ast.File, name, pkgpath string) []Edit { + newText := strconv.Quote(pkgpath) + if name != "" { + newText = name + " " + newText } + // Create a new import declaration either before the first existing + // declaration (which must exist), including its comments; or + // inside the declaration, if it is an import group. decl0 := file.Decls[0] - var before ast.Node = decl0 + before := decl0.Pos() switch decl0 := decl0.(type) { case *ast.GenDecl: if decl0.Doc != nil { - before = decl0.Doc + before = decl0.Doc.Pos() } case *ast.FuncDecl: if decl0.Doc != nil { - before = decl0.Doc + before = decl0.Doc.Pos() } } - if gd, ok := before.(*ast.GenDecl); ok && gd.Tok == token.IMPORT && gd.Rparen.IsValid() { + var pos token.Pos + if gd, ok := decl0.(*ast.GenDecl); ok && gd.Tok == token.IMPORT && gd.Rparen.IsValid() { // Have existing grouped import ( ... ) decl. if packagepath.IsStdPackage(pkgpath) && len(gd.Specs) > 0 { // Add spec for a std package before @@ -116,10 +135,13 @@ func AddImport(info *types.Info, file *ast.File, preferredName, pkgpath, member // No import decl, or non-grouped import. // Add a new import decl before first decl. // (gofmt will merge multiple import decls.) - pos = before.Pos() + // + // TODO(adonovan): do better here; plunder the + // mergeImports logic from [imports.Process]. + pos = before newText = "import " + newText + "\n\n" } - return newName + ".", []analysis.TextEdit{{ + return []Edit{{ Pos: pos, End: pos, NewText: []byte(newText), diff --git a/vendor/golang.org/x/tools/internal/refactor/refactor.go b/vendor/golang.org/x/tools/internal/refactor/refactor.go index 26bc07980..8664377f8 100644 --- a/vendor/golang.org/x/tools/internal/refactor/refactor.go +++ b/vendor/golang.org/x/tools/internal/refactor/refactor.go @@ -5,8 +5,7 @@ // Package refactor provides operators to compute common textual edits // for refactoring tools. // -// This package should not use features of the analysis API -// other than [analysis.TextEdit]. +// This package should not use features of the analysis API other than [Edit]. package refactor import ( diff --git a/vendor/golang.org/x/tools/internal/stdlib/deps.go b/vendor/golang.org/x/tools/internal/stdlib/deps.go index 581784da4..f7b9c1286 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/deps.go +++ b/vendor/golang.org/x/tools/internal/stdlib/deps.go @@ -12,360 +12,364 @@ type pkginfo struct { } var deps = [...]pkginfo{ - {"archive/tar", "\x03n\x03E<\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"}, - {"archive/zip", "\x02\x04d\a\x03\x12\x021<\x01+\x05\x01\x0f\x03\x02\x0e\x04"}, - {"bufio", "\x03n\x84\x01D\x14"}, - {"bytes", "q*Z\x03\fG\x02\x02"}, + {"archive/tar", "\x03p\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"}, + {"archive/zip", "\x02\x04f\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0e\x04"}, + {"bufio", "\x03p\x86\x01D\x14"}, + {"bytes", "s+[\x03\fG\x02\x02"}, {"cmp", ""}, - {"compress/bzip2", "\x02\x02\xf1\x01A"}, - {"compress/flate", "\x02o\x03\x81\x01\f\x033\x01\x03"}, - {"compress/gzip", "\x02\x04d\a\x03\x14mT"}, - {"compress/lzw", "\x02o\x03\x81\x01"}, - {"compress/zlib", "\x02\x04d\a\x03\x12\x01n"}, - {"container/heap", "\xb7\x02"}, + {"compress/bzip2", "\x02\x02\xf5\x01A"}, + {"compress/flate", "\x02q\x03\x83\x01\f\x033\x01\x03"}, + {"compress/gzip", "\x02\x04f\a\x03\x15nT"}, + {"compress/lzw", "\x02q\x03\x83\x01"}, + {"compress/zlib", "\x02\x04f\a\x03\x13\x01o"}, + {"container/heap", "\xbb\x02"}, {"container/list", ""}, {"container/ring", ""}, - {"context", "q[o\x01\r"}, - {"crypto", "\x86\x01oC"}, - {"crypto/aes", "\x10\n\t\x95\x02"}, - {"crypto/cipher", "\x03 \x01\x01\x1f\x11\x1c+Y"}, - {"crypto/des", "\x10\x15\x1f-+\x9c\x01\x03"}, - {"crypto/dsa", "D\x04)\x84\x01\r"}, - {"crypto/ecdh", "\x03\v\f\x10\x04\x16\x04\r\x1c\x84\x01"}, - {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\a\v\x06\x01\x04\f\x01\x1c\x84\x01\r\x05K\x01"}, - {"crypto/ed25519", "\x0e\x1e\x11\a\n\a\x1c\x84\x01C"}, - {"crypto/elliptic", "2?\x84\x01\r9"}, + {"context", "s\\p\x01\r"}, + {"crypto", "\x89\x01pC"}, + {"crypto/aes", "\x10\n\t\x99\x02"}, + {"crypto/cipher", "\x03 \x01\x01 \x12\x1c,Z"}, + {"crypto/des", "\x10\x15 .,\x9d\x01\x03"}, + {"crypto/dsa", "E\x04*\x86\x01\r"}, + {"crypto/ecdh", "\x03\v\f\x10\x04\x17\x04\x0e\x1c\x86\x01"}, + {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\b\v\x06\x01\x04\r\x01\x1c\x86\x01\r\x05K\x01"}, + {"crypto/ed25519", "\x0e\x1e\x12\a\v\a\x1c\x86\x01C"}, + {"crypto/elliptic", "3@\x86\x01\r9"}, {"crypto/fips140", "\"\x05"}, - {"crypto/hkdf", "/\x14\x01-\x15"}, - {"crypto/hmac", "\x1a\x16\x13\x01\x111"}, - {"crypto/internal/boring", "\x0e\x02\ri"}, - {"crypto/internal/boring/bbig", "\x1a\xe8\x01M"}, - {"crypto/internal/boring/bcache", "\xbc\x02\x13"}, + {"crypto/hkdf", "/\x15\x01.\x16"}, + {"crypto/hmac", "\x1a\x16\x14\x01\x122"}, + {"crypto/internal/boring", "\x0e\x02\rl"}, + {"crypto/internal/boring/bbig", "\x1a\xec\x01M"}, + {"crypto/internal/boring/bcache", "\xc0\x02\x13"}, {"crypto/internal/boring/sig", ""}, {"crypto/internal/constanttime", ""}, - {"crypto/internal/cryptotest", "\x03\r\n\b%\x0e\x19\x06\x12\x12 \x04\x06\t\x18\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"}, - {"crypto/internal/entropy", "I"}, - {"crypto/internal/entropy/v1.0.0", "B/\x93\x018\x13"}, - {"crypto/internal/fips140", "A0\xbd\x01\v\x16"}, - {"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x13\x05\x01\x01\x06*\x93\x014"}, - {"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x11\x05\x01\a*\x90\x01"}, - {"crypto/internal/fips140/alias", "\xcf\x02"}, - {"crypto/internal/fips140/bigmod", "'\x18\x01\a*\x93\x01"}, - {"crypto/internal/fips140/check", "\"\x0e\x06\t\x02\xb4\x01Z"}, - {"crypto/internal/fips140/check/checktest", "'\x87\x02!"}, - {"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x13\x05\t\x01(\x84\x01\x0f7\x01"}, - {"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\t\r2\x84\x01\x0f7"}, - {"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x02\x069\x15oF"}, - {"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\v9\xc7\x01\x03"}, - {"crypto/internal/fips140/edwards25519", "\x1e\t\a\x112\x93\x017"}, - {"crypto/internal/fips140/edwards25519/field", "'\x13\x052\x93\x01"}, - {"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\x06;\x15"}, - {"crypto/internal/fips140/hmac", "\x03\x1f\x14\x01\x019\x15"}, - {"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0e\x03\x052\xca\x01"}, - {"crypto/internal/fips140/nistec", "\x1e\t\f\f2\x93\x01*\r\x14"}, - {"crypto/internal/fips140/nistec/fiat", "'\x137\x93\x01"}, - {"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\x06;\x15"}, - {"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\r\x01\x01\x027\x15oF"}, - {"crypto/internal/fips140/sha256", "\x03\x1f\x1d\x01\a*\x15~"}, - {"crypto/internal/fips140/sha3", "\x03\x1f\x18\x05\x011\x93\x01K"}, - {"crypto/internal/fips140/sha512", "\x03\x1f\x1d\x01\a*\x15~"}, - {"crypto/internal/fips140/ssh", "'_"}, - {"crypto/internal/fips140/subtle", "\x1e\a\x1a\xc5\x01"}, - {"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\x06\x029\x15"}, - {"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\a\t2\x15"}, - {"crypto/internal/fips140cache", "\xae\x02\r&"}, + {"crypto/internal/cryptotest", "\x03\r\n\b&\x0f\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"}, + {"crypto/internal/entropy", "J"}, + {"crypto/internal/entropy/v1.0.0", "C0\x95\x018\x13"}, + {"crypto/internal/fips140", "B1\xbf\x01\v\x16"}, + {"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x14\x05\x01\x01\x06+\x95\x014"}, + {"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x12\x05\x01\a+\x92\x01"}, + {"crypto/internal/fips140/alias", "\xd3\x02"}, + {"crypto/internal/fips140/bigmod", "'\x19\x01\a+\x95\x01"}, + {"crypto/internal/fips140/check", "\"\x0e\a\t\x02\xb7\x01Z"}, + {"crypto/internal/fips140/check/checktest", "'\x8b\x02!"}, + {"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x14\x05\t\x01)\x86\x01\x0f7\x01"}, + {"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\n\r3\x86\x01\x0f7"}, + {"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x03\x06:\x16pF"}, + {"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\f:\xc9\x01\x03"}, + {"crypto/internal/fips140/edwards25519", "\x1e\t\a\x123\x95\x017"}, + {"crypto/internal/fips140/edwards25519/field", "'\x14\x053\x95\x01"}, + {"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\a<\x16"}, + {"crypto/internal/fips140/hmac", "\x03\x1f\x15\x01\x01:\x16"}, + {"crypto/internal/fips140/mldsa", "\x03\x1b\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, + {"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0f\x03\x053\xcc\x01"}, + {"crypto/internal/fips140/nistec", "\x1e\t\r\f3\x95\x01*\r\x14"}, + {"crypto/internal/fips140/nistec/fiat", "'\x148\x95\x01"}, + {"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\a<\x16"}, + {"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, + {"crypto/internal/fips140/sha256", "\x03\x1f\x1e\x01\a+\x16\x7f"}, + {"crypto/internal/fips140/sha3", "\x03\x1f\x19\x05\x012\x95\x01K"}, + {"crypto/internal/fips140/sha512", "\x03\x1f\x1e\x01\a+\x16\x7f"}, + {"crypto/internal/fips140/ssh", "'b"}, + {"crypto/internal/fips140/subtle", "\x1e\a\x1b\xc8\x01"}, + {"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\a\x02:\x16"}, + {"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\b\t3\x16"}, + {"crypto/internal/fips140cache", "\xb2\x02\r&"}, {"crypto/internal/fips140deps", ""}, - {"crypto/internal/fips140deps/byteorder", "\x9c\x01"}, - {"crypto/internal/fips140deps/cpu", "\xb1\x01\a"}, - {"crypto/internal/fips140deps/godebug", "\xb9\x01"}, - {"crypto/internal/fips140deps/time", "\xc9\x02"}, - {"crypto/internal/fips140hash", "7\x1c3\xc9\x01"}, - {"crypto/internal/fips140only", ")\r\x01\x01N3<"}, + {"crypto/internal/fips140deps/byteorder", "\x9f\x01"}, + {"crypto/internal/fips140deps/cpu", "\xb4\x01\a"}, + {"crypto/internal/fips140deps/godebug", "\xbc\x01"}, + {"crypto/internal/fips140deps/time", "\xcd\x02"}, + {"crypto/internal/fips140hash", "8\x1d4\xca\x01"}, + {"crypto/internal/fips140only", ")\x0e\x01\x01P3="}, {"crypto/internal/fips140test", ""}, - {"crypto/internal/hpke", "\x0e\x01\x01\x03\x056#+hM"}, - {"crypto/internal/impl", "\xb9\x02"}, - {"crypto/internal/randutil", "\xf5\x01\x12"}, - {"crypto/internal/sysrand", "qo! \r\r\x01\x01\f\x06"}, - {"crypto/internal/sysrand/internal/seccomp", "q"}, - {"crypto/md5", "\x0e6-\x15\x16h"}, - {"crypto/mlkem", "1"}, - {"crypto/pbkdf2", "4\x0f\x01-\x15"}, - {"crypto/rand", "\x1a\b\a\x1b\x04\x01(\x84\x01\rM"}, - {"crypto/rc4", "%\x1f-\xc7\x01"}, - {"crypto/rsa", "\x0e\f\x01\v\x0f\x0e\x01\x04\x06\a\x1c\x03\x123<\f\x01"}, - {"crypto/sha1", "\x0e\f*\x03*\x15\x16\x15S"}, - {"crypto/sha256", "\x0e\f\x1cP"}, - {"crypto/sha3", "\x0e)O\xc9\x01"}, - {"crypto/sha512", "\x0e\f\x1eN"}, - {"crypto/subtle", "\x1e\x1c\x9c\x01X"}, - {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\r\n\x01\n\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x12\x16\x15\b<\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"}, - {"crypto/tls/internal/fips140tls", "\x17\xa5\x02"}, - {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x015\x05\x01\x01\x02\x05\x0e\x06\x02\x02\x03E\x039\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\x02\x05\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"}, - {"crypto/x509/pkix", "g\x06\a\x8e\x01G"}, - {"database/sql", "\x03\nN\x16\x03\x81\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"}, - {"database/sql/driver", "\rd\x03\xb5\x01\x0f\x11"}, - {"debug/buildinfo", "\x03[\x02\x01\x01\b\a\x03e\x1a\x02\x01+\x0f\x1f"}, - {"debug/dwarf", "\x03g\a\x03\x81\x011\x11\x01\x01"}, - {"debug/elf", "\x03\x06T\r\a\x03e\x1b\x01\f \x17\x01\x16"}, - {"debug/gosym", "\x03g\n\xc3\x01\x01\x01\x02"}, - {"debug/macho", "\x03\x06T\r\ne\x1c,\x17\x01"}, - {"debug/pe", "\x03\x06T\r\a\x03e\x1c,\x17\x01\x16"}, - {"debug/plan9obj", "j\a\x03e\x1c,"}, - {"embed", "q*A\x19\x01S"}, + {"crypto/internal/hpke", "\x03\v\x01\x01\x03\x055\x03\x04\x01\x01\x16\a\x03\x13\xcc\x01"}, + {"crypto/internal/impl", "\xbd\x02"}, + {"crypto/internal/randutil", "\xf9\x01\x12"}, + {"crypto/internal/sysrand", "sq! \r\r\x01\x01\f\x06"}, + {"crypto/internal/sysrand/internal/seccomp", "s"}, + {"crypto/md5", "\x0e7.\x16\x16i"}, + {"crypto/mlkem", "\x0e$"}, + {"crypto/mlkem/mlkemtest", "2\x1b&"}, + {"crypto/pbkdf2", "5\x0f\x01.\x16"}, + {"crypto/rand", "\x1a\b\a\x1c\x04\x01)\x86\x01\rM"}, + {"crypto/rc4", "% .\xc9\x01"}, + {"crypto/rsa", "\x0e\f\x01\v\x10\x0e\x01\x04\a\a\x1c\x03\x133=\f\x01"}, + {"crypto/sha1", "\x0e\f+\x03+\x16\x16\x15T"}, + {"crypto/sha256", "\x0e\f\x1dR"}, + {"crypto/sha3", "\x0e*Q\xca\x01"}, + {"crypto/sha512", "\x0e\f\x1fP"}, + {"crypto/subtle", "\x1e\x1d\x9f\x01X"}, + {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\x0e\n\x01\n\x05\x04\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"}, + {"crypto/tls/internal/fips140tls", "\x17\xa9\x02"}, + {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x016\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"}, + {"crypto/x509/pkix", "i\x06\a\x90\x01G"}, + {"database/sql", "\x03\nP\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"}, + {"database/sql/driver", "\rf\x03\xb7\x01\x0f\x11"}, + {"debug/buildinfo", "\x03]\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f\x1f"}, + {"debug/dwarf", "\x03i\a\x03\x83\x011\x11\x01\x01"}, + {"debug/elf", "\x03\x06V\r\a\x03g\x1b\x01\f \x17\x01\x16"}, + {"debug/gosym", "\x03i\n\xc5\x01\x01\x01\x02"}, + {"debug/macho", "\x03\x06V\r\ng\x1c,\x17\x01"}, + {"debug/pe", "\x03\x06V\r\a\x03g\x1c,\x17\x01\x16"}, + {"debug/plan9obj", "l\a\x03g\x1c,"}, + {"embed", "s+B\x19\x01S"}, {"embed/internal/embedtest", ""}, {"encoding", ""}, - {"encoding/ascii85", "\xf5\x01C"}, - {"encoding/asn1", "\x03n\x03e(\x01'\r\x02\x01\x10\x03\x01"}, - {"encoding/base32", "\xf5\x01A\x02"}, - {"encoding/base64", "\x9c\x01YA\x02"}, - {"encoding/binary", "q\x84\x01\f(\r\x05"}, - {"encoding/csv", "\x02\x01n\x03\x81\x01D\x12\x02"}, - {"encoding/gob", "\x02c\x05\a\x03e\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"}, - {"encoding/hex", "q\x03\x81\x01A\x03"}, - {"encoding/json", "\x03\x01a\x04\b\x03\x81\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"}, - {"encoding/pem", "\x03f\b\x84\x01A\x03"}, - {"encoding/xml", "\x02\x01b\f\x03\x81\x014\x05\n\x01\x02\x10\x02"}, - {"errors", "\xcc\x01\x83\x01"}, - {"expvar", "nK@\b\v\x15\r\b\x02\x03\x01\x11"}, - {"flag", "e\f\x03\x81\x01,\b\x05\b\x02\x01\x10"}, - {"fmt", "qE&\x19\f \b\r\x02\x03\x12"}, - {"go/ast", "\x03\x01p\x0e\x01r\x03)\b\r\x02\x01\x12\x02"}, - {"go/build", "\x02\x01n\x03\x01\x02\x02\a\x02\x01\x17\x1f\x04\x02\b\x1b\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"}, - {"go/build/constraint", "q\xc7\x01\x01\x12\x02"}, - {"go/constant", "t\x0f~\x01\x024\x01\x02\x12"}, - {"go/doc", "\x04p\x01\x05\t=51\x10\x02\x01\x12\x02"}, - {"go/doc/comment", "\x03q\xc2\x01\x01\x01\x01\x12\x02"}, - {"go/format", "\x03q\x01\v\x01\x02rD"}, - {"go/importer", "v\a\x01\x01\x04\x01q9"}, - {"go/internal/gccgoimporter", "\x02\x01[\x13\x03\x04\v\x01o\x02,\x01\x05\x11\x01\f\b"}, - {"go/internal/gcimporter", "\x02r\x0f\x010\x05\r/,\x15\x03\x02"}, - {"go/internal/srcimporter", "t\x01\x01\n\x03\x01q,\x01\x05\x12\x02\x14"}, - {"go/parser", "\x03n\x03\x01\x02\v\x01r\x01+\x06\x12"}, - {"go/printer", "t\x01\x02\x03\tr\f \x15\x02\x01\x02\v\x05\x02"}, - {"go/scanner", "\x03q\x0fr2\x10\x01\x13\x02"}, - {"go/token", "\x04p\x84\x01>\x02\x03\x01\x0f\x02"}, - {"go/types", "\x03\x01\x06g\x03\x01\x03\b\x03\x024\x062\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, - {"go/version", "\xbe\x01{"}, - {"hash", "\xf5\x01"}, - {"hash/adler32", "q\x15\x16"}, - {"hash/crc32", "q\x15\x16\x15\x8a\x01\x01\x13"}, - {"hash/crc64", "q\x15\x16\x9f\x01"}, - {"hash/fnv", "q\x15\x16h"}, - {"hash/maphash", "\x86\x01\x11<|"}, - {"html", "\xb9\x02\x02\x12"}, - {"html/template", "\x03k\x06\x18-<\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, - {"image", "\x02o\x1ef\x0f4\x03\x01"}, + {"encoding/ascii85", "\xf9\x01C"}, + {"encoding/asn1", "\x03p\x03g(\x01'\r\x02\x01\x10\x03\x01"}, + {"encoding/base32", "\xf9\x01A\x02"}, + {"encoding/base64", "\x9f\x01ZA\x02"}, + {"encoding/binary", "s\x86\x01\f(\r\x05"}, + {"encoding/csv", "\x02\x01p\x03\x83\x01D\x12\x02"}, + {"encoding/gob", "\x02e\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"}, + {"encoding/hex", "s\x03\x83\x01A\x03"}, + {"encoding/json", "\x03\x01c\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"}, + {"encoding/pem", "\x03h\b\x86\x01A\x03"}, + {"encoding/xml", "\x02\x01d\f\x03\x83\x014\x05\n\x01\x02\x10\x02"}, + {"errors", "\xcf\x01\x84\x01"}, + {"expvar", "pLA\b\v\x15\r\b\x02\x03\x01\x11"}, + {"flag", "g\f\x03\x83\x01,\b\x05\b\x02\x01\x10"}, + {"fmt", "sF'\x19\f \b\r\x02\x03\x12"}, + {"go/ast", "\x03\x01r\x0f\x01s\x03)\b\r\x02\x01\x12\x02"}, + {"go/build", "\x02\x01p\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"}, + {"go/build/constraint", "s\xc9\x01\x01\x12\x02"}, + {"go/constant", "v\x10\x7f\x01\x024\x01\x02\x12"}, + {"go/doc", "\x04r\x01\x05\n=61\x10\x02\x01\x12\x02"}, + {"go/doc/comment", "\x03s\xc4\x01\x01\x01\x01\x12\x02"}, + {"go/format", "\x03s\x01\f\x01\x02sD"}, + {"go/importer", "x\a\x01\x02\x04\x01r9"}, + {"go/internal/gccgoimporter", "\x02\x01]\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\f\b"}, + {"go/internal/gcimporter", "\x02t\x10\x010\x05\r0,\x15\x03\x02"}, + {"go/internal/scannerhooks", "\x86\x01"}, + {"go/internal/srcimporter", "v\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x14"}, + {"go/parser", "\x03p\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, + {"go/printer", "v\x01\x02\x03\ns\f \x15\x02\x01\x02\v\x05\x02"}, + {"go/scanner", "\x03s\v\x05s2\x10\x01\x13\x02"}, + {"go/token", "\x04r\x86\x01>\x02\x03\x01\x0f\x02"}, + {"go/types", "\x03\x01\x06i\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, + {"go/version", "\xc1\x01|"}, + {"hash", "\xf9\x01"}, + {"hash/adler32", "s\x16\x16"}, + {"hash/crc32", "s\x16\x16\x15\x8b\x01\x01\x13"}, + {"hash/crc64", "s\x16\x16\xa0\x01"}, + {"hash/fnv", "s\x16\x16i"}, + {"hash/maphash", "\x89\x01\x11<}"}, + {"html", "\xbd\x02\x02\x12"}, + {"html/template", "\x03m\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, + {"image", "\x02q\x1fg\x0f4\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x8f\x01"}, - {"image/draw", "\x8e\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05i\x03\x1a\x01\x01\x01\vY"}, - {"image/internal/imageutil", "\x8e\x01"}, - {"image/jpeg", "\x02o\x1d\x01\x04b"}, - {"image/png", "\x02\aa\n\x12\x02\x06\x01fC"}, - {"index/suffixarray", "\x03g\a\x84\x01\f+\n\x01"}, - {"internal/abi", "\xb8\x01\x97\x01"}, - {"internal/asan", "\xcf\x02"}, - {"internal/bisect", "\xae\x02\r\x01"}, - {"internal/buildcfg", "tGf\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb1\x01\x9e\x01"}, + {"image/color/palette", "\x92\x01"}, + {"image/draw", "\x91\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05k\x03\x1b\x01\x01\x01\vZ\x0f"}, + {"image/internal/imageutil", "\x91\x01"}, + {"image/jpeg", "\x02q\x1e\x01\x04c"}, + {"image/png", "\x02\ac\n\x13\x02\x06\x01gC"}, + {"index/suffixarray", "\x03i\a\x86\x01\f+\n\x01"}, + {"internal/abi", "\xbb\x01\x98\x01"}, + {"internal/asan", "\xd3\x02"}, + {"internal/bisect", "\xb2\x02\r\x01"}, + {"internal/buildcfg", "vHg\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xb4\x01\x9f\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "tZS\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\x9c\x01\x15\a\x97\x01"}, + {"internal/cgrouptest", "v[T\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\x9f\x01\x15\a\x98\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "n\x06\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02&,\x06\a\n\x01\x03\r\x06"}, - {"internal/coverage/cformat", "\x04p-\x04P\v6\x01\x02\r"}, - {"internal/coverage/cmerge", "t-`"}, - {"internal/coverage/decodecounter", "j\n-\v\x02G,\x17\x17"}, - {"internal/coverage/decodemeta", "\x02h\n\x16\x17\v\x02G,"}, - {"internal/coverage/encodecounter", "\x02h\n-\f\x01\x02E\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01g\n\x12\x04\x17\r\x02E,."}, - {"internal/coverage/pods", "\x04p-\x80\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xcf\x02"}, - {"internal/coverage/slicereader", "j\n\x81\x01Z"}, - {"internal/coverage/slicewriter", "t\x81\x01"}, - {"internal/coverage/stringtab", "t8\x04E"}, + {"internal/coverage/cfile", "p\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\r\x06"}, + {"internal/coverage/cformat", "\x04r.\x04Q\v6\x01\x02\r"}, + {"internal/coverage/cmerge", "v.a"}, + {"internal/coverage/decodecounter", "l\n.\v\x02H,\x17\x17"}, + {"internal/coverage/decodemeta", "\x02j\n\x17\x17\v\x02H,"}, + {"internal/coverage/encodecounter", "\x02j\n.\f\x01\x02F\v!\x15"}, + {"internal/coverage/encodemeta", "\x02\x01i\n\x13\x04\x17\r\x02F,."}, + {"internal/coverage/pods", "\x04r.\x81\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xd3\x02"}, + {"internal/coverage/slicereader", "l\n\x83\x01Z"}, + {"internal/coverage/slicewriter", "v\x83\x01"}, + {"internal/coverage/stringtab", "v9\x04F"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xcf\x02"}, - {"internal/dag", "\x04p\xc2\x01\x03"}, - {"internal/diff", "\x03q\xc3\x01\x02"}, - {"internal/exportdata", "\x02\x01n\x03\x02c\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "q*A\x1a@"}, - {"internal/fmtsort", "\x04\xa5\x02\r"}, - {"internal/fuzz", "\x03\nE\x18\x04\x03\x03\x01\v\x036<\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, + {"internal/cpu", "\xd3\x02"}, + {"internal/dag", "\x04r\xc4\x01\x03"}, + {"internal/diff", "\x03s\xc5\x01\x02"}, + {"internal/exportdata", "\x02\x01p\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "s+B\x1a@"}, + {"internal/fmtsort", "\x04\xa9\x02\r"}, + {"internal/fuzz", "\x03\nG\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, {"internal/goarch", ""}, - {"internal/godebug", "\x99\x01!\x81\x01\x01\x13"}, + {"internal/godebug", "\x9c\x01!\x82\x01\x01\x13"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa1\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xa5\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa1\x02\v\r\x02"}, - {"internal/lazytemplate", "\xf5\x01,\x18\x02\f"}, - {"internal/msan", "\xcf\x02"}, + {"internal/lazyregexp", "\xa5\x02\v\r\x02"}, + {"internal/lazytemplate", "\xf9\x01,\x18\x02\f"}, + {"internal/msan", "\xd3\x02"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "i\x8c\x01,"}, - {"internal/oserror", "q"}, - {"internal/pkgbits", "\x03O\x18\a\x03\x04\vr\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "k\x8e\x01,"}, + {"internal/oserror", "s"}, + {"internal/pkgbits", "\x03Q\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "qj\x05\x159\r\x01\x01\f\x06"}, - {"internal/profile", "\x03\x04j\x03\x81\x017\n\x01\x01\x01\x10"}, + {"internal/poll", "sl\x05\x159\r\x01\x01\f\x06"}, + {"internal/profile", "\x03\x04l\x03\x83\x017\n\x01\x01\x01\x10"}, {"internal/profilerecord", ""}, - {"internal/race", "\x97\x01\xb8\x01"}, - {"internal/reflectlite", "\x97\x01!:\x16"}, - {"vendor/golang.org/x/text/unicode/norm", "j\n\x81\x01F\x12\x11"}, - {"weak", "\x97\x01\x97\x01!"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xd3\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "W\x15\x9c\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "s\xc7\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x8f\x02\x14\x1a\x14\r"}, + {"vendor/golang.org/x/net/http/httpproxy", "s\x03\x99\x01\x10\x05\x01\x18\x14\r"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03p\x03\x83\x01F"}, + {"vendor/golang.org/x/net/idna", "v\x8f\x018\x14\x10\x02\x01"}, + {"vendor/golang.org/x/net/nettest", "\x03i\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\v"}, + {"vendor/golang.org/x/sys/cpu", "\xa5\x02\r\n\x01\x16"}, + {"vendor/golang.org/x/text/secure/bidirule", "s\xde\x01\x11\x01"}, + {"vendor/golang.org/x/text/transform", "\x03p\x86\x01X"}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bk\x87\x01>\x16"}, + {"vendor/golang.org/x/text/unicode/norm", "l\n\x83\x01F\x12\x11"}, + {"weak", "\x9a\x01\x98\x01!"}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. @@ -385,6 +389,7 @@ var bootstrap = map[string]bool{ "cmd/compile/internal/arm64": true, "cmd/compile/internal/base": true, "cmd/compile/internal/bitvec": true, + "cmd/compile/internal/bloop": true, "cmd/compile/internal/compare": true, "cmd/compile/internal/coverage": true, "cmd/compile/internal/deadlocals": true, @@ -413,6 +418,7 @@ var bootstrap = map[string]bool{ "cmd/compile/internal/riscv64": true, "cmd/compile/internal/rttype": true, "cmd/compile/internal/s390x": true, + "cmd/compile/internal/slice": true, "cmd/compile/internal/ssa": true, "cmd/compile/internal/ssagen": true, "cmd/compile/internal/staticdata": true, diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index 362f23c43..f1e24625a 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -16,6 +16,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Flush", Method, 0, ""}, {"(*Writer).Write", Method, 0, ""}, {"(*Writer).WriteHeader", Method, 0, ""}, + {"(FileInfoNames).Gname", Method, 23, ""}, + {"(FileInfoNames).IsDir", Method, 23, ""}, + {"(FileInfoNames).ModTime", Method, 23, ""}, + {"(FileInfoNames).Mode", Method, 23, ""}, + {"(FileInfoNames).Name", Method, 23, ""}, + {"(FileInfoNames).Size", Method, 23, ""}, + {"(FileInfoNames).Sys", Method, 23, ""}, + {"(FileInfoNames).Uname", Method, 23, ""}, {"(Format).String", Method, 10, ""}, {"ErrFieldTooLong", Var, 0, ""}, {"ErrHeader", Var, 0, ""}, @@ -338,6 +346,9 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Write", Method, 0, ""}, {"(CorruptInputError).Error", Method, 0, ""}, {"(InternalError).Error", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(Reader).ReadByte", Method, 0, ""}, + {"(Resetter).Reset", Method, 4, ""}, {"BestCompression", Const, 0, ""}, {"BestSpeed", Const, 0, ""}, {"CorruptInputError", Type, 0, ""}, @@ -409,6 +420,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).Flush", Method, 0, ""}, {"(*Writer).Reset", Method, 2, ""}, {"(*Writer).Write", Method, 0, ""}, + {"(Resetter).Reset", Method, 4, ""}, {"BestCompression", Const, 0, ""}, {"BestSpeed", Const, 0, ""}, {"DefaultCompression", Const, 0, ""}, @@ -426,6 +438,11 @@ var PackageSymbols = map[string][]Symbol{ {"Writer", Type, 0, ""}, }, "container/heap": { + {"(Interface).Len", Method, 0, ""}, + {"(Interface).Less", Method, 0, ""}, + {"(Interface).Pop", Method, 0, ""}, + {"(Interface).Push", Method, 0, ""}, + {"(Interface).Swap", Method, 0, ""}, {"Fix", Func, 2, "func(h Interface, i int)"}, {"Init", Func, 0, "func(h Interface)"}, {"Interface", Type, 0, ""}, @@ -469,6 +486,10 @@ var PackageSymbols = map[string][]Symbol{ {"Ring.Value", Field, 0, ""}, }, "context": { + {"(Context).Deadline", Method, 7, ""}, + {"(Context).Done", Method, 7, ""}, + {"(Context).Err", Method, 7, ""}, + {"(Context).Value", Method, 7, ""}, {"AfterFunc", Func, 21, "func(ctx Context, f func()) (stop func() bool)"}, {"Background", Func, 7, "func() Context"}, {"CancelCauseFunc", Type, 20, ""}, @@ -488,17 +509,31 @@ var PackageSymbols = map[string][]Symbol{ {"WithoutCancel", Func, 21, "func(parent Context) Context"}, }, "crypto": { + {"(Decapsulator).Decapsulate", Method, 26, ""}, + {"(Decapsulator).Encapsulator", Method, 26, ""}, + {"(Decrypter).Decrypt", Method, 5, ""}, + {"(Decrypter).Public", Method, 5, ""}, + {"(Encapsulator).Bytes", Method, 26, ""}, + {"(Encapsulator).Encapsulate", Method, 26, ""}, {"(Hash).Available", Method, 0, ""}, {"(Hash).HashFunc", Method, 4, ""}, {"(Hash).New", Method, 0, ""}, {"(Hash).Size", Method, 0, ""}, {"(Hash).String", Method, 15, ""}, + {"(MessageSigner).Public", Method, 25, ""}, + {"(MessageSigner).Sign", Method, 25, ""}, + {"(MessageSigner).SignMessage", Method, 25, ""}, + {"(Signer).Public", Method, 4, ""}, + {"(Signer).Sign", Method, 4, ""}, + {"(SignerOpts).HashFunc", Method, 4, ""}, {"BLAKE2b_256", Const, 9, ""}, {"BLAKE2b_384", Const, 9, ""}, {"BLAKE2b_512", Const, 9, ""}, {"BLAKE2s_256", Const, 9, ""}, + {"Decapsulator", Type, 26, ""}, {"Decrypter", Type, 5, ""}, {"DecrypterOpts", Type, 5, ""}, + {"Encapsulator", Type, 26, ""}, {"Hash", Type, 0, ""}, {"MD4", Const, 0, ""}, {"MD5", Const, 0, ""}, @@ -530,6 +565,16 @@ var PackageSymbols = map[string][]Symbol{ {"NewCipher", Func, 0, "func(key []byte) (cipher.Block, error)"}, }, "crypto/cipher": { + {"(AEAD).NonceSize", Method, 2, ""}, + {"(AEAD).Open", Method, 2, ""}, + {"(AEAD).Overhead", Method, 2, ""}, + {"(AEAD).Seal", Method, 2, ""}, + {"(Block).BlockSize", Method, 0, ""}, + {"(Block).Decrypt", Method, 0, ""}, + {"(Block).Encrypt", Method, 0, ""}, + {"(BlockMode).BlockSize", Method, 0, ""}, + {"(BlockMode).CryptBlocks", Method, 0, ""}, + {"(Stream).XORKeyStream", Method, 0, ""}, {"(StreamReader).Read", Method, 0, ""}, {"(StreamWriter).Close", Method, 0, ""}, {"(StreamWriter).Write", Method, 0, ""}, @@ -594,7 +639,13 @@ var PackageSymbols = map[string][]Symbol{ {"(*PublicKey).Bytes", Method, 20, ""}, {"(*PublicKey).Curve", Method, 20, ""}, {"(*PublicKey).Equal", Method, 20, ""}, - {"Curve", Type, 20, ""}, + {"(Curve).GenerateKey", Method, 20, ""}, + {"(Curve).NewPrivateKey", Method, 20, ""}, + {"(Curve).NewPublicKey", Method, 20, ""}, + {"(KeyExchanger).Curve", Method, 26, ""}, + {"(KeyExchanger).ECDH", Method, 26, ""}, + {"(KeyExchanger).PublicKey", Method, 26, ""}, + {"KeyExchanger", Type, 26, ""}, {"P256", Func, 20, "func() Curve"}, {"P384", Func, 20, "func() Curve"}, {"P521", Func, 20, "func() Curve"}, @@ -667,6 +718,12 @@ var PackageSymbols = map[string][]Symbol{ {"(*CurveParams).Params", Method, 0, ""}, {"(*CurveParams).ScalarBaseMult", Method, 0, ""}, {"(*CurveParams).ScalarMult", Method, 0, ""}, + {"(Curve).Add", Method, 0, ""}, + {"(Curve).Double", Method, 0, ""}, + {"(Curve).IsOnCurve", Method, 0, ""}, + {"(Curve).Params", Method, 0, ""}, + {"(Curve).ScalarBaseMult", Method, 0, ""}, + {"(Curve).ScalarMult", Method, 0, ""}, {"Curve", Type, 0, ""}, {"CurveParams", Type, 0, ""}, {"CurveParams.B", Field, 0, ""}, @@ -688,6 +745,7 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/fips140": { {"Enabled", Func, 24, "func() bool"}, + {"Version", Func, 26, "func() string"}, }, "crypto/hkdf": { {"Expand", Func, 24, "func[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLength int) ([]byte, error)"}, @@ -708,9 +766,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*DecapsulationKey1024).Bytes", Method, 24, ""}, {"(*DecapsulationKey1024).Decapsulate", Method, 24, ""}, {"(*DecapsulationKey1024).EncapsulationKey", Method, 24, ""}, + {"(*DecapsulationKey1024).Encapsulator", Method, 26, ""}, {"(*DecapsulationKey768).Bytes", Method, 24, ""}, {"(*DecapsulationKey768).Decapsulate", Method, 24, ""}, {"(*DecapsulationKey768).EncapsulationKey", Method, 24, ""}, + {"(*DecapsulationKey768).Encapsulator", Method, 26, ""}, {"(*EncapsulationKey1024).Bytes", Method, 24, ""}, {"(*EncapsulationKey1024).Encapsulate", Method, 24, ""}, {"(*EncapsulationKey768).Bytes", Method, 24, ""}, @@ -732,6 +792,10 @@ var PackageSymbols = map[string][]Symbol{ {"SeedSize", Const, 24, ""}, {"SharedKeySize", Const, 24, ""}, }, + "crypto/mlkem/mlkemtest": { + {"Encapsulate1024", Func, 26, "func(ek *mlkem.EncapsulationKey1024, random []byte) (sharedKey []byte, ciphertext []byte, err error)"}, + {"Encapsulate768", Func, 26, "func(ek *mlkem.EncapsulationKey768, random []byte) (sharedKey []byte, ciphertext []byte, err error)"}, + }, "crypto/pbkdf2": { {"Key", Func, 24, "func[Hash hash.Hash](h func() Hash, password string, salt []byte, iter int, keyLength int) ([]byte, error)"}, }, @@ -769,6 +833,7 @@ var PackageSymbols = map[string][]Symbol{ {"DecryptPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]byte, error)"}, {"DecryptPKCS1v15SessionKey", Func, 0, "func(random io.Reader, priv *PrivateKey, ciphertext []byte, key []byte) error"}, {"EncryptOAEP", Func, 0, "func(hash hash.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error)"}, + {"EncryptOAEPWithOptions", Func, 26, "func(random io.Reader, pub *PublicKey, msg []byte, opts *OAEPOptions) ([]byte, error)"}, {"EncryptPKCS1v15", Func, 0, "func(random io.Reader, pub *PublicKey, msg []byte) ([]byte, error)"}, {"ErrDecryption", Var, 0, ""}, {"ErrMessageTooLong", Var, 0, ""}, @@ -921,6 +986,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*SessionState).Bytes", Method, 21, ""}, {"(AlertError).Error", Method, 21, ""}, {"(ClientAuthType).String", Method, 15, ""}, + {"(ClientSessionCache).Get", Method, 3, ""}, + {"(ClientSessionCache).Put", Method, 3, ""}, {"(CurveID).String", Method, 15, ""}, {"(QUICEncryptionLevel).String", Method, 21, ""}, {"(RecordHeaderError).Error", Method, 6, ""}, @@ -953,6 +1020,7 @@ var PackageSymbols = map[string][]Symbol{ {"ClientHelloInfo.CipherSuites", Field, 4, ""}, {"ClientHelloInfo.Conn", Field, 8, ""}, {"ClientHelloInfo.Extensions", Field, 24, ""}, + {"ClientHelloInfo.HelloRetryRequest", Field, 26, ""}, {"ClientHelloInfo.ServerName", Field, 4, ""}, {"ClientHelloInfo.SignatureSchemes", Field, 8, ""}, {"ClientHelloInfo.SupportedCurves", Field, 4, ""}, @@ -1001,6 +1069,7 @@ var PackageSymbols = map[string][]Symbol{ {"ConnectionState.DidResume", Field, 1, ""}, {"ConnectionState.ECHAccepted", Field, 23, ""}, {"ConnectionState.HandshakeComplete", Field, 0, ""}, + {"ConnectionState.HelloRetryRequest", Field, 26, ""}, {"ConnectionState.NegotiatedProtocol", Field, 0, ""}, {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0, ""}, {"ConnectionState.OCSPResponse", Field, 5, ""}, @@ -1055,8 +1124,10 @@ var PackageSymbols = map[string][]Symbol{ {"QUICEncryptionLevelEarly", Const, 21, ""}, {"QUICEncryptionLevelHandshake", Const, 21, ""}, {"QUICEncryptionLevelInitial", Const, 21, ""}, + {"QUICErrorEvent", Const, 26, ""}, {"QUICEvent", Type, 21, ""}, {"QUICEvent.Data", Field, 21, ""}, + {"QUICEvent.Err", Field, 26, ""}, {"QUICEvent.Kind", Field, 21, ""}, {"QUICEvent.Level", Field, 21, ""}, {"QUICEvent.SessionState", Field, 23, ""}, @@ -1151,8 +1222,10 @@ var PackageSymbols = map[string][]Symbol{ {"(*RevocationList).CheckSignatureFrom", Method, 19, ""}, {"(CertificateInvalidError).Error", Method, 0, ""}, {"(ConstraintViolationError).Error", Method, 0, ""}, + {"(ExtKeyUsage).String", Method, 26, ""}, {"(HostnameError).Error", Method, 0, ""}, {"(InsecureAlgorithmError).Error", Method, 6, ""}, + {"(KeyUsage).String", Method, 26, ""}, {"(OID).AppendBinary", Method, 24, ""}, {"(OID).AppendText", Method, 24, ""}, {"(OID).Equal", Method, 22, ""}, @@ -1516,6 +1589,9 @@ var PackageSymbols = map[string][]Symbol{ {"(NullInt64).Value", Method, 0, ""}, {"(NullString).Value", Method, 0, ""}, {"(NullTime).Value", Method, 13, ""}, + {"(Result).LastInsertId", Method, 0, ""}, + {"(Result).RowsAffected", Method, 0, ""}, + {"(Scanner).Scan", Method, 0, ""}, {"ColumnType", Type, 8, ""}, {"Conn", Type, 9, ""}, {"DB", Type, 0, ""}, @@ -1547,8 +1623,6 @@ var PackageSymbols = map[string][]Symbol{ {"NamedArg.Name", Field, 8, ""}, {"NamedArg.Value", Field, 8, ""}, {"Null", Type, 22, ""}, - {"Null.V", Field, 22, ""}, - {"Null.Valid", Field, 22, ""}, {"NullBool", Type, 0, ""}, {"NullBool.Bool", Field, 0, ""}, {"NullBool.Valid", Field, 0, ""}, @@ -1591,10 +1665,72 @@ var PackageSymbols = map[string][]Symbol{ {"TxOptions.ReadOnly", Field, 8, ""}, }, "database/sql/driver": { + {"(ColumnConverter).ColumnConverter", Method, 0, ""}, + {"(Conn).Begin", Method, 0, ""}, + {"(Conn).Close", Method, 0, ""}, + {"(Conn).Prepare", Method, 0, ""}, + {"(ConnBeginTx).BeginTx", Method, 8, ""}, + {"(ConnPrepareContext).PrepareContext", Method, 8, ""}, + {"(Connector).Connect", Method, 10, ""}, + {"(Connector).Driver", Method, 10, ""}, + {"(Driver).Open", Method, 0, ""}, + {"(DriverContext).OpenConnector", Method, 10, ""}, + {"(Execer).Exec", Method, 0, ""}, + {"(ExecerContext).ExecContext", Method, 8, ""}, + {"(NamedValueChecker).CheckNamedValue", Method, 9, ""}, {"(NotNull).ConvertValue", Method, 0, ""}, {"(Null).ConvertValue", Method, 0, ""}, + {"(Pinger).Ping", Method, 8, ""}, + {"(Queryer).Query", Method, 1, ""}, + {"(QueryerContext).QueryContext", Method, 8, ""}, + {"(Result).LastInsertId", Method, 0, ""}, + {"(Result).RowsAffected", Method, 0, ""}, + {"(Rows).Close", Method, 0, ""}, + {"(Rows).Columns", Method, 0, ""}, + {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, + {"(RowsColumnScanner).Close", Method, 26, ""}, + {"(RowsColumnScanner).Columns", Method, 26, ""}, + {"(RowsColumnScanner).Next", Method, 26, ""}, + {"(RowsColumnScanner).ScanColumn", Method, 26, ""}, + {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, + {"(RowsColumnTypeDatabaseTypeName).Next", Method, 8, ""}, + {"(RowsColumnTypeLength).Close", Method, 8, ""}, + {"(RowsColumnTypeLength).ColumnTypeLength", Method, 8, ""}, + {"(RowsColumnTypeLength).Columns", Method, 8, ""}, + {"(RowsColumnTypeLength).Next", Method, 8, ""}, + {"(RowsColumnTypeNullable).Close", Method, 8, ""}, + {"(RowsColumnTypeNullable).ColumnTypeNullable", Method, 8, ""}, + {"(RowsColumnTypeNullable).Columns", Method, 8, ""}, + {"(RowsColumnTypeNullable).Next", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Close", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).ColumnTypePrecisionScale", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Columns", Method, 8, ""}, + {"(RowsColumnTypePrecisionScale).Next", Method, 8, ""}, + {"(RowsColumnTypeScanType).Close", Method, 8, ""}, + {"(RowsColumnTypeScanType).ColumnTypeScanType", Method, 8, ""}, + {"(RowsColumnTypeScanType).Columns", Method, 8, ""}, + {"(RowsColumnTypeScanType).Next", Method, 8, ""}, + {"(RowsNextResultSet).Close", Method, 8, ""}, + {"(RowsNextResultSet).Columns", Method, 8, ""}, + {"(RowsNextResultSet).HasNextResultSet", Method, 8, ""}, + {"(RowsNextResultSet).Next", Method, 8, ""}, + {"(RowsNextResultSet).NextResultSet", Method, 8, ""}, + {"(SessionResetter).ResetSession", Method, 10, ""}, + {"(Stmt).Close", Method, 0, ""}, + {"(Stmt).Exec", Method, 0, ""}, + {"(Stmt).NumInput", Method, 0, ""}, + {"(Stmt).Query", Method, 0, ""}, + {"(StmtExecContext).ExecContext", Method, 8, ""}, + {"(StmtQueryContext).QueryContext", Method, 8, ""}, + {"(Tx).Commit", Method, 0, ""}, + {"(Tx).Rollback", Method, 0, ""}, + {"(Validator).IsValid", Method, 15, ""}, + {"(ValueConverter).ConvertValue", Method, 0, ""}, + {"(Valuer).Value", Method, 0, ""}, {"Bool", Var, 0, ""}, {"ColumnConverter", Type, 0, ""}, {"Conn", Type, 0, ""}, @@ -1756,6 +1892,9 @@ var PackageSymbols = map[string][]Symbol{ {"(DecodeError).Error", Method, 0, ""}, {"(Tag).GoString", Method, 0, ""}, {"(Tag).String", Method, 0, ""}, + {"(Type).Common", Method, 0, ""}, + {"(Type).Size", Method, 0, ""}, + {"(Type).String", Method, 0, ""}, {"AddrType", Type, 0, ""}, {"AddrType.BasicType", Field, 0, ""}, {"ArrayType", Type, 0, ""}, @@ -3163,6 +3302,7 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_B16", Const, 20, ""}, {"R_LARCH_B21", Const, 20, ""}, {"R_LARCH_B26", Const, 20, ""}, + {"R_LARCH_CALL36", Const, 26, ""}, {"R_LARCH_CFA", Const, 22, ""}, {"R_LARCH_COPY", Const, 19, ""}, {"R_LARCH_DELETE", Const, 22, ""}, @@ -3220,11 +3360,25 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_SUB64", Const, 19, ""}, {"R_LARCH_SUB8", Const, 19, ""}, {"R_LARCH_SUB_ULEB128", Const, 22, ""}, + {"R_LARCH_TLS_DESC32", Const, 26, ""}, + {"R_LARCH_TLS_DESC64", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_HI12", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_LO20", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_PC_HI12", Const, 26, ""}, + {"R_LARCH_TLS_DESC64_PC_LO20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_CALL", Const, 26, ""}, + {"R_LARCH_TLS_DESC_HI20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_LD", Const, 26, ""}, + {"R_LARCH_TLS_DESC_LO12", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PCREL20_S2", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PC_HI20", Const, 26, ""}, + {"R_LARCH_TLS_DESC_PC_LO12", Const, 26, ""}, {"R_LARCH_TLS_DTPMOD32", Const, 19, ""}, {"R_LARCH_TLS_DTPMOD64", Const, 19, ""}, {"R_LARCH_TLS_DTPREL32", Const, 19, ""}, {"R_LARCH_TLS_DTPREL64", Const, 19, ""}, {"R_LARCH_TLS_GD_HI20", Const, 20, ""}, + {"R_LARCH_TLS_GD_PCREL20_S2", Const, 26, ""}, {"R_LARCH_TLS_GD_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_IE64_HI12", Const, 20, ""}, {"R_LARCH_TLS_IE64_LO20", Const, 20, ""}, @@ -3235,11 +3389,15 @@ var PackageSymbols = map[string][]Symbol{ {"R_LARCH_TLS_IE_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_IE_PC_LO12", Const, 20, ""}, {"R_LARCH_TLS_LD_HI20", Const, 20, ""}, + {"R_LARCH_TLS_LD_PCREL20_S2", Const, 26, ""}, {"R_LARCH_TLS_LD_PC_HI20", Const, 20, ""}, {"R_LARCH_TLS_LE64_HI12", Const, 20, ""}, {"R_LARCH_TLS_LE64_LO20", Const, 20, ""}, + {"R_LARCH_TLS_LE_ADD_R", Const, 26, ""}, {"R_LARCH_TLS_LE_HI20", Const, 20, ""}, + {"R_LARCH_TLS_LE_HI20_R", Const, 26, ""}, {"R_LARCH_TLS_LE_LO12", Const, 20, ""}, + {"R_LARCH_TLS_LE_LO12_R", Const, 26, ""}, {"R_LARCH_TLS_TPREL32", Const, 19, ""}, {"R_LARCH_TLS_TPREL64", Const, 19, ""}, {"R_MIPS", Type, 6, ""}, @@ -3944,6 +4102,7 @@ var PackageSymbols = map[string][]Symbol{ {"(FatArch).ImportedSymbols", Method, 3, ""}, {"(FatArch).Section", Method, 3, ""}, {"(FatArch).Segment", Method, 3, ""}, + {"(Load).Raw", Method, 0, ""}, {"(LoadBytes).Raw", Method, 0, ""}, {"(LoadCmd).GoString", Method, 0, ""}, {"(LoadCmd).String", Method, 0, ""}, @@ -4590,6 +4749,12 @@ var PackageSymbols = map[string][]Symbol{ {"FS", Type, 16, ""}, }, "encoding": { + {"(BinaryAppender).AppendBinary", Method, 24, ""}, + {"(BinaryMarshaler).MarshalBinary", Method, 2, ""}, + {"(BinaryUnmarshaler).UnmarshalBinary", Method, 2, ""}, + {"(TextAppender).AppendText", Method, 24, ""}, + {"(TextMarshaler).MarshalText", Method, 2, ""}, + {"(TextUnmarshaler).UnmarshalText", Method, 2, ""}, {"BinaryAppender", Type, 24, ""}, {"BinaryMarshaler", Type, 2, ""}, {"BinaryUnmarshaler", Type, 2, ""}, @@ -4705,6 +4870,17 @@ var PackageSymbols = map[string][]Symbol{ {"URLEncoding", Var, 0, ""}, }, "encoding/binary": { + {"(AppendByteOrder).AppendUint16", Method, 19, ""}, + {"(AppendByteOrder).AppendUint32", Method, 19, ""}, + {"(AppendByteOrder).AppendUint64", Method, 19, ""}, + {"(AppendByteOrder).String", Method, 19, ""}, + {"(ByteOrder).PutUint16", Method, 0, ""}, + {"(ByteOrder).PutUint32", Method, 0, ""}, + {"(ByteOrder).PutUint64", Method, 0, ""}, + {"(ByteOrder).String", Method, 0, ""}, + {"(ByteOrder).Uint16", Method, 0, ""}, + {"(ByteOrder).Uint32", Method, 0, ""}, + {"(ByteOrder).Uint64", Method, 0, ""}, {"Append", Func, 23, "func(buf []byte, order ByteOrder, data any) ([]byte, error)"}, {"AppendByteOrder", Type, 19, ""}, {"AppendUvarint", Func, 19, "func(buf []byte, x uint64) []byte"}, @@ -4767,6 +4943,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*Decoder).DecodeValue", Method, 0, ""}, {"(*Encoder).Encode", Method, 0, ""}, {"(*Encoder).EncodeValue", Method, 0, ""}, + {"(GobDecoder).GobDecode", Method, 0, ""}, + {"(GobEncoder).GobEncode", Method, 0, ""}, {"CommonType", Type, 0, ""}, {"CommonType.Id", Field, 0, ""}, {"CommonType.Name", Field, 0, ""}, @@ -4819,10 +4997,12 @@ var PackageSymbols = map[string][]Symbol{ {"(*UnsupportedTypeError).Error", Method, 0, ""}, {"(*UnsupportedValueError).Error", Method, 0, ""}, {"(Delim).String", Method, 5, ""}, + {"(Marshaler).MarshalJSON", Method, 0, ""}, {"(Number).Float64", Method, 1, ""}, {"(Number).Int64", Method, 1, ""}, {"(Number).String", Method, 1, ""}, {"(RawMessage).MarshalJSON", Method, 8, ""}, + {"(Unmarshaler).UnmarshalJSON", Method, 0, ""}, {"Compact", Func, 0, "func(dst *bytes.Buffer, src []byte) error"}, {"Decoder", Type, 0, ""}, {"Delim", Type, 5, ""}, @@ -4894,10 +5074,15 @@ var PackageSymbols = map[string][]Symbol{ {"(CharData).Copy", Method, 0, ""}, {"(Comment).Copy", Method, 0, ""}, {"(Directive).Copy", Method, 0, ""}, + {"(Marshaler).MarshalXML", Method, 2, ""}, + {"(MarshalerAttr).MarshalXMLAttr", Method, 2, ""}, {"(ProcInst).Copy", Method, 0, ""}, {"(StartElement).Copy", Method, 0, ""}, {"(StartElement).End", Method, 2, ""}, + {"(TokenReader).Token", Method, 10, ""}, {"(UnmarshalError).Error", Method, 0, ""}, + {"(Unmarshaler).UnmarshalXML", Method, 2, ""}, + {"(UnmarshalerAttr).UnmarshalXMLAttr", Method, 2, ""}, {"Attr", Type, 0, ""}, {"Attr.Name", Field, 0, ""}, {"Attr.Value", Field, 0, ""}, @@ -4984,6 +5169,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*String).Value", Method, 8, ""}, {"(Func).String", Method, 0, ""}, {"(Func).Value", Method, 8, ""}, + {"(Var).String", Method, 0, ""}, {"Do", Func, 0, "func(f func(KeyValue))"}, {"Float", Type, 0, ""}, {"Func", Type, 0, ""}, @@ -5039,6 +5225,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*FlagSet).Var", Method, 0, ""}, {"(*FlagSet).Visit", Method, 0, ""}, {"(*FlagSet).VisitAll", Method, 0, ""}, + {"(Getter).Get", Method, 2, ""}, + {"(Getter).Set", Method, 2, ""}, + {"(Getter).String", Method, 2, ""}, + {"(Value).Set", Method, 0, ""}, + {"(Value).String", Method, 0, ""}, {"Arg", Func, 0, "func(i int) string"}, {"Args", Func, 0, "func() []string"}, {"Bool", Func, 0, "func(name string, value bool, usage string) *bool"}, @@ -5090,6 +5281,20 @@ var PackageSymbols = map[string][]Symbol{ {"VisitAll", Func, 0, "func(fn func(*Flag))"}, }, "fmt": { + {"(Formatter).Format", Method, 0, ""}, + {"(GoStringer).GoString", Method, 0, ""}, + {"(ScanState).Read", Method, 0, ""}, + {"(ScanState).ReadRune", Method, 0, ""}, + {"(ScanState).SkipSpace", Method, 0, ""}, + {"(ScanState).Token", Method, 0, ""}, + {"(ScanState).UnreadRune", Method, 0, ""}, + {"(ScanState).Width", Method, 0, ""}, + {"(Scanner).Scan", Method, 0, ""}, + {"(State).Flag", Method, 0, ""}, + {"(State).Precision", Method, 0, ""}, + {"(State).Width", Method, 0, ""}, + {"(State).Write", Method, 0, ""}, + {"(Stringer).String", Method, 0, ""}, {"Append", Func, 19, "func(b []byte, a ...any) []byte"}, {"Appendf", Func, 19, "func(b []byte, format string, a ...any) []byte"}, {"Appendln", Func, 19, "func(b []byte, a ...any) []byte"}, @@ -5248,7 +5453,18 @@ var PackageSymbols = map[string][]Symbol{ {"(CommentMap).Filter", Method, 1, ""}, {"(CommentMap).String", Method, 1, ""}, {"(CommentMap).Update", Method, 1, ""}, + {"(Decl).End", Method, 0, ""}, + {"(Decl).Pos", Method, 0, ""}, + {"(Expr).End", Method, 0, ""}, + {"(Expr).Pos", Method, 0, ""}, + {"(Node).End", Method, 0, ""}, + {"(Node).Pos", Method, 0, ""}, {"(ObjKind).String", Method, 0, ""}, + {"(Spec).End", Method, 0, ""}, + {"(Spec).Pos", Method, 0, ""}, + {"(Stmt).End", Method, 0, ""}, + {"(Stmt).Pos", Method, 0, ""}, + {"(Visitor).Visit", Method, 0, ""}, {"ArrayType", Type, 0, ""}, {"ArrayType.Elt", Field, 0, ""}, {"ArrayType.Lbrack", Field, 0, ""}, @@ -5271,6 +5487,7 @@ var PackageSymbols = map[string][]Symbol{ {"BasicLit", Type, 0, ""}, {"BasicLit.Kind", Field, 0, ""}, {"BasicLit.Value", Field, 0, ""}, + {"BasicLit.ValueEnd", Field, 26, ""}, {"BasicLit.ValuePos", Field, 0, ""}, {"BinaryExpr", Type, 0, ""}, {"BinaryExpr.Op", Field, 0, ""}, @@ -5320,7 +5537,6 @@ var PackageSymbols = map[string][]Symbol{ {"CompositeLit.Rbrace", Field, 0, ""}, {"CompositeLit.Type", Field, 0, ""}, {"Con", Const, 0, ""}, - {"Decl", Type, 0, ""}, {"DeclStmt", Type, 0, ""}, {"DeclStmt.Decl", Field, 0, ""}, {"DeferStmt", Type, 0, ""}, @@ -5341,7 +5557,6 @@ var PackageSymbols = map[string][]Symbol{ {"EmptyStmt", Type, 0, ""}, {"EmptyStmt.Implicit", Field, 5, ""}, {"EmptyStmt.Semicolon", Field, 0, ""}, - {"Expr", Type, 0, ""}, {"ExprStmt", Type, 0, ""}, {"ExprStmt.X", Field, 0, ""}, {"Field", Type, 0, ""}, @@ -5525,11 +5740,9 @@ var PackageSymbols = map[string][]Symbol{ {"SliceExpr.Slice3", Field, 2, ""}, {"SliceExpr.X", Field, 0, ""}, {"SortImports", Func, 0, "func(fset *token.FileSet, f *File)"}, - {"Spec", Type, 0, ""}, {"StarExpr", Type, 0, ""}, {"StarExpr.Star", Field, 0, ""}, {"StarExpr.X", Field, 0, ""}, - {"Stmt", Type, 0, ""}, {"StructType", Type, 0, ""}, {"StructType.Fields", Field, 0, ""}, {"StructType.Incomplete", Field, 0, ""}, @@ -5684,10 +5897,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*SyntaxError).Error", Method, 16, ""}, {"(*TagExpr).Eval", Method, 16, ""}, {"(*TagExpr).String", Method, 16, ""}, + {"(Expr).Eval", Method, 16, ""}, + {"(Expr).String", Method, 16, ""}, {"AndExpr", Type, 16, ""}, {"AndExpr.X", Field, 16, ""}, {"AndExpr.Y", Field, 16, ""}, - {"Expr", Type, 16, ""}, {"GoVersion", Func, 21, "func(x Expr) string"}, {"IsGoBuild", Func, 16, "func(line string) bool"}, {"IsPlusBuild", Func, 16, "func(line string) bool"}, @@ -5706,6 +5920,9 @@ var PackageSymbols = map[string][]Symbol{ }, "go/constant": { {"(Kind).String", Method, 18, ""}, + {"(Value).ExactString", Method, 6, ""}, + {"(Value).Kind", Method, 5, ""}, + {"(Value).String", Method, 5, ""}, {"BinaryOp", Func, 5, "func(x_ Value, op token.Token, y_ Value) Value"}, {"BitLen", Func, 5, "func(x Value) int"}, {"Bool", Const, 5, ""}, @@ -5744,7 +5961,6 @@ var PackageSymbols = map[string][]Symbol{ {"UnaryOp", Func, 5, "func(op token.Token, y Value, prec uint) Value"}, {"Unknown", Const, 5, ""}, {"Val", Func, 13, "func(x Value) any"}, - {"Value", Type, 5, ""}, }, "go/doc": { {"(*Package).Filter", Method, 0, ""}, @@ -5828,7 +6044,6 @@ var PackageSymbols = map[string][]Symbol{ {"(*Printer).HTML", Method, 19, ""}, {"(*Printer).Markdown", Method, 19, ""}, {"(*Printer).Text", Method, 19, ""}, - {"Block", Type, 19, ""}, {"Code", Type, 19, ""}, {"Code.Text", Field, 19, ""}, {"DefaultLookupPackage", Func, 19, "func(name string) (importPath string, ok bool)"}, @@ -5873,7 +6088,6 @@ var PackageSymbols = map[string][]Symbol{ {"Printer.TextCodePrefix", Field, 19, ""}, {"Printer.TextPrefix", Field, 19, ""}, {"Printer.TextWidth", Field, 19, ""}, - {"Text", Type, 19, ""}, }, "go/format": { {"Node", Func, 1, "func(dst io.Writer, fset *token.FileSet, node any) error"}, @@ -5945,6 +6159,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*File).AddLineColumnInfo", Method, 11, ""}, {"(*File).AddLineInfo", Method, 0, ""}, {"(*File).Base", Method, 0, ""}, + {"(*File).End", Method, 26, ""}, {"(*File).Line", Method, 0, ""}, {"(*File).LineCount", Method, 0, ""}, {"(*File).LineStart", Method, 12, ""}, @@ -6307,6 +6522,22 @@ var PackageSymbols = map[string][]Symbol{ {"(Checker).PkgNameOf", Method, 22, ""}, {"(Checker).TypeOf", Method, 5, ""}, {"(Error).Error", Method, 5, ""}, + {"(Importer).Import", Method, 5, ""}, + {"(ImporterFrom).Import", Method, 6, ""}, + {"(ImporterFrom).ImportFrom", Method, 6, ""}, + {"(Object).Exported", Method, 5, ""}, + {"(Object).Id", Method, 5, ""}, + {"(Object).Name", Method, 5, ""}, + {"(Object).Parent", Method, 5, ""}, + {"(Object).Pkg", Method, 5, ""}, + {"(Object).Pos", Method, 5, ""}, + {"(Object).String", Method, 5, ""}, + {"(Object).Type", Method, 5, ""}, + {"(Sizes).Alignof", Method, 5, ""}, + {"(Sizes).Offsetsof", Method, 5, ""}, + {"(Sizes).Sizeof", Method, 5, ""}, + {"(Type).String", Method, 5, ""}, + {"(Type).Underlying", Method, 5, ""}, {"(TypeAndValue).Addressable", Method, 5, ""}, {"(TypeAndValue).Assignable", Method, 5, ""}, {"(TypeAndValue).HasOk", Method, 5, ""}, @@ -6445,7 +6676,6 @@ var PackageSymbols = map[string][]Symbol{ {"NewUnion", Func, 18, "func(terms []*Term) *Union"}, {"NewVar", Func, 5, "func(pos token.Pos, pkg *Package, name string, typ Type) *Var"}, {"Nil", Type, 5, ""}, - {"Object", Type, 5, ""}, {"ObjectString", Func, 5, "func(obj Object, qf Qualifier) string"}, {"Package", Type, 5, ""}, {"PackageVar", Const, 25, ""}, @@ -6516,6 +6746,33 @@ var PackageSymbols = map[string][]Symbol{ {"Lang", Func, 22, "func(x string) string"}, }, "hash": { + {"(Cloner).BlockSize", Method, 25, ""}, + {"(Cloner).Clone", Method, 25, ""}, + {"(Cloner).Reset", Method, 25, ""}, + {"(Cloner).Size", Method, 25, ""}, + {"(Cloner).Sum", Method, 25, ""}, + {"(Cloner).Write", Method, 25, ""}, + {"(Hash).BlockSize", Method, 0, ""}, + {"(Hash).Reset", Method, 0, ""}, + {"(Hash).Size", Method, 0, ""}, + {"(Hash).Sum", Method, 0, ""}, + {"(Hash).Write", Method, 0, ""}, + {"(Hash32).BlockSize", Method, 0, ""}, + {"(Hash32).Reset", Method, 0, ""}, + {"(Hash32).Size", Method, 0, ""}, + {"(Hash32).Sum", Method, 0, ""}, + {"(Hash32).Sum32", Method, 0, ""}, + {"(Hash32).Write", Method, 0, ""}, + {"(Hash64).BlockSize", Method, 0, ""}, + {"(Hash64).Reset", Method, 0, ""}, + {"(Hash64).Size", Method, 0, ""}, + {"(Hash64).Sum", Method, 0, ""}, + {"(Hash64).Sum64", Method, 0, ""}, + {"(Hash64).Write", Method, 0, ""}, + {"(XOF).BlockSize", Method, 25, ""}, + {"(XOF).Read", Method, 25, ""}, + {"(XOF).Reset", Method, 25, ""}, + {"(XOF).Write", Method, 25, ""}, {"Cloner", Type, 25, ""}, {"Hash", Type, 0, ""}, {"Hash32", Type, 0, ""}, @@ -6781,6 +7038,13 @@ var PackageSymbols = map[string][]Symbol{ {"(*YCbCr).SubImage", Method, 0, ""}, {"(*YCbCr).YCbCrAt", Method, 4, ""}, {"(*YCbCr).YOffset", Method, 0, ""}, + {"(Image).At", Method, 0, ""}, + {"(Image).Bounds", Method, 0, ""}, + {"(Image).ColorModel", Method, 0, ""}, + {"(PalettedImage).At", Method, 0, ""}, + {"(PalettedImage).Bounds", Method, 0, ""}, + {"(PalettedImage).ColorIndexAt", Method, 0, ""}, + {"(PalettedImage).ColorModel", Method, 0, ""}, {"(Point).Add", Method, 0, ""}, {"(Point).Div", Method, 0, ""}, {"(Point).Eq", Method, 0, ""}, @@ -6789,6 +7053,10 @@ var PackageSymbols = map[string][]Symbol{ {"(Point).Mul", Method, 0, ""}, {"(Point).String", Method, 0, ""}, {"(Point).Sub", Method, 0, ""}, + {"(RGBA64Image).At", Method, 17, ""}, + {"(RGBA64Image).Bounds", Method, 17, ""}, + {"(RGBA64Image).ColorModel", Method, 17, ""}, + {"(RGBA64Image).RGBA64At", Method, 17, ""}, {"(Rectangle).Add", Method, 0, ""}, {"(Rectangle).At", Method, 5, ""}, {"(Rectangle).Bounds", Method, 5, ""}, @@ -6913,8 +7181,10 @@ var PackageSymbols = map[string][]Symbol{ {"(Alpha).RGBA", Method, 0, ""}, {"(Alpha16).RGBA", Method, 0, ""}, {"(CMYK).RGBA", Method, 5, ""}, + {"(Color).RGBA", Method, 0, ""}, {"(Gray).RGBA", Method, 0, ""}, {"(Gray16).RGBA", Method, 0, ""}, + {"(Model).Convert", Method, 0, ""}, {"(NRGBA).RGBA", Method, 0, ""}, {"(NRGBA64).RGBA", Method, 0, ""}, {"(NYCbCrA).RGBA", Method, 6, ""}, @@ -6992,7 +7262,19 @@ var PackageSymbols = map[string][]Symbol{ {"WebSafe", Var, 2, ""}, }, "image/draw": { + {"(Drawer).Draw", Method, 2, ""}, + {"(Image).At", Method, 0, ""}, + {"(Image).Bounds", Method, 0, ""}, + {"(Image).ColorModel", Method, 0, ""}, + {"(Image).Set", Method, 0, ""}, {"(Op).Draw", Method, 2, ""}, + {"(Quantizer).Quantize", Method, 2, ""}, + {"(RGBA64Image).At", Method, 17, ""}, + {"(RGBA64Image).Bounds", Method, 17, ""}, + {"(RGBA64Image).ColorModel", Method, 17, ""}, + {"(RGBA64Image).RGBA64At", Method, 17, ""}, + {"(RGBA64Image).Set", Method, 17, ""}, + {"(RGBA64Image).SetRGBA64", Method, 17, ""}, {"Draw", Func, 0, "func(dst Image, r image.Rectangle, src image.Image, sp image.Point, op Op)"}, {"DrawMask", Func, 0, "func(dst Image, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op)"}, {"Drawer", Type, 2, ""}, @@ -7027,6 +7309,8 @@ var PackageSymbols = map[string][]Symbol{ }, "image/jpeg": { {"(FormatError).Error", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(Reader).ReadByte", Method, 0, ""}, {"(UnsupportedError).Error", Method, 0, ""}, {"Decode", Func, 0, "func(r io.Reader) (image.Image, error)"}, {"DecodeConfig", Func, 0, "func(r io.Reader) (image.Config, error)"}, @@ -7040,6 +7324,8 @@ var PackageSymbols = map[string][]Symbol{ }, "image/png": { {"(*Encoder).Encode", Method, 4, ""}, + {"(EncoderBufferPool).Get", Method, 9, ""}, + {"(EncoderBufferPool).Put", Method, 9, ""}, {"(FormatError).Error", Method, 0, ""}, {"(UnsupportedError).Error", Method, 0, ""}, {"BestCompression", Const, 4, ""}, @@ -7083,6 +7369,41 @@ var PackageSymbols = map[string][]Symbol{ {"(*SectionReader).ReadAt", Method, 0, ""}, {"(*SectionReader).Seek", Method, 0, ""}, {"(*SectionReader).Size", Method, 0, ""}, + {"(ByteReader).ReadByte", Method, 0, ""}, + {"(ByteScanner).ReadByte", Method, 0, ""}, + {"(ByteScanner).UnreadByte", Method, 0, ""}, + {"(ByteWriter).WriteByte", Method, 1, ""}, + {"(Closer).Close", Method, 0, ""}, + {"(ReadCloser).Close", Method, 0, ""}, + {"(ReadCloser).Read", Method, 0, ""}, + {"(ReadSeekCloser).Close", Method, 16, ""}, + {"(ReadSeekCloser).Read", Method, 16, ""}, + {"(ReadSeekCloser).Seek", Method, 16, ""}, + {"(ReadSeeker).Read", Method, 0, ""}, + {"(ReadSeeker).Seek", Method, 0, ""}, + {"(ReadWriteCloser).Close", Method, 0, ""}, + {"(ReadWriteCloser).Read", Method, 0, ""}, + {"(ReadWriteCloser).Write", Method, 0, ""}, + {"(ReadWriteSeeker).Read", Method, 0, ""}, + {"(ReadWriteSeeker).Seek", Method, 0, ""}, + {"(ReadWriteSeeker).Write", Method, 0, ""}, + {"(ReadWriter).Read", Method, 0, ""}, + {"(ReadWriter).Write", Method, 0, ""}, + {"(Reader).Read", Method, 0, ""}, + {"(ReaderAt).ReadAt", Method, 0, ""}, + {"(ReaderFrom).ReadFrom", Method, 0, ""}, + {"(RuneReader).ReadRune", Method, 0, ""}, + {"(RuneScanner).ReadRune", Method, 0, ""}, + {"(RuneScanner).UnreadRune", Method, 0, ""}, + {"(Seeker).Seek", Method, 0, ""}, + {"(StringWriter).WriteString", Method, 12, ""}, + {"(WriteCloser).Close", Method, 0, ""}, + {"(WriteCloser).Write", Method, 0, ""}, + {"(WriteSeeker).Seek", Method, 0, ""}, + {"(WriteSeeker).Write", Method, 0, ""}, + {"(Writer).Write", Method, 0, ""}, + {"(WriterAt).WriteAt", Method, 0, ""}, + {"(WriterTo).WriteTo", Method, 0, ""}, {"ByteReader", Type, 0, ""}, {"ByteScanner", Type, 0, ""}, {"ByteWriter", Type, 1, ""}, @@ -7142,11 +7463,42 @@ var PackageSymbols = map[string][]Symbol{ {"(*PathError).Error", Method, 16, ""}, {"(*PathError).Timeout", Method, 16, ""}, {"(*PathError).Unwrap", Method, 16, ""}, + {"(DirEntry).Info", Method, 16, ""}, + {"(DirEntry).IsDir", Method, 16, ""}, + {"(DirEntry).Name", Method, 16, ""}, + {"(DirEntry).Type", Method, 16, ""}, + {"(FS).Open", Method, 16, ""}, + {"(File).Close", Method, 16, ""}, + {"(File).Read", Method, 16, ""}, + {"(File).Stat", Method, 16, ""}, + {"(FileInfo).IsDir", Method, 16, ""}, + {"(FileInfo).ModTime", Method, 16, ""}, + {"(FileInfo).Mode", Method, 16, ""}, + {"(FileInfo).Name", Method, 16, ""}, + {"(FileInfo).Size", Method, 16, ""}, + {"(FileInfo).Sys", Method, 16, ""}, {"(FileMode).IsDir", Method, 16, ""}, {"(FileMode).IsRegular", Method, 16, ""}, {"(FileMode).Perm", Method, 16, ""}, {"(FileMode).String", Method, 16, ""}, {"(FileMode).Type", Method, 16, ""}, + {"(GlobFS).Glob", Method, 16, ""}, + {"(GlobFS).Open", Method, 16, ""}, + {"(ReadDirFS).Open", Method, 16, ""}, + {"(ReadDirFS).ReadDir", Method, 16, ""}, + {"(ReadDirFile).Close", Method, 16, ""}, + {"(ReadDirFile).Read", Method, 16, ""}, + {"(ReadDirFile).ReadDir", Method, 16, ""}, + {"(ReadDirFile).Stat", Method, 16, ""}, + {"(ReadFileFS).Open", Method, 16, ""}, + {"(ReadFileFS).ReadFile", Method, 16, ""}, + {"(ReadLinkFS).Lstat", Method, 25, ""}, + {"(ReadLinkFS).Open", Method, 25, ""}, + {"(ReadLinkFS).ReadLink", Method, 25, ""}, + {"(StatFS).Open", Method, 16, ""}, + {"(StatFS).Stat", Method, 16, ""}, + {"(SubFS).Open", Method, 16, ""}, + {"(SubFS).Sub", Method, 16, ""}, {"DirEntry", Type, 16, ""}, {"ErrClosed", Var, 16, ""}, {"ErrExist", Var, 16, ""}, @@ -7299,12 +7651,18 @@ var PackageSymbols = map[string][]Symbol{ {"(*TextHandler).WithGroup", Method, 21, ""}, {"(Attr).Equal", Method, 21, ""}, {"(Attr).String", Method, 21, ""}, + {"(Handler).Enabled", Method, 21, ""}, + {"(Handler).Handle", Method, 21, ""}, + {"(Handler).WithAttrs", Method, 21, ""}, + {"(Handler).WithGroup", Method, 21, ""}, {"(Kind).String", Method, 21, ""}, {"(Level).AppendText", Method, 24, ""}, {"(Level).Level", Method, 21, ""}, {"(Level).MarshalJSON", Method, 21, ""}, {"(Level).MarshalText", Method, 21, ""}, {"(Level).String", Method, 21, ""}, + {"(Leveler).Level", Method, 21, ""}, + {"(LogValuer).LogValue", Method, 21, ""}, {"(Record).Attrs", Method, 21, ""}, {"(Record).Clone", Method, 21, ""}, {"(Record).NumAttrs", Method, 21, ""}, @@ -7833,6 +8191,11 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).Uint32", Method, 0, ""}, {"(*Rand).Uint64", Method, 8, ""}, {"(*Zipf).Uint64", Method, 0, ""}, + {"(Source).Int63", Method, 0, ""}, + {"(Source).Seed", Method, 0, ""}, + {"(Source64).Int63", Method, 8, ""}, + {"(Source64).Seed", Method, 8, ""}, + {"(Source64).Uint64", Method, 8, ""}, {"ExpFloat64", Func, 0, "func() float64"}, {"Float32", Func, 0, "func() float32"}, {"Float64", Func, 0, "func() float64"}, @@ -7888,6 +8251,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).Uint64N", Method, 22, ""}, {"(*Rand).UintN", Method, 22, ""}, {"(*Zipf).Uint64", Method, 22, ""}, + {"(Source).Uint64", Method, 22, ""}, {"ChaCha8", Type, 22, ""}, {"ExpFloat64", Func, 22, "func() float64"}, {"Float32", Func, 22, "func() float32"}, @@ -7951,6 +8315,10 @@ var PackageSymbols = map[string][]Symbol{ {"(*Writer).FormDataContentType", Method, 0, ""}, {"(*Writer).SetBoundary", Method, 1, ""}, {"(*Writer).WriteField", Method, 0, ""}, + {"(File).Close", Method, 0, ""}, + {"(File).Read", Method, 0, ""}, + {"(File).ReadAt", Method, 0, ""}, + {"(File).Seek", Method, 0, ""}, {"ErrMessageTooLarge", Var, 9, ""}, {"File", Type, 0, ""}, {"FileContentDisposition", Func, 25, "func(fieldname string, filename string) string"}, @@ -8135,6 +8503,19 @@ var PackageSymbols = map[string][]Symbol{ {"(*UnixListener).SetDeadline", Method, 0, ""}, {"(*UnixListener).SetUnlinkOnClose", Method, 8, ""}, {"(*UnixListener).SyscallConn", Method, 10, ""}, + {"(Addr).Network", Method, 0, ""}, + {"(Addr).String", Method, 0, ""}, + {"(Conn).Close", Method, 0, ""}, + {"(Conn).LocalAddr", Method, 0, ""}, + {"(Conn).Read", Method, 0, ""}, + {"(Conn).RemoteAddr", Method, 0, ""}, + {"(Conn).SetDeadline", Method, 0, ""}, + {"(Conn).SetReadDeadline", Method, 0, ""}, + {"(Conn).SetWriteDeadline", Method, 0, ""}, + {"(Conn).Write", Method, 0, ""}, + {"(Error).Error", Method, 0, ""}, + {"(Error).Temporary", Method, 0, ""}, + {"(Error).Timeout", Method, 0, ""}, {"(Flags).String", Method, 0, ""}, {"(HardwareAddr).String", Method, 0, ""}, {"(IP).AppendText", Method, 24, ""}, @@ -8158,6 +8539,16 @@ var PackageSymbols = map[string][]Symbol{ {"(InvalidAddrError).Error", Method, 0, ""}, {"(InvalidAddrError).Temporary", Method, 0, ""}, {"(InvalidAddrError).Timeout", Method, 0, ""}, + {"(Listener).Accept", Method, 0, ""}, + {"(Listener).Addr", Method, 0, ""}, + {"(Listener).Close", Method, 0, ""}, + {"(PacketConn).Close", Method, 0, ""}, + {"(PacketConn).LocalAddr", Method, 0, ""}, + {"(PacketConn).ReadFrom", Method, 0, ""}, + {"(PacketConn).SetDeadline", Method, 0, ""}, + {"(PacketConn).SetReadDeadline", Method, 0, ""}, + {"(PacketConn).SetWriteDeadline", Method, 0, ""}, + {"(PacketConn).WriteTo", Method, 0, ""}, {"(UnknownNetworkError).Error", Method, 0, ""}, {"(UnknownNetworkError).Temporary", Method, 0, ""}, {"(UnknownNetworkError).Timeout", Method, 0, ""}, @@ -8333,6 +8724,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Client).Head", Method, 0, ""}, {"(*Client).Post", Method, 0, ""}, {"(*Client).PostForm", Method, 0, ""}, + {"(*ClientConn).Available", Method, 26, ""}, + {"(*ClientConn).Close", Method, 26, ""}, + {"(*ClientConn).Err", Method, 26, ""}, + {"(*ClientConn).InFlight", Method, 26, ""}, + {"(*ClientConn).Release", Method, 26, ""}, + {"(*ClientConn).Reserve", Method, 26, ""}, + {"(*ClientConn).RoundTrip", Method, 26, ""}, + {"(*ClientConn).SetStateHook", Method, 26, ""}, {"(*Cookie).String", Method, 0, ""}, {"(*Cookie).Valid", Method, 18, ""}, {"(*CrossOriginProtection).AddInsecureBypassPattern", Method, 25, ""}, @@ -8392,10 +8791,22 @@ var PackageSymbols = map[string][]Symbol{ {"(*Transport).CancelRequest", Method, 1, ""}, {"(*Transport).Clone", Method, 13, ""}, {"(*Transport).CloseIdleConnections", Method, 0, ""}, + {"(*Transport).NewClientConn", Method, 26, ""}, {"(*Transport).RegisterProtocol", Method, 0, ""}, {"(*Transport).RoundTrip", Method, 0, ""}, + {"(CloseNotifier).CloseNotify", Method, 1, ""}, {"(ConnState).String", Method, 3, ""}, + {"(CookieJar).Cookies", Method, 0, ""}, + {"(CookieJar).SetCookies", Method, 0, ""}, {"(Dir).Open", Method, 0, ""}, + {"(File).Close", Method, 0, ""}, + {"(File).Read", Method, 0, ""}, + {"(File).Readdir", Method, 0, ""}, + {"(File).Seek", Method, 0, ""}, + {"(File).Stat", Method, 0, ""}, + {"(FileSystem).Open", Method, 0, ""}, + {"(Flusher).Flush", Method, 0, ""}, + {"(Handler).ServeHTTP", Method, 0, ""}, {"(HandlerFunc).ServeHTTP", Method, 0, ""}, {"(Header).Add", Method, 0, ""}, {"(Header).Clone", Method, 13, ""}, @@ -8405,10 +8816,16 @@ var PackageSymbols = map[string][]Symbol{ {"(Header).Values", Method, 14, ""}, {"(Header).Write", Method, 0, ""}, {"(Header).WriteSubset", Method, 0, ""}, + {"(Hijacker).Hijack", Method, 0, ""}, {"(Protocols).HTTP1", Method, 24, ""}, {"(Protocols).HTTP2", Method, 24, ""}, {"(Protocols).String", Method, 24, ""}, {"(Protocols).UnencryptedHTTP2", Method, 24, ""}, + {"(Pusher).Push", Method, 8, ""}, + {"(ResponseWriter).Header", Method, 0, ""}, + {"(ResponseWriter).Write", Method, 0, ""}, + {"(ResponseWriter).WriteHeader", Method, 0, ""}, + {"(RoundTripper).RoundTrip", Method, 0, ""}, {"AllowQuerySemicolons", Func, 17, "func(h Handler) Handler"}, {"CanonicalHeaderKey", Func, 0, "func(s string) string"}, {"Client", Type, 0, ""}, @@ -8416,6 +8833,7 @@ var PackageSymbols = map[string][]Symbol{ {"Client.Jar", Field, 0, ""}, {"Client.Timeout", Field, 3, ""}, {"Client.Transport", Field, 0, ""}, + {"ClientConn", Type, 26, ""}, {"CloseNotifier", Type, 1, ""}, {"ConnState", Type, 3, ""}, {"Cookie", Type, 0, ""}, @@ -8726,6 +9144,8 @@ var PackageSymbols = map[string][]Symbol{ "net/http/cookiejar": { {"(*Jar).Cookies", Method, 1, ""}, {"(*Jar).SetCookies", Method, 1, ""}, + {"(PublicSuffixList).PublicSuffix", Method, 1, ""}, + {"(PublicSuffixList).String", Method, 1, ""}, {"Jar", Type, 1, ""}, {"New", Func, 1, "func(o *Options) (*Jar, error)"}, {"Options", Type, 1, ""}, @@ -8819,6 +9239,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*ServerConn).Pending", Method, 0, ""}, {"(*ServerConn).Read", Method, 0, ""}, {"(*ServerConn).Write", Method, 0, ""}, + {"(BufferPool).Get", Method, 6, ""}, + {"(BufferPool).Put", Method, 6, ""}, {"BufferPool", Type, 6, ""}, {"ClientConn", Type, 0, ""}, {"DumpRequest", Func, 0, "func(req *http.Request, body bool) ([]byte, error)"}, @@ -8972,6 +9394,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Server).ServeConn", Method, 0, ""}, {"(*Server).ServeHTTP", Method, 0, ""}, {"(*Server).ServeRequest", Method, 0, ""}, + {"(ClientCodec).Close", Method, 0, ""}, + {"(ClientCodec).ReadResponseBody", Method, 0, ""}, + {"(ClientCodec).ReadResponseHeader", Method, 0, ""}, + {"(ClientCodec).WriteRequest", Method, 0, ""}, + {"(ServerCodec).Close", Method, 0, ""}, + {"(ServerCodec).ReadRequestBody", Method, 0, ""}, + {"(ServerCodec).ReadRequestHeader", Method, 0, ""}, + {"(ServerCodec).WriteResponse", Method, 0, ""}, {"(ServerError).Error", Method, 0, ""}, {"Accept", Func, 0, "func(lis net.Listener)"}, {"Call", Type, 0, ""}, @@ -9030,6 +9460,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*Client).StartTLS", Method, 0, ""}, {"(*Client).TLSConnectionState", Method, 5, ""}, {"(*Client).Verify", Method, 0, ""}, + {"(Auth).Next", Method, 0, ""}, + {"(Auth).Start", Method, 0, ""}, {"Auth", Type, 0, ""}, {"CRAMMD5Auth", Func, 0, "func(username string, secret string) Auth"}, {"Client", Type, 0, ""}, @@ -9241,10 +9673,18 @@ var PackageSymbols = map[string][]Symbol{ {"(*SyscallError).Error", Method, 0, ""}, {"(*SyscallError).Timeout", Method, 10, ""}, {"(*SyscallError).Unwrap", Method, 13, ""}, + {"(FileInfo).IsDir", Method, 0, ""}, + {"(FileInfo).ModTime", Method, 0, ""}, + {"(FileInfo).Mode", Method, 0, ""}, + {"(FileInfo).Name", Method, 0, ""}, + {"(FileInfo).Size", Method, 0, ""}, + {"(FileInfo).Sys", Method, 0, ""}, {"(FileMode).IsDir", Method, 0, ""}, {"(FileMode).IsRegular", Method, 1, ""}, {"(FileMode).Perm", Method, 0, ""}, {"(FileMode).String", Method, 0, ""}, + {"(Signal).Signal", Method, 0, ""}, + {"(Signal).String", Method, 0, ""}, {"Args", Var, 0, ""}, {"Chdir", Func, 0, "func(dir string) error"}, {"Chmod", Func, 0, "func(name string, mode FileMode) error"}, @@ -9521,6 +9961,45 @@ var PackageSymbols = map[string][]Symbol{ {"(StructField).IsExported", Method, 17, ""}, {"(StructTag).Get", Method, 0, ""}, {"(StructTag).Lookup", Method, 7, ""}, + {"(Type).Align", Method, 0, ""}, + {"(Type).AssignableTo", Method, 0, ""}, + {"(Type).Bits", Method, 0, ""}, + {"(Type).CanSeq", Method, 23, ""}, + {"(Type).CanSeq2", Method, 23, ""}, + {"(Type).ChanDir", Method, 0, ""}, + {"(Type).Comparable", Method, 4, ""}, + {"(Type).ConvertibleTo", Method, 1, ""}, + {"(Type).Elem", Method, 0, ""}, + {"(Type).Field", Method, 0, ""}, + {"(Type).FieldAlign", Method, 0, ""}, + {"(Type).FieldByIndex", Method, 0, ""}, + {"(Type).FieldByName", Method, 0, ""}, + {"(Type).FieldByNameFunc", Method, 0, ""}, + {"(Type).Fields", Method, 26, ""}, + {"(Type).Implements", Method, 0, ""}, + {"(Type).In", Method, 0, ""}, + {"(Type).Ins", Method, 26, ""}, + {"(Type).IsVariadic", Method, 0, ""}, + {"(Type).Key", Method, 0, ""}, + {"(Type).Kind", Method, 0, ""}, + {"(Type).Len", Method, 0, ""}, + {"(Type).Method", Method, 0, ""}, + {"(Type).MethodByName", Method, 0, ""}, + {"(Type).Methods", Method, 26, ""}, + {"(Type).Name", Method, 0, ""}, + {"(Type).NumField", Method, 0, ""}, + {"(Type).NumIn", Method, 0, ""}, + {"(Type).NumMethod", Method, 0, ""}, + {"(Type).NumOut", Method, 0, ""}, + {"(Type).Out", Method, 0, ""}, + {"(Type).Outs", Method, 26, ""}, + {"(Type).OverflowComplex", Method, 23, ""}, + {"(Type).OverflowFloat", Method, 23, ""}, + {"(Type).OverflowInt", Method, 23, ""}, + {"(Type).OverflowUint", Method, 23, ""}, + {"(Type).PkgPath", Method, 0, ""}, + {"(Type).Size", Method, 0, ""}, + {"(Type).String", Method, 0, ""}, {"(Value).Addr", Method, 0, ""}, {"(Value).Bool", Method, 0, ""}, {"(Value).Bytes", Method, 0, ""}, @@ -9547,6 +10026,7 @@ var PackageSymbols = map[string][]Symbol{ {"(Value).FieldByIndexErr", Method, 18, ""}, {"(Value).FieldByName", Method, 0, ""}, {"(Value).FieldByNameFunc", Method, 0, ""}, + {"(Value).Fields", Method, 26, ""}, {"(Value).Float", Method, 0, ""}, {"(Value).Grow", Method, 20, ""}, {"(Value).Index", Method, 0, ""}, @@ -9563,6 +10043,7 @@ var PackageSymbols = map[string][]Symbol{ {"(Value).MapRange", Method, 12, ""}, {"(Value).Method", Method, 0, ""}, {"(Value).MethodByName", Method, 0, ""}, + {"(Value).Methods", Method, 26, ""}, {"(Value).NumField", Method, 0, ""}, {"(Value).NumMethod", Method, 0, ""}, {"(Value).OverflowComplex", Method, 0, ""}, @@ -9678,7 +10159,6 @@ var PackageSymbols = map[string][]Symbol{ {"StructOf", Func, 7, "func(fields []StructField) Type"}, {"StructTag", Type, 0, ""}, {"Swapper", Func, 8, "func(slice any) func(i int, j int)"}, - {"Type", Type, 0, ""}, {"TypeAssert", Func, 25, "func[T any](v Value) (T, bool)"}, {"TypeFor", Func, 22, "func[T any]() Type"}, {"TypeOf", Func, 0, "func(i any) Type"}, @@ -9880,6 +10360,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*TypeAssertionError).Error", Method, 0, ""}, {"(*TypeAssertionError).RuntimeError", Method, 0, ""}, {"(Cleanup).Stop", Method, 24, ""}, + {"(Error).Error", Method, 0, ""}, + {"(Error).RuntimeError", Method, 0, ""}, {"AddCleanup", Func, 24, "func[T, S any](ptr *T, cleanup func(S), arg S) Cleanup"}, {"BlockProfile", Func, 1, "func(p []BlockProfileRecord) (n int, ok bool)"}, {"BlockProfileRecord", Type, 1, ""}, @@ -10154,6 +10636,9 @@ var PackageSymbols = map[string][]Symbol{ {"(IntSlice).Search", Method, 0, ""}, {"(IntSlice).Sort", Method, 0, ""}, {"(IntSlice).Swap", Method, 0, ""}, + {"(Interface).Len", Method, 0, ""}, + {"(Interface).Less", Method, 0, ""}, + {"(Interface).Swap", Method, 0, ""}, {"(StringSlice).Len", Method, 0, ""}, {"(StringSlice).Less", Method, 0, ""}, {"(StringSlice).Search", Method, 0, ""}, @@ -10345,6 +10830,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*WaitGroup).Done", Method, 0, ""}, {"(*WaitGroup).Go", Method, 25, ""}, {"(*WaitGroup).Wait", Method, 0, ""}, + {"(Locker).Lock", Method, 0, ""}, + {"(Locker).Unlock", Method, 0, ""}, {"Cond", Type, 0, ""}, {"Cond.L", Field, 0, ""}, {"Locker", Type, 0, ""}, @@ -10486,10 +10973,14 @@ var PackageSymbols = map[string][]Symbol{ {"(*Timeval).Nano", Method, 0, ""}, {"(*Timeval).Nanoseconds", Method, 0, ""}, {"(*Timeval).Unix", Method, 0, ""}, + {"(Conn).SyscallConn", Method, 9, ""}, {"(Errno).Error", Method, 0, ""}, {"(Errno).Is", Method, 13, ""}, {"(Errno).Temporary", Method, 0, ""}, {"(Errno).Timeout", Method, 0, ""}, + {"(RawConn).Control", Method, 9, ""}, + {"(RawConn).Read", Method, 9, ""}, + {"(RawConn).Write", Method, 9, ""}, {"(Signal).Signal", Method, 0, ""}, {"(Signal).String", Method, 0, ""}, {"(Token).Close", Method, 0, ""}, @@ -14409,7 +14900,7 @@ var PackageSymbols = map[string][]Symbol{ {"RouteMessage.Data", Field, 0, ""}, {"RouteMessage.Header", Field, 0, ""}, {"RouteRIB", Func, 0, ""}, - {"RoutingMessage", Type, 0, ""}, + {"RoutingMessage", Type, 14, ""}, {"RtAttr", Type, 0, ""}, {"RtAttr.Len", Field, 0, ""}, {"RtAttr.Type", Field, 0, ""}, @@ -15895,7 +16386,6 @@ var PackageSymbols = map[string][]Symbol{ {"SockFprog.Filter", Field, 0, ""}, {"SockFprog.Len", Field, 0, ""}, {"SockFprog.Pad_cgo_0", Field, 0, ""}, - {"Sockaddr", Type, 0, ""}, {"SockaddrDatalink", Type, 0, ""}, {"SockaddrDatalink.Alen", Field, 0, ""}, {"SockaddrDatalink.Data", Field, 0, ""}, @@ -16801,6 +17291,29 @@ var PackageSymbols = map[string][]Symbol{ {"(BenchmarkResult).MemString", Method, 1, ""}, {"(BenchmarkResult).NsPerOp", Method, 0, ""}, {"(BenchmarkResult).String", Method, 0, ""}, + {"(TB).ArtifactDir", Method, 26, ""}, + {"(TB).Attr", Method, 25, ""}, + {"(TB).Chdir", Method, 24, ""}, + {"(TB).Cleanup", Method, 14, ""}, + {"(TB).Context", Method, 24, ""}, + {"(TB).Error", Method, 2, ""}, + {"(TB).Errorf", Method, 2, ""}, + {"(TB).Fail", Method, 2, ""}, + {"(TB).FailNow", Method, 2, ""}, + {"(TB).Failed", Method, 2, ""}, + {"(TB).Fatal", Method, 2, ""}, + {"(TB).Fatalf", Method, 2, ""}, + {"(TB).Helper", Method, 9, ""}, + {"(TB).Log", Method, 2, ""}, + {"(TB).Logf", Method, 2, ""}, + {"(TB).Name", Method, 8, ""}, + {"(TB).Output", Method, 25, ""}, + {"(TB).Setenv", Method, 17, ""}, + {"(TB).Skip", Method, 2, ""}, + {"(TB).SkipNow", Method, 2, ""}, + {"(TB).Skipf", Method, 2, ""}, + {"(TB).Skipped", Method, 2, ""}, + {"(TB).TempDir", Method, 15, ""}, {"AllocsPerRun", Func, 1, "func(runs int, f func()) (avg float64)"}, {"B", Type, 0, ""}, {"B.N", Field, 0, ""}, @@ -16851,7 +17364,6 @@ var PackageSymbols = map[string][]Symbol{ {"RunTests", Func, 0, "func(matchString func(pat string, str string) (bool, error), tests []InternalTest) (ok bool)"}, {"Short", Func, 0, "func() bool"}, {"T", Type, 0, ""}, - {"TB", Type, 2, ""}, {"Testing", Func, 21, "func() bool"}, {"Verbose", Func, 1, "func() bool"}, }, @@ -16887,6 +17399,7 @@ var PackageSymbols = map[string][]Symbol{ "testing/quick": { {"(*CheckEqualError).Error", Method, 0, ""}, {"(*CheckError).Error", Method, 0, ""}, + {"(Generator).Generate", Method, 0, ""}, {"(SetupError).Error", Method, 0, ""}, {"Check", Func, 0, "func(f any, config *Config) error"}, {"CheckEqual", Func, 0, "func(f any, g any, config *Config) error"}, @@ -17093,6 +17606,10 @@ var PackageSymbols = map[string][]Symbol{ {"(ListNode).Position", Method, 1, ""}, {"(ListNode).Type", Method, 0, ""}, {"(NilNode).Position", Method, 1, ""}, + {"(Node).Copy", Method, 0, ""}, + {"(Node).Position", Method, 1, ""}, + {"(Node).String", Method, 0, ""}, + {"(Node).Type", Method, 0, ""}, {"(NodeType).Type", Method, 0, ""}, {"(NumberNode).Position", Method, 1, ""}, {"(NumberNode).Type", Method, 0, ""}, diff --git a/vendor/golang.org/x/tools/internal/stdlib/stdlib.go b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go index e223e0f34..59a5de36a 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/stdlib.go +++ b/vendor/golang.org/x/tools/internal/stdlib/stdlib.go @@ -39,7 +39,7 @@ const ( Var // "EOF" Const // "Pi" Field // "Point.X" - Method // "(*Buffer).Grow" + Method // "(*Buffer).Grow" or "(Reader).Read" ) func (kind Kind) String() string { diff --git a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go index 3db2a135b..7ebe9768b 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go @@ -8,7 +8,7 @@ import ( "fmt" "go/ast" "go/types" - _ "unsafe" + _ "unsafe" // for go:linkname hack ) // CallKind describes the function position of an [*ast.CallExpr]. diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go index fef74a785..51001666e 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -23,7 +23,6 @@ import ( "go/token" "go/types" "reflect" - "unsafe" "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/internal/aliases" @@ -40,8 +39,7 @@ func SetUsesCgo(conf *types.Config) bool { } } - addr := unsafe.Pointer(f.UnsafeAddr()) - *(*bool)(addr) = true + *(*bool)(f.Addr().UnsafePointer()) = true return true } diff --git a/vendor/golang.org/x/tools/internal/versions/features.go b/vendor/golang.org/x/tools/internal/versions/features.go index a5f4e3252..cdd36c388 100644 --- a/vendor/golang.org/x/tools/internal/versions/features.go +++ b/vendor/golang.org/x/tools/internal/versions/features.go @@ -9,6 +9,7 @@ package versions // named constants, to avoid misspelling const ( + Go1_17 = "go1.17" Go1_18 = "go1.18" Go1_19 = "go1.19" Go1_20 = "go1.20" diff --git a/vendor/golang.org/x/tools/refactor/satisfy/find.go b/vendor/golang.org/x/tools/refactor/satisfy/find.go new file mode 100644 index 000000000..bb3837553 --- /dev/null +++ b/vendor/golang.org/x/tools/refactor/satisfy/find.go @@ -0,0 +1,725 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package satisfy inspects the type-checked ASTs of Go packages and +// reports the set of discovered type constraints of the form (lhs, rhs +// Type) where lhs is a non-trivial interface, rhs satisfies this +// interface, and this fact is necessary for the package to be +// well-typed. +// +// It requires well-typed inputs. +package satisfy // import "golang.org/x/tools/refactor/satisfy" + +// NOTES: +// +// We don't care about numeric conversions, so we don't descend into +// types or constant expressions. This is unsound because +// constant expressions can contain arbitrary statements, e.g. +// const x = len([1]func(){func() { +// ... +// }}) +// +// Assignability conversions are possible in the following places: +// - in assignments y = x, y := x, var y = x. +// - from call argument types to formal parameter types +// - in append and delete calls +// - from return operands to result parameter types +// - in composite literal T{k:v}, from k and v to T's field/element/key type +// - in map[key] from key to the map's key type +// - in comparisons x==y and switch x { case y: }. +// - in explicit conversions T(x) +// - in sends ch <- x, from x to the channel element type +// - in type assertions x.(T) and switch x.(type) { case T: } +// +// The results of this pass provide information equivalent to the +// ssa.MakeInterface and ssa.ChangeInterface instructions. + +import ( + "fmt" + "go/ast" + "go/token" + "go/types" + + "golang.org/x/tools/go/types/typeutil" + "golang.org/x/tools/internal/typeparams" +) + +// A Constraint records the fact that the RHS type does and must +// satisfy the LHS type, which is an interface. +// The names are suggestive of an assignment statement LHS = RHS. +// +// The constraint is implicitly universally quantified over any type +// parameters appearing within the two types. +type Constraint struct { + LHS, RHS types.Type +} + +// A Finder inspects the type-checked ASTs of Go packages and +// accumulates the set of type constraints (x, y) such that x is +// assignable to y, y is an interface, and both x and y have methods. +// +// In other words, it returns the subset of the "implements" relation +// that is checked during compilation of a package. Refactoring tools +// will need to preserve at least this part of the relation to ensure +// continued compilation. +type Finder struct { + Result map[Constraint]bool + msetcache typeutil.MethodSetCache + + // per-Find state + info *types.Info + sig *types.Signature +} + +// Find inspects a single package, populating Result with its pairs of +// constrained types. +// +// The result is non-canonical and thus may contain duplicates (but this +// tends to preserves names of interface types better). +// +// The package must be free of type errors, and +// info.{Defs,Uses,Selections,Types} must have been populated by the +// type-checker. +func (f *Finder) Find(info *types.Info, files []*ast.File) { + if info.Defs == nil || info.Uses == nil || info.Selections == nil || info.Types == nil { + panic("Finder.Find: one of info.{Defs,Uses,Selections.Types} is not populated") + } + if f.Result == nil { + f.Result = make(map[Constraint]bool) + } + + f.info = info + for _, file := range files { + for _, d := range file.Decls { + switch d := d.(type) { + case *ast.GenDecl: + if d.Tok == token.VAR { // ignore consts + for _, spec := range d.Specs { + f.valueSpec(spec.(*ast.ValueSpec)) + } + } + + case *ast.FuncDecl: + if d.Body != nil { + f.sig = f.info.Defs[d.Name].Type().(*types.Signature) + f.stmt(d.Body) + f.sig = nil + } + } + } + } + f.info = nil +} + +var ( + tInvalid = types.Typ[types.Invalid] + tUntypedBool = types.Typ[types.UntypedBool] + tUntypedNil = types.Typ[types.UntypedNil] +) + +// exprN visits an expression in a multi-value context. +func (f *Finder) exprN(e ast.Expr) types.Type { + typ := f.info.Types[e].Type.(*types.Tuple) + switch e := e.(type) { + case *ast.ParenExpr: + return f.exprN(e.X) + + case *ast.CallExpr: + // x, err := f(args) + sig := typeparams.CoreType(f.expr(e.Fun)).(*types.Signature) + f.call(sig, e.Args) + + case *ast.IndexExpr: + // y, ok := x[i] + x := f.expr(e.X) + f.assign(f.expr(e.Index), typeparams.CoreType(x).(*types.Map).Key()) + + case *ast.TypeAssertExpr: + // y, ok := x.(T) + f.typeAssert(f.expr(e.X), typ.At(0).Type()) + + case *ast.UnaryExpr: // must be receive <- + // y, ok := <-x + f.expr(e.X) + + default: + panic(e) + } + return typ +} + +func (f *Finder) call(sig *types.Signature, args []ast.Expr) { + if len(args) == 0 { + return + } + + // Ellipsis call? e.g. f(x, y, z...) + if _, ok := args[len(args)-1].(*ast.Ellipsis); ok { + for i, arg := range args { + // The final arg is a slice, and so is the final param. + f.assign(sig.Params().At(i).Type(), f.expr(arg)) + } + return + } + + var argtypes []types.Type + + // Gather the effective actual parameter types. + if tuple, ok := f.info.Types[args[0]].Type.(*types.Tuple); ok { + // f(g()) call where g has multiple results? + f.expr(args[0]) + // unpack the tuple + for v := range tuple.Variables() { + argtypes = append(argtypes, v.Type()) + } + } else { + for _, arg := range args { + argtypes = append(argtypes, f.expr(arg)) + } + } + + // Assign the actuals to the formals. + if !sig.Variadic() { + for i, argtype := range argtypes { + f.assign(sig.Params().At(i).Type(), argtype) + } + } else { + // The first n-1 parameters are assigned normally. + nnormals := sig.Params().Len() - 1 + for i, argtype := range argtypes[:nnormals] { + f.assign(sig.Params().At(i).Type(), argtype) + } + // Remaining args are assigned to elements of varargs slice. + tElem := sig.Params().At(nnormals).Type().(*types.Slice).Elem() + for i := nnormals; i < len(argtypes); i++ { + f.assign(tElem, argtypes[i]) + } + } +} + +// builtin visits the arguments of a builtin type with signature sig. +func (f *Finder) builtin(obj *types.Builtin, sig *types.Signature, args []ast.Expr) { + switch obj.Name() { + case "make", "new": + for i, arg := range args { + if i == 0 && f.info.Types[arg].IsType() { + continue // skip the type operand + } + f.expr(arg) + } + + case "append": + s := f.expr(args[0]) + if _, ok := args[len(args)-1].(*ast.Ellipsis); ok && len(args) == 2 { + // append(x, y...) including append([]byte, "foo"...) + f.expr(args[1]) + } else { + // append(x, y, z) + tElem := typeparams.CoreType(s).(*types.Slice).Elem() + for _, arg := range args[1:] { + f.assign(tElem, f.expr(arg)) + } + } + + case "delete": + m := f.expr(args[0]) + k := f.expr(args[1]) + f.assign(typeparams.CoreType(m).(*types.Map).Key(), k) + + default: + // ordinary call + f.call(sig, args) + } +} + +func (f *Finder) extract(tuple types.Type, i int) types.Type { + if tuple, ok := tuple.(*types.Tuple); ok && i < tuple.Len() { + return tuple.At(i).Type() + } + return tInvalid +} + +func (f *Finder) valueSpec(spec *ast.ValueSpec) { + var T types.Type + if spec.Type != nil { + T = f.info.Types[spec.Type].Type + } + switch len(spec.Values) { + case len(spec.Names): // e.g. var x, y = f(), g() + for _, value := range spec.Values { + v := f.expr(value) + if T != nil { + f.assign(T, v) + } + } + + case 1: // e.g. var x, y = f() + tuple := f.exprN(spec.Values[0]) + for i := range spec.Names { + if T != nil { + f.assign(T, f.extract(tuple, i)) + } + } + } +} + +// assign records pairs of distinct types that are related by +// assignability, where the left-hand side is an interface and both +// sides have methods. +// +// It should be called for all assignability checks, type assertions, +// explicit conversions and comparisons between two types, unless the +// types are uninteresting (e.g. lhs is a concrete type, or the empty +// interface; rhs has no methods). +func (f *Finder) assign(lhs, rhs types.Type) { + if types.Identical(lhs, rhs) { + return + } + if !types.IsInterface(lhs) { + return + } + + if f.msetcache.MethodSet(lhs).Len() == 0 { + return + } + if f.msetcache.MethodSet(rhs).Len() == 0 { + return + } + // record the pair + f.Result[Constraint{lhs, rhs}] = true +} + +// typeAssert must be called for each type assertion x.(T) where x has +// interface type I. +func (f *Finder) typeAssert(I, T types.Type) { + // Type assertions are slightly subtle, because they are allowed + // to be "impossible", e.g. + // + // var x interface{f()} + // _ = x.(interface{f()int}) // legal + // + // (In hindsight, the language spec should probably not have + // allowed this, but it's too late to fix now.) + // + // This means that a type assert from I to T isn't exactly a + // constraint that T is assignable to I, but for a refactoring + // tool it is a conditional constraint that, if T is assignable + // to I before a refactoring, it should remain so after. + + if types.AssignableTo(T, I) { + f.assign(I, T) + } +} + +// compare must be called for each comparison x==y. +func (f *Finder) compare(x, y types.Type) { + if types.AssignableTo(x, y) { + f.assign(y, x) + } else if types.AssignableTo(y, x) { + f.assign(x, y) + } +} + +// expr visits a true expression (not a type or defining ident) +// and returns its type. +func (f *Finder) expr(e ast.Expr) types.Type { + tv := f.info.Types[e] + if tv.Value != nil { + return tv.Type // prune the descent for constants + } + + // tv.Type may be nil for an ast.Ident. + + switch e := e.(type) { + case *ast.BadExpr, *ast.BasicLit: + // no-op + + case *ast.Ident: + // (referring idents only) + if obj, ok := f.info.Uses[e]; ok { + return obj.Type() + } + if e.Name == "_" { // e.g. "for _ = range x" + return tInvalid + } + panic("undefined ident: " + e.Name) + + case *ast.Ellipsis: + if e.Elt != nil { + f.expr(e.Elt) + } + + case *ast.FuncLit: + saved := f.sig + f.sig = tv.Type.(*types.Signature) + f.stmt(e.Body) + f.sig = saved + + case *ast.CompositeLit: + switch T := typeparams.CoreType(typeparams.Deref(tv.Type)).(type) { + case *types.Struct: + for i, elem := range e.Elts { + if kv, ok := elem.(*ast.KeyValueExpr); ok { + f.assign(f.info.Uses[kv.Key.(*ast.Ident)].Type(), f.expr(kv.Value)) + } else { + f.assign(T.Field(i).Type(), f.expr(elem)) + } + } + + case *types.Map: + for _, elem := range e.Elts { + elem := elem.(*ast.KeyValueExpr) + f.assign(T.Key(), f.expr(elem.Key)) + f.assign(T.Elem(), f.expr(elem.Value)) + } + + case *types.Array, *types.Slice: + tElem := T.(interface { + Elem() types.Type + }).Elem() + for _, elem := range e.Elts { + if kv, ok := elem.(*ast.KeyValueExpr); ok { + // ignore the key + f.assign(tElem, f.expr(kv.Value)) + } else { + f.assign(tElem, f.expr(elem)) + } + } + + default: + panic(fmt.Sprintf("unexpected composite literal type %T: %v", tv.Type, tv.Type.String())) + } + + case *ast.ParenExpr: + f.expr(e.X) + + case *ast.SelectorExpr: + if _, ok := f.info.Selections[e]; ok { + f.expr(e.X) // selection + } else { + return f.info.Uses[e.Sel].Type() // qualified identifier + } + + case *ast.IndexExpr: + if instance(f.info, e.X) { + // f[T] or C[T] -- generic instantiation + } else { + // x[i] or m[k] -- index or lookup operation + x := f.expr(e.X) + i := f.expr(e.Index) + if ux, ok := typeparams.CoreType(x).(*types.Map); ok { + f.assign(ux.Key(), i) + } + } + + case *ast.IndexListExpr: + // f[X, Y] -- generic instantiation + + case *ast.SliceExpr: + f.expr(e.X) + if e.Low != nil { + f.expr(e.Low) + } + if e.High != nil { + f.expr(e.High) + } + if e.Max != nil { + f.expr(e.Max) + } + + case *ast.TypeAssertExpr: + x := f.expr(e.X) + f.typeAssert(x, f.info.Types[e.Type].Type) + + case *ast.CallExpr: + if tvFun := f.info.Types[e.Fun]; tvFun.IsType() { + // conversion + arg0 := f.expr(e.Args[0]) + f.assign(tvFun.Type, arg0) + } else { + // function call + + // unsafe call. Treat calls to functions in unsafe like ordinary calls, + // except that their signature cannot be determined by their func obj. + // Without this special handling, f.expr(e.Fun) would fail below. + if s, ok := ast.Unparen(e.Fun).(*ast.SelectorExpr); ok { + if obj, ok := f.info.Uses[s.Sel].(*types.Builtin); ok && obj.Pkg().Path() == "unsafe" { + sig := f.info.Types[e.Fun].Type.(*types.Signature) + f.call(sig, e.Args) + return tv.Type + } + } + + // builtin call + if id, ok := ast.Unparen(e.Fun).(*ast.Ident); ok { + if obj, ok := f.info.Uses[id].(*types.Builtin); ok { + sig := f.info.Types[id].Type.(*types.Signature) + f.builtin(obj, sig, e.Args) + return tv.Type + } + } + + // ordinary call + f.call(typeparams.CoreType(f.expr(e.Fun)).(*types.Signature), e.Args) + } + + case *ast.StarExpr: + f.expr(e.X) + + case *ast.UnaryExpr: + f.expr(e.X) + + case *ast.BinaryExpr: + x := f.expr(e.X) + y := f.expr(e.Y) + if e.Op == token.EQL || e.Op == token.NEQ { + f.compare(x, y) + } + + case *ast.KeyValueExpr: + f.expr(e.Key) + f.expr(e.Value) + + case *ast.ArrayType, + *ast.StructType, + *ast.FuncType, + *ast.InterfaceType, + *ast.MapType, + *ast.ChanType: + panic(e) + } + + if tv.Type == nil { + panic(fmt.Sprintf("no type for %T", e)) + } + + return tv.Type +} + +func (f *Finder) stmt(s ast.Stmt) { + switch s := s.(type) { + case *ast.BadStmt, + *ast.EmptyStmt, + *ast.BranchStmt: + // no-op + + case *ast.DeclStmt: + d := s.Decl.(*ast.GenDecl) + if d.Tok == token.VAR { // ignore consts + for _, spec := range d.Specs { + f.valueSpec(spec.(*ast.ValueSpec)) + } + } + + case *ast.LabeledStmt: + f.stmt(s.Stmt) + + case *ast.ExprStmt: + f.expr(s.X) + + case *ast.SendStmt: + ch := f.expr(s.Chan) + val := f.expr(s.Value) + f.assign(typeparams.CoreType(ch).(*types.Chan).Elem(), val) + + case *ast.IncDecStmt: + f.expr(s.X) + + case *ast.AssignStmt: + switch s.Tok { + case token.ASSIGN, token.DEFINE: + // y := x or y = x + var rhsTuple types.Type + if len(s.Lhs) != len(s.Rhs) { + rhsTuple = f.exprN(s.Rhs[0]) + } + for i := range s.Lhs { + var lhs, rhs types.Type + if rhsTuple == nil { + rhs = f.expr(s.Rhs[i]) // 1:1 assignment + } else { + rhs = f.extract(rhsTuple, i) // n:1 assignment + } + + if id, ok := s.Lhs[i].(*ast.Ident); ok { + if id.Name != "_" { + if obj, ok := f.info.Defs[id]; ok { + lhs = obj.Type() // definition + } + } + } + if lhs == nil { + lhs = f.expr(s.Lhs[i]) // assignment + } + f.assign(lhs, rhs) + } + + default: + // y op= x + f.expr(s.Lhs[0]) + f.expr(s.Rhs[0]) + } + + case *ast.GoStmt: + f.expr(s.Call) + + case *ast.DeferStmt: + f.expr(s.Call) + + case *ast.ReturnStmt: + formals := f.sig.Results() + switch len(s.Results) { + case formals.Len(): // 1:1 + for i, result := range s.Results { + f.assign(formals.At(i).Type(), f.expr(result)) + } + + case 1: // n:1 + tuple := f.exprN(s.Results[0]) + for i := 0; i < formals.Len(); i++ { + f.assign(formals.At(i).Type(), f.extract(tuple, i)) + } + } + + case *ast.SelectStmt: + f.stmt(s.Body) + + case *ast.BlockStmt: + for _, s := range s.List { + f.stmt(s) + } + + case *ast.IfStmt: + if s.Init != nil { + f.stmt(s.Init) + } + f.expr(s.Cond) + f.stmt(s.Body) + if s.Else != nil { + f.stmt(s.Else) + } + + case *ast.SwitchStmt: + if s.Init != nil { + f.stmt(s.Init) + } + var tag types.Type = tUntypedBool + if s.Tag != nil { + tag = f.expr(s.Tag) + } + for _, cc := range s.Body.List { + cc := cc.(*ast.CaseClause) + for _, cond := range cc.List { + f.compare(tag, f.info.Types[cond].Type) + } + for _, s := range cc.Body { + f.stmt(s) + } + } + + case *ast.TypeSwitchStmt: + if s.Init != nil { + f.stmt(s.Init) + } + var I types.Type + switch ass := s.Assign.(type) { + case *ast.ExprStmt: // x.(type) + I = f.expr(ast.Unparen(ass.X).(*ast.TypeAssertExpr).X) + case *ast.AssignStmt: // y := x.(type) + I = f.expr(ast.Unparen(ass.Rhs[0]).(*ast.TypeAssertExpr).X) + } + for _, cc := range s.Body.List { + cc := cc.(*ast.CaseClause) + for _, cond := range cc.List { + tCase := f.info.Types[cond].Type + if tCase != tUntypedNil { + f.typeAssert(I, tCase) + } + } + for _, s := range cc.Body { + f.stmt(s) + } + } + + case *ast.CommClause: + if s.Comm != nil { + f.stmt(s.Comm) + } + for _, s := range s.Body { + f.stmt(s) + } + + case *ast.ForStmt: + if s.Init != nil { + f.stmt(s.Init) + } + if s.Cond != nil { + f.expr(s.Cond) + } + if s.Post != nil { + f.stmt(s.Post) + } + f.stmt(s.Body) + + case *ast.RangeStmt: + x := f.expr(s.X) + // No conversions are involved when Tok==DEFINE. + if s.Tok == token.ASSIGN { + if s.Key != nil { + k := f.expr(s.Key) + var xelem types.Type + // Keys of array, *array, slice, string aren't interesting + // since the RHS key type is just an int. + switch ux := typeparams.CoreType(x).(type) { + case *types.Chan: + xelem = ux.Elem() + case *types.Map: + xelem = ux.Key() + } + if xelem != nil { + f.assign(k, xelem) + } + } + if s.Value != nil { + val := f.expr(s.Value) + var xelem types.Type + // Values of type strings aren't interesting because + // the RHS value type is just a rune. + switch ux := typeparams.CoreType(x).(type) { + case *types.Array: + xelem = ux.Elem() + case *types.Map: + xelem = ux.Elem() + case *types.Pointer: // *array + xelem = typeparams.CoreType(typeparams.Deref(ux)).(*types.Array).Elem() + case *types.Slice: + xelem = ux.Elem() + } + if xelem != nil { + f.assign(val, xelem) + } + } + } + f.stmt(s.Body) + + default: + panic(s) + } +} + +// -- Plundered from golang.org/x/tools/go/ssa ----------------- + +func instance(info *types.Info, expr ast.Expr) bool { + var id *ast.Ident + switch x := expr.(type) { + case *ast.Ident: + id = x + case *ast.SelectorExpr: + id = x.Sel + default: + return false + } + _, ok := info.Instances[id] + return ok +} diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 5f983b6b6..e07c04e62 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -596,16 +596,7 @@ func newInformer(clientState Store, options InformerOptions) Controller { // KeyLister, that way resync operations will result in the correct set // of update/delete deltas. - var fifo Queue - if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InOrderInformers) { - fifo = NewRealFIFO(MetaNamespaceKeyFunc, clientState, options.Transform) - } else { - fifo = NewDeltaFIFOWithOptions(DeltaFIFOOptions{ - KnownObjects: clientState, - EmitDeltaTypeReplaced: true, - Transformer: options.Transform, - }) - } + fifo := newQueueFIFO(clientState, options.Transform) cfg := &Config{ Queue: fifo, @@ -623,3 +614,15 @@ func newInformer(clientState Store, options InformerOptions) Controller { } return New(cfg) } + +func newQueueFIFO(clientState Store, transform TransformFunc) Queue { + if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InOrderInformers) { + return NewRealFIFO(MetaNamespaceKeyFunc, clientState, transform) + } else { + return NewDeltaFIFOWithOptions(DeltaFIFOOptions{ + KnownObjects: clientState, + EmitDeltaTypeReplaced: true, + Transformer: transform, + }) + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go index 9d9e238cc..a0d7a834a 100644 --- a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go @@ -270,7 +270,8 @@ func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { } var ( - _ = Queue(&DeltaFIFO{}) // DeltaFIFO is a Queue + _ = Queue(&DeltaFIFO{}) // DeltaFIFO is a Queue + _ = TransformingStore(&DeltaFIFO{}) // DeltaFIFO implements TransformingStore to allow memory optimizations ) var ( diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index ee9be7727..6fd43375f 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -80,7 +80,7 @@ type ReflectorStore interface { // TransformingStore is an optional interface that can be implemented by the provided store. // If implemented on the provided store reflector will use the same transformer in its internal stores. type TransformingStore interface { - Store + ReflectorStore Transformer() TransformFunc } @@ -726,9 +726,11 @@ func (r *Reflector) watchList(ctx context.Context) (watch.Interface, error) { return false } + var transformer TransformFunc storeOpts := []StoreOption{} if tr, ok := r.store.(TransformingStore); ok && tr.Transformer() != nil { - storeOpts = append(storeOpts, WithTransformer(tr.Transformer())) + transformer = tr.Transformer() + storeOpts = append(storeOpts, WithTransformer(transformer)) } initTrace := trace.New("Reflector WatchList", trace.Field{Key: "name", Value: r.name}) @@ -788,7 +790,7 @@ func (r *Reflector) watchList(ctx context.Context) (watch.Interface, error) { // we utilize the temporaryStore to ensure independence from the current store implementation. // as of today, the store is implemented as a queue and will be drained by the higher-level // component as soon as it finishes replacing the content. - checkWatchListDataConsistencyIfRequested(ctx, r.name, resourceVersion, r.listerWatcher.ListWithContext, temporaryStore.List) + checkWatchListDataConsistencyIfRequested(ctx, r.name, resourceVersion, r.listerWatcher.ListWithContext, transformer, temporaryStore.List) if err := r.store.Replace(temporaryStore.List(), resourceVersion); err != nil { return nil, fmt.Errorf("unable to sync watch-list result: %w", err) diff --git a/vendor/k8s.io/client-go/tools/cache/reflector_data_consistency_detector.go b/vendor/k8s.io/client-go/tools/cache/reflector_data_consistency_detector.go index a7e0d9c43..4119c78a6 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector_data_consistency_detector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector_data_consistency_detector.go @@ -33,11 +33,11 @@ import ( // // Note that this function will panic when data inconsistency is detected. // This is intentional because we want to catch it in the CI. -func checkWatchListDataConsistencyIfRequested[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, listFn consistencydetector.ListFunc[T], retrieveItemsFn consistencydetector.RetrieveItemsFunc[U]) { +func checkWatchListDataConsistencyIfRequested[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, listFn consistencydetector.ListFunc[T], listItemTransformFunc func(interface{}) (interface{}, error), retrieveItemsFn consistencydetector.RetrieveItemsFunc[U]) { if !consistencydetector.IsDataConsistencyDetectionForWatchListEnabled() { return } // for informers we pass an empty ListOptions because // listFn might be wrapped for filtering during informer construction. - consistencydetector.CheckDataConsistency(ctx, identity, lastSyncedResourceVersion, listFn, metav1.ListOptions{}, retrieveItemsFn) + consistencydetector.CheckDataConsistency(ctx, identity, lastSyncedResourceVersion, listFn, listItemTransformFunc, metav1.ListOptions{}, retrieveItemsFn) } diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index 99e5fcd18..1c12aa2d6 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -539,16 +539,7 @@ func (s *sharedIndexInformer) RunWithContext(ctx context.Context) { s.startedLock.Lock() defer s.startedLock.Unlock() - var fifo Queue - if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InOrderInformers) { - fifo = NewRealFIFO(MetaNamespaceKeyFunc, s.indexer, s.transform) - } else { - fifo = NewDeltaFIFOWithOptions(DeltaFIFOOptions{ - KnownObjects: s.indexer, - EmitDeltaTypeReplaced: true, - Transformer: s.transform, - }) - } + fifo := newQueueFIFO(s.indexer, s.transform) cfg := &Config{ Queue: fifo, diff --git a/vendor/k8s.io/client-go/tools/cache/the_real_fifo.go b/vendor/k8s.io/client-go/tools/cache/the_real_fifo.go index ef322bea8..b907410dc 100644 --- a/vendor/k8s.io/client-go/tools/cache/the_real_fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/the_real_fifo.go @@ -61,7 +61,8 @@ type RealFIFO struct { } var ( - _ = Queue(&RealFIFO{}) // RealFIFO is a Queue + _ = Queue(&RealFIFO{}) // RealFIFO is a Queue + _ = TransformingStore(&RealFIFO{}) // RealFIFO implements TransformingStore to allow memory optimizations ) // Close the queue. diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go index 5d2054155..79a748b74 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/leaselock.go @@ -77,6 +77,9 @@ func (ll *LeaseLock) Update(ctx context.Context, ler LeaderElectionRecord) error ll.lease.Spec = LeaderElectionRecordToLeaseSpec(&ler) if ll.Labels != nil { + if ll.lease.Labels == nil { + ll.lease.Labels = map[string]string{} + } // Only overwrite the labels that are specifically set for k, v := range ll.Labels { ll.lease.Labels[k] = v diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go index 122046126..48c78b595 100644 --- a/vendor/k8s.io/client-go/util/cert/cert.go +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -75,13 +75,15 @@ func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, erro CommonName: cfg.CommonName, Organization: cfg.Organization, }, - DNSNames: []string{cfg.CommonName}, NotBefore: notBefore, NotAfter: now.Add(duration365d * 10).UTC(), KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, BasicConstraintsValid: true, IsCA: true, } + if len(cfg.CommonName) > 0 { + tmpl.DNSNames = []string{cfg.CommonName} + } certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) if err != nil { diff --git a/vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go b/vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go index 06f172d82..72c0124a0 100644 --- a/vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go +++ b/vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go @@ -45,16 +45,28 @@ func IsDataConsistencyDetectionForWatchListEnabled() bool { return dataConsistencyDetectionForWatchListEnabled } +// SetDataConsistencyDetectionForWatchListEnabledForTest allows to enable/disable data consistency detection for testing purposes. +// It returns a function that restores the original value. +func SetDataConsistencyDetectionForWatchListEnabledForTest(enabled bool) func() { + original := dataConsistencyDetectionForWatchListEnabled + dataConsistencyDetectionForWatchListEnabled = enabled + return func() { + dataConsistencyDetectionForWatchListEnabled = original + } +} + type RetrieveItemsFunc[U any] func() []U type ListFunc[T runtime.Object] func(ctx context.Context, options metav1.ListOptions) (T, error) +type TransformFunc func(interface{}) (interface{}, error) + // CheckDataConsistency exists solely for testing purposes. // we cannot use checkWatchListDataConsistencyIfRequested because // it is guarded by an environmental variable. // we cannot manipulate the environmental variable because // it will affect other tests in this package. -func CheckDataConsistency[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, listFn ListFunc[T], listOptions metav1.ListOptions, retrieveItemsFn RetrieveItemsFunc[U]) { +func CheckDataConsistency[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, listFn ListFunc[T], listItemTransformFunc TransformFunc, listOptions metav1.ListOptions, retrieveItemsFn RetrieveItemsFunc[U]) { if !canFormAdditionalListCall(lastSyncedResourceVersion, listOptions) { klog.V(4).Infof("data consistency check for %s is enabled but the parameters (RV, ListOptions) doesn't allow for creating a valid LIST request. Skipping the data consistency check.", identity) return @@ -84,6 +96,15 @@ func CheckDataConsistency[T runtime.Object, U any](ctx context.Context, identity if err != nil { panic(err) // this should never happen } + if listItemTransformFunc != nil { + for i := range rawListItems { + obj, err := listItemTransformFunc(rawListItems[i]) + if err != nil { + panic(err) + } + rawListItems[i] = obj.(runtime.Object) + } + } listItems := toMetaObjectSliceOrDie(rawListItems) sort.Sort(byUID(listItems)) diff --git a/vendor/k8s.io/kubernetes/pkg/api/service/warnings.go b/vendor/k8s.io/kubernetes/pkg/api/service/warnings.go index 41e69704b..92fef3afa 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/service/warnings.go +++ b/vendor/k8s.io/kubernetes/pkg/api/service/warnings.go @@ -48,7 +48,7 @@ func GetWarningsForService(service, oldService *api.Service) []string { if len(service.Spec.ExternalIPs) > 0 { warnings = append(warnings, "spec.externalIPs is ignored for headless services") } - if service.Spec.SessionAffinity != "" { + if service.Spec.SessionAffinity != api.ServiceAffinityNone { warnings = append(warnings, "spec.SessionAffinity is ignored for headless services") } } diff --git a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go index cf5d93376..d5515d0d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go +++ b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go @@ -941,6 +941,12 @@ const ( // Enables policies controlling deletion of PVCs created by a StatefulSet. StatefulSetAutoDeletePVC featuregate.Feature = "StatefulSetAutoDeletePVC" + // owner: @liggitt + // + // Mitigates spurious statefulset rollouts due to controller revision comparison mismatches + // which are not semantically significant (e.g. serialization differences or missing defaulted fields). + StatefulSetSemanticRevisionComparison = "StatefulSetSemanticRevisionComparison" + // owner: @cupnes // kep: https://kep.k8s.io/4049 // @@ -1679,7 +1685,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate }, SchedulerAsyncAPICalls: { - {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.Beta}, + {Version: version.MustParse("1.34"), Default: false, PreRelease: featuregate.Beta}, }, SchedulerAsyncPreemption: { @@ -1755,6 +1761,12 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // GA in 1.32, remove in 1.35 }, + StatefulSetSemanticRevisionComparison: { + // This is a mitigation for a 1.34 regression due to serialization differences that cannot be feature-gated, + // so this mitigation should not auto-disable even if emulating versions prior to 1.34 with --emulation-version. + {Version: version.MustParse("1.0"), Default: true, PreRelease: featuregate.Beta}, + }, + StorageCapacityScoring: { {Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Alpha}, }, diff --git a/vendor/modules.txt b/vendor/modules.txt index c0e557c35..2a77b3960 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,3 +1,4 @@ +## workspace # 4d63.com/gocheckcompilerdirectives v1.3.0 ## explicit; go 1.22.0 4d63.com/gocheckcompilerdirectives/checkcompilerdirectives @@ -10,6 +11,9 @@ cel.dev/expr # codeberg.org/chavacava/garif v0.2.0 ## explicit; go 1.23 codeberg.org/chavacava/garif +# codeberg.org/polyfloyd/go-errorlint v1.9.0 +## explicit; go 1.24.0 +codeberg.org/polyfloyd/go-errorlint/errorlint # dev.gaijin.team/go/exhaustruct/v4 v4.0.0 ## explicit; go 1.24 dev.gaijin.team/go/exhaustruct/v4/analyzer @@ -47,7 +51,7 @@ github.com/Antonboom/testifylint/internal/checkers github.com/Antonboom/testifylint/internal/checkers/printf github.com/Antonboom/testifylint/internal/config github.com/Antonboom/testifylint/internal/testify -# github.com/BurntSushi/toml v1.5.0 +# github.com/BurntSushi/toml v1.6.0 ## explicit; go 1.18 github.com/BurntSushi/toml github.com/BurntSushi/toml/internal @@ -66,16 +70,17 @@ github.com/Masterminds/semver/v3 # github.com/Masterminds/sprig v2.22.0+incompatible ## explicit github.com/Masterminds/sprig -# github.com/MirrexOne/unqueryvet v1.3.0 +# github.com/MirrexOne/unqueryvet v1.4.0 ## explicit; go 1.24.0 github.com/MirrexOne/unqueryvet github.com/MirrexOne/unqueryvet/internal/analyzer +github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders github.com/MirrexOne/unqueryvet/pkg/config # github.com/OpenPeeDeeP/depguard/v2 v2.2.1 ## explicit; go 1.23.0 github.com/OpenPeeDeeP/depguard/v2 github.com/OpenPeeDeeP/depguard/v2/internal/utils -# github.com/alecthomas/chroma/v2 v2.20.0 +# github.com/alecthomas/chroma/v2 v2.21.1 ## explicit; go 1.22 github.com/alecthomas/chroma/v2 github.com/alecthomas/chroma/v2/formatters @@ -90,8 +95,8 @@ github.com/alecthomas/go-check-sumtype # github.com/alexkohler/nakedret/v2 v2.0.6 ## explicit; go 1.23.0 github.com/alexkohler/nakedret/v2 -# github.com/alexkohler/prealloc v1.0.0 -## explicit; go 1.15 +# github.com/alexkohler/prealloc v1.0.1 +## explicit; go 1.24.0 github.com/alexkohler/prealloc/pkg # github.com/alfatraining/structtag v1.0.0 ## explicit; go 1.22 @@ -225,18 +230,24 @@ github.com/cespare/xxhash/v2 ## explicit; go 1.16 github.com/charithe/durationcheck # github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc -## explicit; go 1.18 +## explicit; go 1.23.0 +# github.com/charmbracelet/colorprofile v0.3.1 +## go 1.23.0 github.com/charmbracelet/colorprofile # github.com/charmbracelet/lipgloss v1.1.0 ## explicit; go 1.18 github.com/charmbracelet/lipgloss # github.com/charmbracelet/x/ansi v0.8.0 -## explicit; go 1.18 +## explicit; go 1.23.0 +# github.com/charmbracelet/x/ansi v0.9.2 +## go 1.23.0 github.com/charmbracelet/x/ansi github.com/charmbracelet/x/ansi/kitty github.com/charmbracelet/x/ansi/parser # github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd ## explicit; go 1.18 +# github.com/charmbracelet/x/cellbuf v0.0.13 +## go 1.18 github.com/charmbracelet/x/cellbuf # github.com/charmbracelet/x/term v0.2.1 ## explicit; go 1.18 @@ -324,14 +335,14 @@ github.com/fzipp/gocyclo # github.com/ghodss/yaml v1.0.0 ## explicit github.com/ghodss/yaml -# github.com/ghostiam/protogetter v0.3.17 +# github.com/ghostiam/protogetter v0.3.18 ## explicit; go 1.24.0 github.com/ghostiam/protogetter # github.com/go-bindata/go-bindata v3.1.2+incompatible ## explicit github.com/go-bindata/go-bindata github.com/go-bindata/go-bindata/go-bindata -# github.com/go-critic/go-critic v0.14.2 +# github.com/go-critic/go-critic v0.14.3 ## explicit; go 1.24.0 github.com/go-critic/go-critic/checkers github.com/go-critic/go-critic/checkers/internal/astwalk @@ -353,13 +364,19 @@ github.com/go-logr/stdr # github.com/go-logr/zapr v1.3.0 ## explicit; go 1.18 github.com/go-logr/zapr +# github.com/go-openapi/jsonpointer v0.21.0 +## explicit; go 1.20 # github.com/go-openapi/jsonpointer v0.22.0 ## explicit; go 1.20 github.com/go-openapi/jsonpointer +# github.com/go-openapi/jsonreference v0.20.2 +## explicit; go 1.20 # github.com/go-openapi/jsonreference v0.21.1 ## explicit; go 1.20 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal +# github.com/go-openapi/swag v0.23.0 +## explicit; go 1.20.0 # github.com/go-openapi/swag v0.24.1 ## explicit; go 1.20.0 github.com/go-openapi/swag @@ -451,8 +468,8 @@ github.com/goccy/go-yaml/parser github.com/goccy/go-yaml/printer github.com/goccy/go-yaml/scanner github.com/goccy/go-yaml/token -# github.com/godoc-lint/godoc-lint v0.10.2 -## explicit; go 1.24 +# github.com/godoc-lint/godoc-lint v0.11.1 +## explicit; go 1.24.0 github.com/godoc-lint/godoc-lint/pkg/analysis github.com/godoc-lint/godoc-lint/pkg/check github.com/godoc-lint/godoc-lint/pkg/check/deprecated @@ -462,6 +479,8 @@ github.com/godoc-lint/godoc-lint/pkg/check/pkg_doc github.com/godoc-lint/godoc-lint/pkg/check/require_doc github.com/godoc-lint/godoc-lint/pkg/check/shared github.com/godoc-lint/godoc-lint/pkg/check/start_with_name +github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink +github.com/godoc-lint/godoc-lint/pkg/check/stdlib_doclink/internal github.com/godoc-lint/godoc-lint/pkg/compose github.com/godoc-lint/godoc-lint/pkg/config github.com/godoc-lint/godoc-lint/pkg/inspect @@ -491,7 +510,7 @@ github.com/golangci/go-printf-func-name/pkg/analyzer # github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d ## explicit; go 1.22.0 github.com/golangci/gofmt/gofmt -# github.com/golangci/golangci-lint/v2 v2.7.2 +# github.com/golangci/golangci-lint/v2 v2.8.0 ## explicit; go 1.24.0 github.com/golangci/golangci-lint/v2/cmd/golangci-lint github.com/golangci/golangci-lint/v2/internal/cache @@ -660,9 +679,14 @@ github.com/golangci/golangci-lint/v2/pkg/report github.com/golangci/golangci-lint/v2/pkg/result github.com/golangci/golangci-lint/v2/pkg/result/processors github.com/golangci/golangci-lint/v2/pkg/timeutils -# github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 -## explicit; go 1.22.0 -github.com/golangci/golines +# github.com/golangci/golines v0.14.0 +## explicit; go 1.24.0 +github.com/golangci/golines/shorten +github.com/golangci/golines/shorten/internal +github.com/golangci/golines/shorten/internal/annotation +github.com/golangci/golines/shorten/internal/comments +github.com/golangci/golines/shorten/internal/graph +github.com/golangci/golines/shorten/internal/tags # github.com/golangci/misspell v0.7.0 ## explicit; go 1.23.0 github.com/golangci/misspell @@ -720,6 +744,8 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value +# github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 +## explicit; go 1.24.0 # github.com/google/pprof v0.0.0-20250903194437-c28834ac2320 ## explicit; go 1.24.0 github.com/google/pprof/profile @@ -757,8 +783,10 @@ github.com/hashicorp/go-version ## explicit; go 1.18 github.com/hashicorp/golang-lru/v2/internal github.com/hashicorp/golang-lru/v2/simplelru -# github.com/hashicorp/hcl v1.0.1-vault-7 +# github.com/hashicorp/hcl v1.0.0 ## explicit; go 1.15 +# github.com/hashicorp/hcl v1.0.1-vault-5 +## go 1.15 github.com/hashicorp/hcl github.com/hashicorp/hcl/hcl/ast github.com/hashicorp/hcl/hcl/parser @@ -774,11 +802,13 @@ github.com/hashicorp/hcl/json/token github.com/hexops/gotextdiff github.com/hexops/gotextdiff/myers github.com/hexops/gotextdiff/span -# github.com/huandu/xstrings v1.5.0 +# github.com/huandu/xstrings v1.3.3 ## explicit; go 1.12 github.com/huandu/xstrings -# github.com/imdario/mergo v0.3.16 +# github.com/imdario/mergo v0.3.11 ## explicit; go 1.13 +# github.com/imdario/mergo v0.3.16 +## go 1.13 github.com/imdario/mergo # github.com/inconshreveable/mousetrap v1.1.0 ## explicit; go 1.18 @@ -827,13 +857,16 @@ github.com/lasiar/canonicalheader # github.com/ldez/exptostd v0.4.5 ## explicit; go 1.24.0 github.com/ldez/exptostd -# github.com/ldez/gomoddirectives v0.7.1 +# github.com/ldez/gomoddirectives v0.8.0 ## explicit; go 1.24.0 github.com/ldez/gomoddirectives # github.com/ldez/grignotin v0.10.1 ## explicit; go 1.24.0 github.com/ldez/grignotin/goenv github.com/ldez/grignotin/gomod +# github.com/ldez/structtags v0.6.1 +## explicit; go 1.24.0 +github.com/ldez/structtags/parser # github.com/ldez/tagliatelle v0.7.2 ## explicit; go 1.23.0 github.com/ldez/tagliatelle @@ -857,6 +890,8 @@ github.com/macabu/inamedparam # github.com/magiconair/properties v1.8.6 ## explicit; go 1.13 github.com/magiconair/properties +# github.com/mailru/easyjson v0.7.7 +## explicit; go 1.20 # github.com/mailru/easyjson v0.9.0 ## explicit; go 1.20 github.com/mailru/easyjson @@ -967,8 +1002,8 @@ github.com/nunnatsa/ginkgolinter/internal/rules github.com/nunnatsa/ginkgolinter/internal/typecheck github.com/nunnatsa/ginkgolinter/linter github.com/nunnatsa/ginkgolinter/version -# github.com/nxadm/tail v1.4.11 -## explicit; go 1.13 +# github.com/onsi/ginkgo v1.16.5 +## explicit; go 1.16 # github.com/onsi/ginkgo/v2 v2.27.2 ## explicit; go 1.23.0 github.com/onsi/ginkgo/v2 @@ -1019,6 +1054,8 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts +# github.com/openshift/external-secrets-operator v0.0.0-00010101000000-000000000000 => . +## explicit; go 1.25.3 # github.com/pelletier/go-toml v1.9.5 ## explicit; go 1.12 github.com/pelletier/go-toml @@ -1029,12 +1066,13 @@ github.com/pelletier/go-toml/v2/internal/characters github.com/pelletier/go-toml/v2/internal/danger github.com/pelletier/go-toml/v2/internal/tracker github.com/pelletier/go-toml/v2/unstable +# github.com/pkg/errors v0.9.1 +## explicit # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/polyfloyd/go-errorlint v1.8.0 +# github.com/prometheus/client_golang v1.22.0 ## explicit; go 1.23.0 -github.com/polyfloyd/go-errorlint/errorlint # github.com/prometheus/client_golang v1.23.2 ## explicit; go 1.23.0 github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil @@ -1046,13 +1084,19 @@ github.com/prometheus/client_golang/prometheus/promhttp github.com/prometheus/client_golang/prometheus/promhttp/internal github.com/prometheus/client_golang/prometheus/testutil/promlint github.com/prometheus/client_golang/prometheus/testutil/promlint/validations +# github.com/prometheus/client_model v0.6.1 +## explicit; go 1.22.0 # github.com/prometheus/client_model v0.6.2 ## explicit; go 1.22.0 github.com/prometheus/client_model/go +# github.com/prometheus/common v0.62.0 +## explicit; go 1.23.0 # github.com/prometheus/common v0.66.1 ## explicit; go 1.23.0 github.com/prometheus/common/expfmt github.com/prometheus/common/model +# github.com/prometheus/procfs v0.15.1 +## explicit; go 1.23.0 # github.com/prometheus/procfs v0.17.0 ## explicit; go 1.23.0 github.com/prometheus/procfs @@ -1124,15 +1168,15 @@ github.com/sashamelentyev/interfacebloat/pkg/analyzer ## explicit; go 1.23.0 github.com/sashamelentyev/usestdlibvars/pkg/analyzer github.com/sashamelentyev/usestdlibvars/pkg/analyzer/internal/mapping -# github.com/securego/gosec/v2 v2.22.11-0.20251204091113-daccba6b93d7 +# github.com/securego/gosec/v2 v2.22.11 ## explicit; go 1.24.0 github.com/securego/gosec/v2 github.com/securego/gosec/v2/analyzers github.com/securego/gosec/v2/cwe github.com/securego/gosec/v2/issue github.com/securego/gosec/v2/rules -# github.com/sergi/go-diff v1.4.0 -## explicit; go 1.13 +# github.com/sergi/go-diff v1.2.0 +## explicit; go 1.12 github.com/sergi/go-diff/diffmatchpatch # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 @@ -1151,10 +1195,9 @@ github.com/sourcegraph/go-diff/diff github.com/spf13/afero github.com/spf13/afero/internal/common github.com/spf13/afero/mem -# github.com/spf13/cast v1.10.0 -## explicit; go 1.21.0 +# github.com/spf13/cast v1.5.0 +## explicit; go 1.18 github.com/spf13/cast -github.com/spf13/cast/internal # github.com/spf13/cobra v1.10.2 ## explicit; go 1.15 github.com/spf13/cobra @@ -1314,6 +1357,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded go.opentelemetry.io/otel/metric/noop +# go.opentelemetry.io/otel/sdk v1.37.0 +## explicit; go 1.23.0 # go.opentelemetry.io/otel/sdk v1.38.0 ## explicit; go 1.23.0 go.opentelemetry.io/otel/sdk @@ -1354,13 +1399,15 @@ go.uber.org/zap/internal/exit go.uber.org/zap/internal/pool go.uber.org/zap/internal/stacktrace go.uber.org/zap/zapcore +# go.yaml.in/yaml/v2 v2.4.2 +## explicit; go 1.15 # go.yaml.in/yaml/v2 v2.4.3 ## explicit; go 1.15 go.yaml.in/yaml/v2 # go.yaml.in/yaml/v3 v3.0.4 ## explicit; go 1.16 go.yaml.in/yaml/v3 -# golang.org/x/crypto v0.45.0 +# golang.org/x/crypto v0.46.0 ## explicit; go 1.24.0 golang.org/x/crypto/pbkdf2 golang.org/x/crypto/scrypt @@ -1372,6 +1419,8 @@ golang.org/x/exp/slices golang.org/x/exp/typeparams # golang.org/x/mod v0.30.0 ## explicit; go 1.24.0 +# golang.org/x/mod v0.31.0 +## explicit; go 1.24.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module @@ -1379,6 +1428,8 @@ golang.org/x/mod/semver golang.org/x/mod/sumdb/dirhash # golang.org/x/net v0.47.0 ## explicit; go 1.24.0 +# golang.org/x/net v0.48.0 +## explicit; go 1.24.0 golang.org/x/net/html golang.org/x/net/html/atom golang.org/x/net/html/charset @@ -1390,22 +1441,28 @@ golang.org/x/net/internal/httpcommon golang.org/x/net/internal/timeseries golang.org/x/net/trace golang.org/x/net/websocket +# golang.org/x/oauth2 v0.30.0 +## explicit; go 1.24.0 # golang.org/x/oauth2 v0.31.0 ## explicit; go 1.24.0 golang.org/x/oauth2 golang.org/x/oauth2/internal # golang.org/x/sync v0.18.0 ## explicit; go 1.24.0 +# golang.org/x/sync v0.19.0 +## explicit; go 1.24.0 golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight # golang.org/x/sys v0.38.0 ## explicit; go 1.24.0 +# golang.org/x/sys v0.39.0 +## explicit; go 1.24.0 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 +# golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc ## explicit; go 1.24.0 golang.org/x/telemetry golang.org/x/telemetry/counter @@ -1418,9 +1475,13 @@ golang.org/x/telemetry/internal/telemetry golang.org/x/telemetry/internal/upload # golang.org/x/term v0.37.0 ## explicit; go 1.24.0 +# golang.org/x/term v0.38.0 +## go 1.24.0 golang.org/x/term # golang.org/x/text v0.31.0 ## explicit; go 1.24.0 +# golang.org/x/text v0.32.0 +## explicit; go 1.24.0 golang.org/x/text/cases golang.org/x/text/encoding golang.org/x/text/encoding/charmap @@ -1456,6 +1517,8 @@ golang.org/x/text/width golang.org/x/time/rate # golang.org/x/tools v0.39.0 ## explicit; go 1.24.0 +# golang.org/x/tools v0.40.0 +## explicit; go 1.24.0 golang.org/x/tools/cover golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/passes/appends @@ -1555,6 +1618,7 @@ golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/typesinternal/typeindex golang.org/x/tools/internal/versions +golang.org/x/tools/refactor/satisfy # golang.org/x/vuln v1.1.4 ## explicit; go 1.22.0 golang.org/x/vuln/cmd/govulncheck @@ -1577,6 +1641,8 @@ golang.org/x/vuln/scan # gomodules.xyz/jsonpatch/v2 v2.5.0 ## explicit; go 1.20 gomodules.xyz/jsonpatch/v2 +# google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 +## explicit; go 1.24.0 # google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 ## explicit; go 1.24.0 google.golang.org/genproto/googleapis/api/expr/v1alpha1 @@ -1649,6 +1715,8 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap +# google.golang.org/protobuf v1.36.8 +## explicit; go 1.23 # google.golang.org/protobuf v1.36.9 ## explicit; go 1.23 google.golang.org/protobuf/encoding/protodelim @@ -1694,6 +1762,8 @@ google.golang.org/protobuf/types/known/fieldmaskpb google.golang.org/protobuf/types/known/structpb google.golang.org/protobuf/types/known/timestamppb google.golang.org/protobuf/types/known/wrapperspb +# gopkg.in/evanphx/json-patch.v4 v4.12.0 +## explicit # gopkg.in/evanphx/json-patch.v4 v4.13.0 ## explicit gopkg.in/evanphx/json-patch.v4 @@ -1901,7 +1971,7 @@ honnef.co/go/tools/stylecheck/st1021 honnef.co/go/tools/stylecheck/st1022 honnef.co/go/tools/stylecheck/st1023 honnef.co/go/tools/unused -# k8s.io/api v0.34.1 +# k8s.io/api v0.34.3 ## explicit; go 1.24.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -1962,7 +2032,7 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1alpha1 -# k8s.io/apiextensions-apiserver v0.34.1 +# k8s.io/apiextensions-apiserver v0.34.3 ## explicit; go 1.24.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -1974,7 +2044,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 k8s.io/apiextensions-apiserver/pkg/features -# k8s.io/apimachinery v0.34.1 +# k8s.io/apimachinery v0.34.3 ## explicit; go 1.24.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -2042,7 +2112,7 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.34.1 +# k8s.io/apiserver v0.34.3 ## explicit; go 1.24.0 k8s.io/apiserver/pkg/apis/apiserver k8s.io/apiserver/pkg/apis/apiserver/install @@ -2087,7 +2157,7 @@ k8s.io/apiserver/pkg/warning k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics -# k8s.io/client-go v0.34.1 +# k8s.io/client-go v0.34.3 ## explicit; go 1.24.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 @@ -2363,14 +2433,14 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.34.1 +# k8s.io/code-generator v0.34.3 ## explicit; go 1.24.0 k8s.io/code-generator/cmd/applyconfiguration-gen/args k8s.io/code-generator/cmd/applyconfiguration-gen/generators k8s.io/code-generator/cmd/client-gen/generators/util k8s.io/code-generator/cmd/client-gen/types k8s.io/code-generator/pkg/util -# k8s.io/component-base v0.34.1 +# k8s.io/component-base v0.34.3 ## explicit; go 1.24.0 k8s.io/component-base/cli/flag k8s.io/component-base/compatibility @@ -2412,6 +2482,8 @@ k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler k8s.io/klog/v2/internal/verbosity k8s.io/klog/v2/textlogger +# k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b +## explicit; go 1.23.0 # k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 ## explicit; go 1.23.0 k8s.io/kube-openapi/pkg/cached @@ -2431,7 +2503,7 @@ k8s.io/kube-openapi/pkg/validation/strfmt/bson # k8s.io/kubelet v0.32.1 ## explicit; go 1.23.0 k8s.io/kubelet/pkg/apis -# k8s.io/kubernetes v1.34.1 +# k8s.io/kubernetes v1.34.3 ## explicit; go 1.24.0 k8s.io/kubernetes/pkg/api/service k8s.io/kubernetes/pkg/api/v1/pod @@ -2450,6 +2522,8 @@ k8s.io/kubernetes/pkg/capabilities k8s.io/kubernetes/pkg/features k8s.io/kubernetes/pkg/fieldpath k8s.io/kubernetes/pkg/util/parsers +# k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 +## explicit; go 1.18 # k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 ## explicit; go 1.18 k8s.io/utils/buffer @@ -2478,7 +2552,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/controller-runtime v0.22.3 +# sigs.k8s.io/controller-runtime v0.22.5 ## explicit; go 1.24.0 sigs.k8s.io/controller-runtime sigs.k8s.io/controller-runtime/pkg/builder @@ -2562,6 +2636,8 @@ sigs.k8s.io/controller-tools/pkg/webhook # sigs.k8s.io/gateway-api v1.1.0 ## explicit; go 1.22.0 sigs.k8s.io/gateway-api/apis/v1 +# sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 +## explicit; go 1.23 # sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 ## explicit; go 1.23 sigs.k8s.io/json diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go index a7e491855..a94ec6cc3 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go @@ -308,6 +308,42 @@ type ByObject struct { // // Defaults to true. EnableWatchBookmarks *bool + + // SyncPeriod determines the minimum frequency at which watched resources are + // reconciled. A lower period will correct entropy more quickly, but reduce + // responsiveness to change if there are many watched resources. Change this + // value only if you know what you are doing. Defaults to 10 hours if unset. + // there will a 10 percent jitter between the SyncPeriod of all controllers + // so that all controllers will not send list requests simultaneously. + // + // This applies to all controllers. + // + // A period sync happens for two reasons: + // 1. To insure against a bug in the controller that causes an object to not + // be requeued, when it otherwise should be requeued. + // 2. To insure against an unknown bug in controller-runtime, or its dependencies, + // that causes an object to not be requeued, when it otherwise should be + // requeued, or to be removed from the queue, when it otherwise should not + // be removed. + // + // If you want + // 1. to insure against missed watch events, or + // 2. to poll services that cannot be watched, + // then we recommend that, instead of changing the default period, the + // controller requeue, with a constant duration `t`, whenever the controller + // is "done" with an object, and would otherwise not requeue it, i.e., we + // recommend the `Reconcile` function return `reconcile.Result{RequeueAfter: t}`, + // instead of `reconcile.Result{}`. + // + // SyncPeriod will locally trigger an artificial Update event with the same + // object in both ObjectOld and ObjectNew for everything that is in the + // cache. + // + // Predicates or Handlers that expect ObjectOld and ObjectNew to be different + // (such as GenerationChangedPredicate) will filter out this event, preventing + // it from triggering a reconciliation. + // SyncPeriod does not sync between the local cache and the server. + SyncPeriod *time.Duration } // Config describes all potential options for a given watch. @@ -343,6 +379,42 @@ type Config struct { // // Defaults to true. EnableWatchBookmarks *bool + + // SyncPeriod determines the minimum frequency at which watched resources are + // reconciled. A lower period will correct entropy more quickly, but reduce + // responsiveness to change if there are many watched resources. Change this + // value only if you know what you are doing. Defaults to 10 hours if unset. + // there will a 10 percent jitter between the SyncPeriod of all controllers + // so that all controllers will not send list requests simultaneously. + // + // This applies to all controllers. + // + // A period sync happens for two reasons: + // 1. To insure against a bug in the controller that causes an object to not + // be requeued, when it otherwise should be requeued. + // 2. To insure against an unknown bug in controller-runtime, or its dependencies, + // that causes an object to not be requeued, when it otherwise should be + // requeued, or to be removed from the queue, when it otherwise should not + // be removed. + // + // If you want + // 1. to insure against missed watch events, or + // 2. to poll services that cannot be watched, + // then we recommend that, instead of changing the default period, the + // controller requeue, with a constant duration `t`, whenever the controller + // is "done" with an object, and would otherwise not requeue it, i.e., we + // recommend the `Reconcile` function return `reconcile.Result{RequeueAfter: t}`, + // instead of `reconcile.Result{}`. + // + // SyncPeriod will locally trigger an artificial Update event with the same + // object in both ObjectOld and ObjectNew for everything that is in the + // cache. + // + // Predicates or Handlers that expect ObjectOld and ObjectNew to be different + // (such as GenerationChangedPredicate) will filter out this event, preventing + // it from triggering a reconciliation. + // SyncPeriod does not sync between the local cache and the server. + SyncPeriod *time.Duration } // NewCacheFunc - Function for creating a new cache from the options and a rest config. @@ -413,6 +485,7 @@ func optionDefaultsToConfig(opts *Options) Config { Transform: opts.DefaultTransform, UnsafeDisableDeepCopy: opts.DefaultUnsafeDisableDeepCopy, EnableWatchBookmarks: opts.DefaultEnableWatchBookmarks, + SyncPeriod: opts.SyncPeriod, } } @@ -423,6 +496,7 @@ func byObjectToConfig(byObject ByObject) Config { Transform: byObject.Transform, UnsafeDisableDeepCopy: byObject.UnsafeDisableDeepCopy, EnableWatchBookmarks: byObject.EnableWatchBookmarks, + SyncPeriod: byObject.SyncPeriod, } } @@ -436,7 +510,7 @@ func newCache(restConfig *rest.Config, opts Options) newCacheFunc { HTTPClient: opts.HTTPClient, Scheme: opts.Scheme, Mapper: opts.Mapper, - ResyncPeriod: *opts.SyncPeriod, + ResyncPeriod: ptr.Deref(config.SyncPeriod, defaultSyncPeriod), Namespace: namespace, Selector: internal.Selector{ Label: config.LabelSelector, @@ -534,6 +608,7 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) { byObject.Transform = defaultedConfig.Transform byObject.UnsafeDisableDeepCopy = defaultedConfig.UnsafeDisableDeepCopy byObject.EnableWatchBookmarks = defaultedConfig.EnableWatchBookmarks + byObject.SyncPeriod = defaultedConfig.SyncPeriod } opts.ByObject[obj] = byObject @@ -555,10 +630,6 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) { opts.DefaultNamespaces[namespace] = cfg } - // Default the resync period to 10 hours if unset - if opts.SyncPeriod == nil { - opts.SyncPeriod = &defaultSyncPeriod - } return opts, nil } @@ -578,6 +649,9 @@ func defaultConfig(toDefault, defaultFrom Config) Config { if toDefault.EnableWatchBookmarks == nil { toDefault.EnableWatchBookmarks = defaultFrom.EnableWatchBookmarks } + if toDefault.SyncPeriod == nil { + toDefault.SyncPeriod = defaultFrom.SyncPeriod + } return toDefault } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go index cacba4a9c..d4223eda2 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go @@ -213,7 +213,12 @@ func (n *namespacedClient) Get(ctx context.Context, key ObjectKey, obj Object, o // List implements client.Client. func (n *namespacedClient) List(ctx context.Context, obj ObjectList, opts ...ListOption) error { - if n.namespace != "" { + isNamespaceScoped, err := n.IsObjectNamespaced(obj) + if err != nil { + return fmt.Errorf("error finding the scope of the object: %w", err) + } + + if isNamespaceScoped && n.namespace != "" { opts = append(opts, InNamespace(n.namespace)) } return n.client.List(ctx, obj, opts...) diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go index 98df84c56..71363f0d1 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go @@ -124,8 +124,8 @@ type priorityqueue[T comparable] struct { get chan item[T] // waiters is the number of routines blocked in Get, we use it to determine - // if we can push items. - waiters atomic.Int64 + // if we can push items. Every manipulation has to be protected with the lock. + waiters int64 // Configurable for testing now func() time.Time @@ -269,7 +269,7 @@ func (w *priorityqueue[T]) spin() { } } - if w.waiters.Load() == 0 { + if w.waiters == 0 { // Have to keep iterating here to ensure we update metrics // for further items that became ready and set nextReady. return true @@ -277,7 +277,7 @@ func (w *priorityqueue[T]) spin() { w.metrics.get(item.Key, item.Priority) w.locked.Insert(item.Key) - w.waiters.Add(-1) + w.waiters-- delete(w.items, item.Key) toDelete = append(toDelete, item) w.becameReady.Delete(item.Key) @@ -316,7 +316,9 @@ func (w *priorityqueue[T]) GetWithPriority() (_ T, priority int, shutdown bool) return zero, 0, true } - w.waiters.Add(1) + w.lock.Lock() + w.waiters++ + w.lock.Unlock() w.notifyItemOrWaiterAdded() diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go index 9bb81ed2a..c9f19da97 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go @@ -109,7 +109,11 @@ var ( // Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and // install extension APIs. type Environment struct { - // ControlPlane is the ControlPlane including the apiserver and etcd + // ControlPlane is the ControlPlane including the apiserver and etcd. + // Binary paths (APIServer.Path, Etcd.Path, KubectlPath) can be pre-configured in ControlPlane. + // If DownloadBinaryAssets is true, the downloaded paths will always be used. + // If DownloadBinaryAssets is false and paths are not pre-configured (default is empty), they will be + // automatically resolved using BinaryAssetsDirectory. ControlPlane controlplane.ControlPlane // Scheme is used to determine if conversion webhooks should be enabled @@ -211,6 +215,40 @@ func (te *Environment) Stop() error { return te.ControlPlane.Stop() } +// configureBinaryPaths configures the binary paths for the API server, etcd, and kubectl. +// If DownloadBinaryAssets is true, it downloads and uses those paths. +// If DownloadBinaryAssets is false, it only sets paths that are not already configured (empty). +func (te *Environment) configureBinaryPaths() error { + apiServer := te.ControlPlane.GetAPIServer() + + if te.ControlPlane.Etcd == nil { + te.ControlPlane.Etcd = &controlplane.Etcd{} + } + + if te.DownloadBinaryAssets { + apiServerPath, etcdPath, kubectlPath, err := downloadBinaryAssets(context.TODO(), + te.BinaryAssetsDirectory, te.DownloadBinaryAssetsVersion, te.DownloadBinaryAssetsIndexURL) + if err != nil { + return err + } + + apiServer.Path = apiServerPath + te.ControlPlane.Etcd.Path = etcdPath + te.ControlPlane.KubectlPath = kubectlPath + } else { + if apiServer.Path == "" { + apiServer.Path = process.BinPathFinder("kube-apiserver", te.BinaryAssetsDirectory) + } + if te.ControlPlane.Etcd.Path == "" { + te.ControlPlane.Etcd.Path = process.BinPathFinder("etcd", te.BinaryAssetsDirectory) + } + if te.ControlPlane.KubectlPath == "" { + te.ControlPlane.KubectlPath = process.BinPathFinder("kubectl", te.BinaryAssetsDirectory) + } + } + return nil +} + // Start starts a local Kubernetes server and updates te.ApiserverPort with the port it is listening on. func (te *Environment) Start() (*rest.Config, error) { if te.useExistingCluster() { @@ -229,10 +267,6 @@ func (te *Environment) Start() (*rest.Config, error) { } else { apiServer := te.ControlPlane.GetAPIServer() - if te.ControlPlane.Etcd == nil { - te.ControlPlane.Etcd = &controlplane.Etcd{} - } - if os.Getenv(envAttachOutput) == "true" { te.AttachControlPlaneOutput = true } @@ -243,6 +277,9 @@ func (te *Environment) Start() (*rest.Config, error) { if apiServer.Err == nil { apiServer.Err = os.Stderr } + if te.ControlPlane.Etcd == nil { + te.ControlPlane.Etcd = &controlplane.Etcd{} + } if te.ControlPlane.Etcd.Out == nil { te.ControlPlane.Etcd.Out = os.Stdout } @@ -251,20 +288,8 @@ func (te *Environment) Start() (*rest.Config, error) { } } - if te.DownloadBinaryAssets { - apiServerPath, etcdPath, kubectlPath, err := downloadBinaryAssets(context.TODO(), - te.BinaryAssetsDirectory, te.DownloadBinaryAssetsVersion, te.DownloadBinaryAssetsIndexURL) - if err != nil { - return nil, err - } - - apiServer.Path = apiServerPath - te.ControlPlane.Etcd.Path = etcdPath - te.ControlPlane.KubectlPath = kubectlPath - } else { - apiServer.Path = process.BinPathFinder("kube-apiserver", te.BinaryAssetsDirectory) - te.ControlPlane.Etcd.Path = process.BinPathFinder("etcd", te.BinaryAssetsDirectory) - te.ControlPlane.KubectlPath = process.BinPathFinder("kubectl", te.BinaryAssetsDirectory) + if err := te.configureBinaryPaths(); err != nil { + return nil, fmt.Errorf("failed to configure binary paths: %w", err) } if err := te.defaultTimeouts(); err != nil {