From 82b63a009c8232a8d43b379399488b84318aea41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 02:06:47 +0000 Subject: [PATCH] fix(deps): update patch updates --- Makefile | 2 +- go.mod | 54 +- go.sum | 100 +-- oci/Containerfile | 2 +- tools/go.mod | 16 +- tools/go.sum | 20 +- .../nonamedreturns/analyzer/analyzer.go | 189 ++++- .../go-critic/go-critic/checkers/utils.go | 349 +++++----- .../pelletier/go-toml/v2/marshaler.go | 443 +++++++++++- .../github.com/pelletier/go-toml/v2/toml.abnf | 21 +- .../pelletier/go-toml/v2/unmarshaler.go | 123 +++- .../pelletier/go-toml/v2/unstable/kind.go | 2 +- .../go-toml/v2/unstable/marshaler.go | 29 + .../pelletier/go-toml/v2/unstable/parser.go | 36 +- .../go-toml/v2/unstable/unmarshaler.go | 17 +- .../go/analysis/passes/directive/directive.go | 10 +- .../analysis/passes/modernize/errorsastype.go | 7 +- .../go/analysis/passes/modernize/modernize.go | 1 + .../go/analysis/passes/modernize/reflect.go | 47 +- .../golang.org/x/tools/go/ssa/builder.go | 27 - .../vendor/golang.org/x/tools/go/ssa/emit.go | 2 +- .../x/tools/internal/astutil/comment.go | 27 +- .../x/tools/internal/refactor/imports.go | 33 +- .../tools/internal/refactor/inline/inline.go | 70 +- .../x/tools/internal/stdlib/deps.go | 654 +++++++++--------- .../x/tools/internal/stdlib/manifest.go | 287 +++++++- .../tools/internal/typesinternal/zerovalue.go | 16 +- tools/vendor/modules.txt | 16 +- .../IBM/go-sdk-core/v5/core/version.go | 2 +- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/protocol/eventstream/CHANGELOG.md | 4 + .../eventstream/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 13 + .../config/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 13 + .../credentials/go_module_metadata.go | 2 +- .../feature/ec2/imds/CHANGELOG.md | 4 + .../feature/ec2/imds/go_module_metadata.go | 2 +- .../internal/configsources/CHANGELOG.md | 4 + .../configsources/go_module_metadata.go | 2 +- .../internal/endpoints/v2/CHANGELOG.md | 4 + .../endpoints/v2/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/v4a/CHANGELOG.md | 4 + .../internal/v4a/go_module_metadata.go | 2 +- .../internal/accept-encoding/CHANGELOG.md | 4 + .../accept-encoding/go_module_metadata.go | 2 +- .../service/internal/checksum/CHANGELOG.md | 4 + .../internal/checksum/go_module_metadata.go | 2 +- .../internal/presigned-url/CHANGELOG.md | 4 + .../presigned-url/go_module_metadata.go | 2 +- .../service/internal/s3shared/CHANGELOG.md | 9 + .../internal/s3shared/go_module_metadata.go | 2 +- .../internal/s3shared/s3100continue.go | 4 +- .../aws-sdk-go-v2/service/signin/CHANGELOG.md | 13 + .../service/signin/api_client.go | 57 +- .../signin/api_op_CreateOAuth2Token.go | 51 +- ...DeleteConsoleAuthorizationConfiguration.go | 51 +- ...pi_op_DeleteResourcePermissionStatement.go | 50 +- ...op_GetConsoleAuthorizationConfiguration.go | 51 +- .../signin/api_op_GetResourcePolicy.go | 51 +- ...api_op_ListResourcePermissionStatements.go | 50 +- ...op_PutConsoleAuthorizationConfiguration.go | 51 +- .../api_op_PutResourcePermissionStatement.go | 50 +- .../service/signin/generated.json | 1 + .../service/signin/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 13 + .../aws-sdk-go-v2/service/sso/api_client.go | 57 +- .../service/sso/api_op_GetRoleCredentials.go | 51 +- .../service/sso/api_op_ListAccountRoles.go | 50 +- .../service/sso/api_op_ListAccounts.go | 50 +- .../service/sso/api_op_Logout.go | 51 +- .../aws-sdk-go-v2/service/sso/generated.json | 1 + .../service/sso/go_module_metadata.go | 2 +- .../service/ssooidc/CHANGELOG.md | 13 + .../service/ssooidc/api_client.go | 57 +- .../service/ssooidc/api_op_CreateToken.go | 51 +- .../ssooidc/api_op_CreateTokenWithIAM.go | 51 +- .../service/ssooidc/api_op_RegisterClient.go | 51 +- .../api_op_StartDeviceAuthorization.go | 51 +- .../service/ssooidc/generated.json | 1 + .../service/ssooidc/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 13 + .../aws-sdk-go-v2/service/sts/api_client.go | 57 +- .../service/sts/api_op_AssumeRole.go | 51 +- .../service/sts/api_op_AssumeRoleWithSAML.go | 51 +- .../sts/api_op_AssumeRoleWithWebIdentity.go | 51 +- .../service/sts/api_op_AssumeRoot.go | 51 +- .../sts/api_op_DecodeAuthorizationMessage.go | 51 +- .../service/sts/api_op_GetAccessKeyInfo.go | 51 +- .../service/sts/api_op_GetCallerIdentity.go | 51 +- .../sts/api_op_GetDelegatedAccessToken.go | 51 +- .../service/sts/api_op_GetFederationToken.go | 51 +- .../service/sts/api_op_GetSessionToken.go | 51 +- .../service/sts/api_op_GetWebIdentityToken.go | 51 +- .../aws-sdk-go-v2/service/sts/generated.json | 1 + .../service/sts/go_module_metadata.go | 2 +- vendor/github.com/aws/smithy-go/CHANGELOG.md | 9 + .../aws/smithy-go/document/json/encoder.go | 1 + .../aws/smithy-go/encoding/json/value.go | 5 + .../endpoints/private/rulesfn/uri.go | 3 + .../aws/smithy-go/go_module_metadata.go | 2 +- .../aws/smithy-go/transport/http/host.go | 2 +- .../go-openapi/analysis/CONTRIBUTORS.md | 4 +- .../github.com/go-openapi/analysis/README.md | 16 +- .../go-openapi/strfmt/.golangci.yml | 1 + .../go-openapi/strfmt/CONTRIBUTORS.md | 4 +- .../github.com/go-openapi/strfmt/default.go | 8 + .../pelletier/go-toml/v2/marshaler.go | 443 +++++++++++- .../github.com/pelletier/go-toml/v2/toml.abnf | 21 +- .../pelletier/go-toml/v2/unmarshaler.go | 123 +++- .../pelletier/go-toml/v2/unstable/kind.go | 2 +- .../go-toml/v2/unstable/marshaler.go | 29 + .../pelletier/go-toml/v2/unstable/parser.go | 36 +- .../go-toml/v2/unstable/unmarshaler.go | 17 +- .../sdk/go/aws/internal/pulumiUtilities.go | 4 +- .../sdk/go/aws/pulumi-plugin.json | 2 +- .../sdk/go/dockerbuild/image.go | 7 + .../dockerbuild/internal/pulumiUtilities.go | 4 +- .../sdk/go/dockerbuild/pulumi-plugin.json | 2 +- vendor/modules.txt | 54 +- .../v6/value/reflectcache.go | 77 ++- .../structured-merge-diff/v6/value/value.go | 5 + 122 files changed, 2965 insertions(+), 2277 deletions(-) create mode 100644 tools/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go create mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go diff --git a/Makefile b/Makefile index 64c1f96b6..2ca2d9b20 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CIRRUS_CLI ?= v1.0.0 # renovate: datasource=github-releases depName=actions/runner GITHUB_RUNNER ?= 2.335.1 # renovate: datasource=gitlab-releases depName=gitlab-org/gitlab-runner -GITLAB_RUNNER ?= 19.1.0 +GITLAB_RUNNER ?= 19.1.1 # renovate: datasource=github-releases depName=open-telemetry/opentelemetry-collector-releases OTELCOL_VERSION ?= 0.151.0 diff --git a/go.mod b/go.mod index c5c67dd04..afe37c865 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/redhat-developer/mapt go 1.26.0 replace ( - github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 - github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 - github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 + github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.1 + github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.8 + github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.5 ) require ( @@ -25,14 +25,14 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.10.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0 - github.com/IBM/go-sdk-core/v5 v5.22.0 + github.com/IBM/go-sdk-core/v5 v5.22.1 github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 - github.com/aws/aws-sdk-go-v2 v1.42.0 - github.com/aws/aws-sdk-go-v2/config v1.32.25 + github.com/aws/aws-sdk-go-v2 v1.42.1 + github.com/aws/aws-sdk-go-v2/config v1.32.28 github.com/aws/aws-sdk-go-v2/service/ec2 v1.308.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0 - github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 - github.com/pulumi/pulumi-aws-native/sdk v1.70.0 + github.com/aws/aws-sdk-go-v2/service/sts v1.44.0 + github.com/pulumi/pulumi-aws-native/sdk v1.70.1 github.com/pulumi/pulumi-aws/sdk/v7 v7.34.0 github.com/pulumi/pulumi-awsx/sdk/v3 v3.6.0 github.com/pulumi/pulumi-azure-native-sdk/authorization/v3 v3.19.0 @@ -97,10 +97,10 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 // indirect github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/evertras/bubble-table v0.19.2 // indirect @@ -123,16 +123,16 @@ require ( github.com/IBM/platform-services-go-sdk v0.99.2 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.19.24 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 // indirect - github.com/aws/smithy-go v1.27.2 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.27 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.3.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.32.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0 // indirect + github.com/aws/smithy-go v1.27.3 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect // github.com/charmbracelet/bubbles v1.0.0 // indirect @@ -150,7 +150,7 @@ require ( github.com/fxamacker/cbor/v2 v2.9.2 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.25.2 // indirect + github.com/go-openapi/analysis v0.25.3 // indirect github.com/go-openapi/errors v0.22.8 // indirect github.com/go-openapi/jsonpointer v0.23.1 // indirect github.com/go-openapi/jsonreference v0.21.6 // indirect @@ -158,7 +158,7 @@ require ( github.com/go-openapi/runtime v0.32.4 // indirect github.com/go-openapi/runtime/server-middleware v0.32.4 // indirect github.com/go-openapi/spec v0.22.6 // indirect - github.com/go-openapi/strfmt v0.26.3 // indirect + github.com/go-openapi/strfmt v0.26.4 // indirect github.com/go-openapi/swag v0.26.1 // indirect github.com/go-openapi/swag/cmdutils v0.26.1 // indirect github.com/go-openapi/swag/conv v0.26.1 // indirect @@ -196,12 +196,12 @@ require ( github.com/muesli/termenv v0.16.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/ulid/v2 v2.1.1 // indirect - github.com/pelletier/go-toml/v2 v2.4.2 // indirect + github.com/pelletier/go-toml/v2 v2.4.3 // indirect github.com/pjbgf/sha1cd v0.6.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.25.0 // indirect - github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 // indirect + github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.20 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect @@ -233,7 +233,7 @@ require ( k8s.io/utils v0.0.0-20260617174310-a95e086a2553 // 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.4.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.4.1 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 00501c6aa..3d8c2b80c 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/IBM-Cloud/power-go-client v1.16.2 h1:sXJyOHdHcd/aEc8vijEfCVtIG6HrdrOaF2snCcArf34= github.com/IBM-Cloud/power-go-client v1.16.2/go.mod h1:H0KfeqNNKIu/hM7MZMFBJL3+jM2w6CxPA9wlgG3lxBY= -github.com/IBM/go-sdk-core/v5 v5.22.0 h1:ltv4MfXST/1kTtBTfioteRxedYZGcoNH/Zy3NF6jq1g= -github.com/IBM/go-sdk-core/v5 v5.22.0/go.mod h1:cZJMMEImJkIXCd61kHeDFtjbdDpXq4ua4ITrwpBYdWs= +github.com/IBM/go-sdk-core/v5 v5.22.1 h1:5eTGq4IFEMZnb7fRdk+oxQMFvj0cRAUJqdPxojpGtY8= +github.com/IBM/go-sdk-core/v5 v5.22.1/go.mod h1:yO+OQpByKDLTvpEcsFFexgzpeR8eRfCFWAYzxkAu4bk= github.com/IBM/platform-services-go-sdk v0.99.2 h1:vMqFWU8WS/aYiZrA8y+kldJCAhJjM6QfJgxROKumdZY= github.com/IBM/platform-services-go-sdk v0.99.2/go.mod h1:t93mozFmKrxexnKNdx2gNOtEI9Wd62dKAVffQYm0vRM= github.com/IBM/vpc-go-sdk v0.86.0 h1:UO4xFRWLv47+G614DnmtlrnE12+0+XCIXS/JdfXH++s= @@ -64,50 +64,50 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 h1:13qtG4reL2+2UiCm2U7gM9QJthDO8hPPzvn7hTjHask= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3/go.mod h1:wdlMRtz9G4IO6H1yZPsqfGBxR8E6B/bdxHlGkls4kGQ= -github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA= -github.com/aws/aws-sdk-go-v2 v1.42.0/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls= -github.com/aws/aws-sdk-go-v2/config v1.32.25 h1:ACCejvStYoilgwrfegSt5ZntCbPrk52qfwyNcnl3omM= -github.com/aws/aws-sdk-go-v2/config v1.32.25/go.mod h1:LJyU8sDRbXUxFn8xMJIGP+v9QYYwveNLI8a/giAOiAs= -github.com/aws/aws-sdk-go-v2/credentials v1.19.24 h1:2hQqYCV9yqyePQ9o6dCrZc/zO8U3TwPr9mIKlZnPu/I= -github.com/aws/aws-sdk-go-v2/credentials v1.19.24/go.mod h1:IDwpACtwqHLISdzfwUUNq4P9DsB/h5BLg4FwJPNfqFY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 h1:r6qZHbT+wxgWO/e9vYNUEtg7lv5+UN3pRqKhLXvnArg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29/go.mod h1:QRnaRcTVGKPGRy8w78HMQtKUGRYcnMZAANATkeVA6Mo= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 h1:f3vKqSo13fhTYb+JEcXwXefZQE26I1FB5eTSniU67ko= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29/go.mod h1:MzoLFUArKGpGD+ukmPiTPG1X5x4o6M2kq4v2dr1FiEc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 h1:RdwIf/CuUsvJX3RgJagbOyotl/cxoLY4xviKuE7p2GY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29/go.mod h1:71wt8W2EgswdZy9Mf9KNnzxZ3TiZlv4caKghPktDOkA= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 h1:VTGy885W5DKBxWRUJbym9hytNaYzsyaPkCHGRRMAOhU= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30/go.mod h1:AS0HycUvJRFvTt613AYDOgO2jzw+00cVSMny8XB3yMY= +github.com/aws/aws-sdk-go-v2 v1.42.1 h1:9eOTgu1z/dVtYpNZ3/8/XbbaX0x/BqE3HUzAzs6K0ek= +github.com/aws/aws-sdk-go-v2 v1.42.1/go.mod h1:5pKeft2eJj+gElQ38Jqg4ibCqh+/AK33/0X3hip7IjM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 h1:3IZY0XAJquT3aHzbkHfPzy4ACPcEjVG0x87KOwtpqGY= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14/go.mod h1:zwM6veDkhGgQFqkBy+uT28AAYpLu+uFMlPl+rCg/73E= +github.com/aws/aws-sdk-go-v2/config v1.32.28 h1:qY6afygxK5c2PPU3Sz8W6yB5W44RF1vnmPdBwViDN+Y= +github.com/aws/aws-sdk-go-v2/config v1.32.28/go.mod h1:WeS/wN1IDs8YC+BxTrFz9ZyJ1rufRBQfirOcDusEpmQ= +github.com/aws/aws-sdk-go-v2/credentials v1.19.27 h1:cFksKkdaBGGmpe6XJpvrxFNWkbXY5/gwFqZNB2O9WCM= +github.com/aws/aws-sdk-go-v2/credentials v1.19.27/go.mod h1:20CoObBgNhFfl8/ggDQu2IZmItxDhkLcWSy4C3alDPI= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 h1:/hi1JADLEW9YYryEz1w4GQu0EtP23pP553Cf9KgsDV4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30/go.mod h1:/3AOgy4K17Dm4ucMZVC/MJkzy5kmfKUcINRHZyo0koQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 h1:xM/Is9cKMHa8Jj8zkvWhvrFkZsXJV9E+BB4g0HW0duQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30/go.mod h1:WueJeNDZvK1fMYEWJIkcivBfEzUkTpBhzlrUKKY8EuA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 h1:jn46zC9LdsVR/ZpMIJqMqb8hHv31BlLx3ulVqNspUOk= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30/go.mod h1:1hTMsAgbdS/AtUi4bw8+gUuh1pceo+eXRLfpSuSQj3M= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 h1:3GUprIsfmGcC5SACIyB0e7E0BM1O1b3Erl5CePYIAeQ= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31/go.mod h1:7PuV1yl5e2xnUbm+RqvVg5i2iBM8EyijZNoI9wsOoOc= github.com/aws/aws-sdk-go-v2/service/ec2 v1.308.0 h1:xBP+yWpveXD/PxK7HRMcoG6yj1vdOjSahAg4qPomF+0= github.com/aws/aws-sdk-go-v2/service/ec2 v1.308.0/go.mod h1:8mrDF7OtbuL0QpwP4YCvLuoOE4/5lL7D33MXgp069/Y= github.com/aws/aws-sdk-go-v2/service/ecs v1.85.0 h1:1e9htzu1Yykx0SSNd8dpWJXa5g8i9Wcl1ngdjPaBHsM= github.com/aws/aws-sdk-go-v2/service/ecs v1.85.0/go.mod h1:0vahPCh3slyORHbSuAP8YDyJKLEUQAMX7+bzYGxEnVI= github.com/aws/aws-sdk-go-v2/service/iam v1.54.5 h1:a/gAOhIOi+vHYeRU224WIXlJrLXs4Z1Qbm92vfX64jc= github.com/aws/aws-sdk-go-v2/service/iam v1.54.5/go.mod h1:tMNzI+fYFCk4cIdZ7FEybLzShwnmWkfxQw85ED1b4ng= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 h1:V51LGlOq/1VsDsHUdoklAQi7rMmx4qQubvFYAlP2254= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22/go.mod h1:4Pzhyz8hJOm2bepgl+NjvRx8vlUFAIIvJnZ/MkcNPpU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 h1:DRebniUGZ2MqiiIVmQJ04vIXr918hubdHMnarSLEWyU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29/go.mod h1:LfRkPCD8YHDM2E5eTkos2UpwYeZnBcVarTa8L59bJHA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 h1:hiME6pBzC7OTl9LMtlyTWBuEl1f4QBcUmFDKC7MLXtc= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29/go.mod h1:G7RP+uhagpKtKhd1BM9N6JQqjCcGEU47K5lBVZQyRQw= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 h1:mbRIur/BiHK6SKPjoBIXSE/hJ6g6JGRLuxQy1jGjlN4= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13/go.mod h1:ITg9em2KbJx1s0y4aqRX5OYWG6HBZ5TVR//OdpEZ2CQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 h1:9Fjh6fi/U5JEStVZijmaMpUwE/gvBJj7x2B/PjbO9To= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23/go.mod h1:iMoT2f1tClxrWAAnKCXjZQ6LOmfLrMG14wmnWpM+F14= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 h1:/Z5jmNrKsSD7EmDjzAPsm/3L9IuOkzaynklJZ1qX7S4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30/go.mod h1:lEzEZnOosE7zi8Z6royW1cFJTD9fpab4Ul1SBrllewk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 h1:uao4A3QZ5UmB326V6KF+qRpv9Tjz7IlnlnTbbANntlU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31/go.mod h1:I/1+z0VwL1GhQyLgkoHDlygpUZ+iTAwOQ/NsftiUL2I= github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7 h1:1kgjCE5D1kxDD1ouqYda7590UEjJ6AQiEbzTVxtHk/k= github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7/go.mod h1:R/LmxYGRy1KePN3vIeIK5rsHcmSLPCTcI7Kjhardqog= github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0 h1:ta8csKy5vN91F3i5gGR85lFV0srBqySEji7Jroes6rE= github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0/go.mod h1:77ZAgynvx1txMvDG8gGWoWkO1augYDxkp9JElWFgjQU= -github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 h1:3nXpRcFwRCW8n7HgO2QGy0Dc20eQNfBuUemGQhpF8m8= -github.com/aws/aws-sdk-go-v2/service/signin v1.2.0/go.mod h1:LxYujSTLPRlp2vTtcUO/+1ilrew8ytt6SvQyOgejzFQ= -github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 h1:ey1XLTYXb9PcLt4535632o5kCGXNXEhNb620Dqwuylo= -github.com/aws/aws-sdk-go-v2/service/sso v1.31.3/go.mod h1:Lk7PlmoTYryQmyBG0EXqj5BcUbj3whXdU2s3yGI3EAc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 h1:yLr03zQE/5Eu5l3QU0Si+xMbLMbSDF2YXsigqXngs6g= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6/go.mod h1:Q5N6icH+KJZDLh+ESNwzdv6cZ6vLFF/egy3IOxWhmz4= -github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 h1:VrIhKRCSK1umelSgB9RghvA9RTUYeQffyAS5ApXehNI= -github.com/aws/aws-sdk-go-v2/service/sts v1.43.3/go.mod h1:r8wkDOuLaaMFqFiYAb8dGY2A3gJCOujMc6CFOVC4Zhc= -github.com/aws/smithy-go v1.27.2 h1:y9NPmSE6am6LjEFPfqHqG/jJk7AauQvhCJONKh7kpzk= -github.com/aws/smithy-go v1.27.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/aws-sdk-go-v2/service/signin v1.3.0 h1:i0+tbB9QBnzL5NrF2WR/zk8q2s+1N+RaDYr2627E8UI= +github.com/aws/aws-sdk-go-v2/service/signin v1.3.0/go.mod h1:mxC0nT/C8wMMS97DemZPzvUZxvIt+2Iq+eS3JdFZGgg= +github.com/aws/aws-sdk-go-v2/service/sso v1.32.0 h1:qjMmry/cBDee1E/2gyvel0uRYCi3mwRZ2hf6N+GAodo= +github.com/aws/aws-sdk-go-v2/service/sso v1.32.0/go.mod h1:u8af9Nqkmqnr96f7v9nHqzZT9XBwbXEkTiqT4ROuJSE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0 h1:fpOlDPI55HdszaxapEGk6HsGosOUaM2YPWJpjMgp8UI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0/go.mod h1:DMPWJBjYs6+3+f/qhBFEFPPlQ6NlhWjai3dJNvipJ84= +github.com/aws/aws-sdk-go-v2/service/sts v1.44.0 h1:bLZ0PolJ8J+HkJHztcXORUpHXBye2U8298lCEMi6ZCU= +github.com/aws/aws-sdk-go-v2/service/sts v1.44.0/go.mod h1:9gdl4RrflIdpDb2TlXshWgR1F9TeCkvqDx77Vpr4Z/Q= +github.com/aws/smithy-go v1.27.3 h1:F3Zb497UhhskkfpJmfkXswyo+t0sh9OTBnIHjogWbVY= +github.com/aws/smithy-go v1.27.3/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= 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/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= @@ -198,8 +198,8 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.25.2 h1:I0vy4n3alz+DHTiN1PRhCb7QZxkK6g5YmswZKv2TKuw= -github.com/go-openapi/analysis v0.25.2/go.mod h1:Uhs1t/2XR10EnwONYILGEzw8gcfGIG5Xk5K2AxnhqDo= +github.com/go-openapi/analysis v0.25.3 h1:4zlcg85pd2xq3sEgjW887n1IpwCpCqTmqeT6dP9OxDw= +github.com/go-openapi/analysis v0.25.3/go.mod h1:6PEmUIra9/rn6SPstzbrMkhFAsMB2qm7g6E+4DRFyCU= github.com/go-openapi/errors v0.22.8 h1:oP7sW7TWc3wFFjrzzj0nI83H2qMBkNjNfSd+XRejk/I= github.com/go-openapi/errors v0.22.8/go.mod h1:BuUoHcYrU6E7V9gfj1I5wLQqgtIHnup/alXZ8KdgQ0w= github.com/go-openapi/jsonpointer v0.23.1 h1:1HBACs7XIwR2RcmItfdSFlALhGbe6S92p0ry4d1GWg4= @@ -214,8 +214,8 @@ github.com/go-openapi/runtime/server-middleware v0.32.4 h1:AU6eLMq9CXwh8f6kC1piv github.com/go-openapi/runtime/server-middleware v0.32.4/go.mod h1:fYPep4GdTwg/XqZUjR40uIM/8C12Ba5M+MrGCiwpTHo= github.com/go-openapi/spec v0.22.6 h1:Tyy1pLaNCM8GBCFLoGYLonjJi6zykqyLCjXLc19ZPic= github.com/go-openapi/spec v0.22.6/go.mod h1:HZvTHat+iH0PALQRWhrqIHtU/PEqxqd89fu0MxGlMeM= -github.com/go-openapi/strfmt v0.26.3 h1:rzmslHarJgBbf2qfGge+X3htclQfmXqBZMm0Too0HhU= -github.com/go-openapi/strfmt v0.26.3/go.mod h1:a5nsUw0oRpQzZeOwx8bi6cKbzFZslpbCKt1LEot+KnQ= +github.com/go-openapi/strfmt v0.26.4 h1:yI6IAEfcWow459BD5UzFY430KUwXZwBHrYusPFkhWlc= +github.com/go-openapi/strfmt v0.26.4/go.mod h1:hNJi6nb5ETD6i7A1yRo03M9S6ZoTPPoWff1iUexmfUc= github.com/go-openapi/swag v0.26.1 h1:l5sVEyVpwj+DDYeZyo7wQI/Ebn/mKYIyGB/pFwAfGoQ= github.com/go-openapi/swag v0.26.1/go.mod h1:yNY38BbIVthxbkDtq1UHBCGasBqjakW3lCR6ANzdBEw= github.com/go-openapi/swag/cmdutils v0.26.1 h1:f2iE1ijYaJ3nuu5PaEMx3zpEhzhZFgivCJObWEObLIQ= @@ -244,8 +244,8 @@ github.com/go-openapi/swag/yamlutils v0.26.1 h1:0TSLK+lXs9vfIhAWzBeI/lOzEnIoot6W github.com/go-openapi/swag/yamlutils v0.26.1/go.mod h1:7W5b7PRX9MxwL7TjeG7H8HkyBGRsIDRObhyMWFgBI2M= github.com/go-openapi/testify/enable/yaml/v2 v2.5.1 h1:q9NtHwK4qHF7yZziBPvZyv7zWAIk8ok88Gh2mR6Jpc8= github.com/go-openapi/testify/enable/yaml/v2 v2.5.1/go.mod h1:JW0MXIotCYps/XsgJnG3a8Q7rE5xAiBwoOD5OfaIQBk= -github.com/go-openapi/testify/v2 v2.5.1 h1:TMdhCaw8fUNraVSf3Omoob1dO/AzBfhtFAPW0an6sBo= -github.com/go-openapi/testify/v2 v2.5.1/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= +github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug= +github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= github.com/go-openapi/validate v0.26.0 h1:dxWzQ3F+vb1SajqUxHjwb5T4mTpSHmdrtv5Bi7+ZNhw= github.com/go-openapi/validate v0.26.0/go.mod h1:b4o00uq7fJeJA+wWhVFCJpKTctzeFwzZImGGmHsl2JA= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= @@ -378,8 +378,8 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pelletier/go-toml/v2 v2.4.2 h1:M2fKKbmyvI+hGId/D0W64qDBMVhJnNR10O5gIbMc//Q= -github.com/pelletier/go-toml/v2 v2.4.2/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY= +github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU= github.com/pgavlin/fx v0.1.6/go.mod h1:KWZJ6fqBBSh8GxHYqwYCf3rYE7Gp2p0N8tJp8xv9u9M= github.com/pgavlin/fx/v2 v2.0.12 h1:SjjaJ68Dt8Z4zHwOpY/RPijd7lShs6xYupJbF9ra00M= @@ -399,8 +399,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.25.0 h1:U31tSec7ikQuj4RG3Nhm3mqBz/dp+2MQDLA3bY6/v3w= github.com/pulumi/esc v0.25.0/go.mod h1:A6rZBVCQBZepaOyt+xoZjPHtC4kKqxapkJ8wKB5VT7k= -github.com/pulumi/pulumi-aws-native/sdk v1.70.0 h1:G4rZwhT6GQX+a83YPWRN123PoGoOoq7njNzb9Vkbb48= -github.com/pulumi/pulumi-aws-native/sdk v1.70.0/go.mod h1:08HfiYFanToWN1uRzHgjoXUNGyzKG3vHthcmZ/a1s5A= +github.com/pulumi/pulumi-aws-native/sdk v1.70.1 h1:YLflulgSAvQYuj8xGFMJTFmrvU4rsplpVxOKw8Mc4S4= +github.com/pulumi/pulumi-aws-native/sdk v1.70.1/go.mod h1:08HfiYFanToWN1uRzHgjoXUNGyzKG3vHthcmZ/a1s5A= github.com/pulumi/pulumi-aws/sdk/v7 v7.34.0 h1:egFPsdDNFwDccQ5SPkmrbmI2I2XtPpWBsNkl0EqLK4g= github.com/pulumi/pulumi-aws/sdk/v7 v7.34.0/go.mod h1:jgGcMiHJTSvFB1hHa1Bnc0JmHiCub2RSrTtBPZYfEz4= github.com/pulumi/pulumi-awsx/sdk/v3 v3.6.0 h1:HrO2LGephMNHBLOOZRCHUUZbc6lyo9oELDLlbzFhU3Y= @@ -423,8 +423,8 @@ github.com/pulumi/pulumi-azure-native-sdk/v3 v3.19.0 h1:Mfl+Z1zZuLXuEn//PRi8mnnA github.com/pulumi/pulumi-azure-native-sdk/v3 v3.19.0/go.mod h1:qniEet/A/m6/0IFkzN0IWI0VMl5fkI5r27RPAqA2dtM= github.com/pulumi/pulumi-command/sdk v1.2.1 h1:mAziZ91a/9U+5IjZH5Skcar80OSmpBSYljeQNRblTWQ= github.com/pulumi/pulumi-command/sdk v1.2.1/go.mod h1:hQxv9DXg6bFjcd9BEiNdMImQ/V1rnC9D115q5VXYNps= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 h1:rYAxB0nOsif4U5MCZWcXJ0FvnbL4YtbdhWLiRiEwdPE= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19/go.mod h1:iRiNhXmySLlREgx1zeoD4Es62WU2jTpd5YXdZ/0AQB4= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.20 h1:8VJt/iUb1ur3ou0wz+3sSvEMqV9qSi/JOAlb0GAKoZk= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.20/go.mod h1:iRiNhXmySLlREgx1zeoD4Es62WU2jTpd5YXdZ/0AQB4= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8 h1:rik9L2SIpsoDenY51MkogR6GWgu/0Sy/XmyQmKWNUqU= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8/go.mod h1:eph7BPNPkEIIK882/Ll4dbeHl5wZEc/UvTcUW0CK1UY= github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.1 h1:DPDQD9FamQ3myy0EQOYuzUFvcJpQDr1H3GNwz/scDgA= @@ -646,7 +646,7 @@ sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5E 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.4.0 h1:qmp2e3ZfFi1/jJbDGpD4mt3wyp6PE1NfKHCYLqgNQJo= -sigs.k8s.io/structured-merge-diff/v6 v6.4.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.4.1 h1:AkER7js0XVWi/F/V2Iwl5N7O/B9VP2JyrOMmHPdco+g= +sigs.k8s.io/structured-merge-diff/v6 v6.4.1/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/oci/Containerfile b/oci/Containerfile index fa8930b8f..da1792c10 100644 --- a/oci/Containerfile +++ b/oci/Containerfile @@ -32,7 +32,7 @@ ARG PULUMI_TLS_VERSION=v5.5.0 # renovate: datasource=github-releases depName=pulumi/pulumi-random ARG PULUMI_RANDOM_VERSION=v4.21.0 # renovate: datasource=github-releases depName=pulumi/pulumi-aws-native -ARG PULUMI_AWS_NATIVE_VERSION=v1.70.0 +ARG PULUMI_AWS_NATIVE_VERSION=v1.70.1 # renovate: datasource=github-releases depName=pulumi/pulumi-gitlab ARG PULUMI_GITLAB_VERSION=v9.11.1 # renovate: datasource=github-releases depName=mapt-oss/pulumi-ibmcloud diff --git a/tools/go.mod b/tools/go.mod index 26e588e5b..5469105c1 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -3,9 +3,9 @@ module github.com/redhat-developer/mapt/tools go 1.26.0 replace ( - github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 - github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 - github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 + github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.1 + github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.8 + github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.5 ) require github.com/golangci/golangci-lint/v2 v2.12.2 @@ -28,7 +28,7 @@ require ( ) require ( - charm.land/lipgloss/v2 v2.0.4 // indirect + charm.land/lipgloss/v2 v2.0.5 // indirect github.com/ClickHouse/clickhouse-go-linter v1.2.1 // indirect github.com/charmbracelet/ultraviolet v0.0.0-20260622092850-f39628c8a989 // indirect github.com/charmbracelet/x/termios v0.1.1 // indirect @@ -105,11 +105,11 @@ require ( github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.19.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.7 // indirect + github.com/firefart/nonamedreturns v1.0.8 // indirect github.com/fsnotify/fsnotify v1.10.1 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghostiam/protogetter v0.3.21 // indirect - github.com/go-critic/go-critic v0.14.3 // indirect + github.com/go-critic/go-critic v0.14.4 // 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 @@ -172,7 +172,7 @@ require ( 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/pelletier/go-toml/v2 v2.4.2 // indirect + github.com/pelletier/go-toml/v2 v2.4.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect @@ -232,7 +232,7 @@ require ( golang.org/x/sync v0.21.0 // indirect golang.org/x/sys v0.46.0 // indirect golang.org/x/text v0.38.0 // indirect - golang.org/x/tools v0.46.0 // indirect + golang.org/x/tools v0.47.0 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.7.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index facc20762..8da87bdec 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -2,8 +2,8 @@ 4d63.com/gocheckcompilerdirectives v1.4.0/go.mod h1:9ZOAiMOjqC/nRwci2fcUXVHUNLG/cH6r6rhUh+jTFtQ= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -charm.land/lipgloss/v2 v2.0.4 h1:lcPeVtcp23SNra7lHy8iYE4UC2aIipVQ47sbGyyxR5Q= -charm.land/lipgloss/v2 v2.0.4/go.mod h1:0653x8epbZSzdDfO/XPS1a/uYPOBeSsCssOpJOqDzik= +charm.land/lipgloss/v2 v2.0.5 h1:kbNxgeeUOYv5J0YdpxFjfvf3dFvqH8Aci4zB6xqFtrY= +charm.land/lipgloss/v2 v2.0.5/go.mod h1:9oqhxt4yxIMe6q5A4kHr44DremZk7J9UNh74GlWa5nc= codeberg.org/chavacava/garif v0.2.1 h1:K9oYxSlvlXrHXyW26Z4q61bTpJDo1wbvXcYKar/F/LM= codeberg.org/chavacava/garif v0.2.1/go.mod h1:oHnDSmc0f9K1MeE+MQD/yjkiIB5Xsn5y3S9Dg96Xk84= codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI= @@ -128,8 +128,8 @@ github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= 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/firefart/nonamedreturns v1.0.7 h1:gIrbIri68tN9rneOoWzBTA4B+rh5qP5Yq0yILeQwSfo= -github.com/firefart/nonamedreturns v1.0.7/go.mod h1:Kj/SHlG7im9GjmGfGBij361DJmPhOXZhydgHeJT1Xt4= +github.com/firefart/nonamedreturns v1.0.8 h1:iB32Dl17zJl1zlVEj/WlUWgx0HiRyQ85OUw1WHa4/II= +github.com/firefart/nonamedreturns v1.0.8/go.mod h1:vxFNvm5AfP/8rgAKFzYmnqx0yp1HjrYsErZ9pHPTznA= 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.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= @@ -138,8 +138,8 @@ 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.21 h1:EeWTGvL/Eyosp653hiWb6Byx4b69iJC4/E+za7vQHoI= github.com/ghostiam/protogetter v0.3.21/go.mod h1:iAKSpyoHwYzay+OpjoWgwzRtPFthEfuUvmlomTThck0= -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-critic/go-critic v0.14.4 h1:dSX4C3pWSeuMVxvQh6yG8U0ReSf3YOmKi4nwX5q7n/8= +github.com/go-critic/go-critic v0.14.4/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= 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-quicktest/qt v1.102.0 h1:HSQxCeh5YZH3EL3W39ixjtyaEhcWSXQHtHnMBzSs474= @@ -320,8 +320,8 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ 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/v2 v2.4.2 h1:M2fKKbmyvI+hGId/D0W64qDBMVhJnNR10O5gIbMc//Q= -github.com/pelletier/go-toml/v2 v2.4.2/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY= +github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= @@ -534,8 +534,8 @@ golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0t 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.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk= -golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys= +golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q= +golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA= 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= diff --git a/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go b/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go index 04abc2699..745120769 100644 --- a/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go +++ b/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go @@ -4,6 +4,7 @@ import ( "errors" "flag" "go/ast" + "go/token" "go/types" "golang.org/x/tools/go/analysis" @@ -11,7 +12,10 @@ import ( "golang.org/x/tools/go/ast/inspector" ) -const FlagReportErrorInDefer = "report-error-in-defer" +const ( + FlagReportErrorInDefer = "report-error-in-defer" + FlagAllowUnusedNamedReturns = "allow-unused-named-returns" +) var Analyzer = &analysis.Analyzer{ Name: "nonamedreturns", @@ -24,11 +28,13 @@ var Analyzer = &analysis.Analyzer{ func flags() flag.FlagSet { fs := flag.FlagSet{} fs.Bool(FlagReportErrorInDefer, false, "report named error if it is assigned inside defer") + fs.Bool(FlagAllowUnusedNamedReturns, false, "allow named returns in the signature but report them if referenced in the body or used by a naked return") return fs } func run(pass *analysis.Pass) (any, error) { reportErrorInDefer := pass.Analyzer.Flags.Lookup(FlagReportErrorInDefer).Value.String() == "true" + allowUnusedNamedReturns := pass.Analyzer.Flags.Lookup(FlagAllowUnusedNamedReturns).Value.String() == "true" errorType := types.Universe.Lookup("error").Type() inspector, ok := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) @@ -36,7 +42,7 @@ func run(pass *analysis.Pass) (any, error) { return nil, errors.New("failed to get inspector") } - // only filter function defintions + // only filter function definitions nodeFilter := []ast.Node{ (*ast.FuncDecl)(nil), (*ast.FuncLit)(nil), @@ -67,10 +73,45 @@ func run(pass *analysis.Pass) (any, error) { return } - // deferUsed and assigned are computed lazily and at most once per - // function: the relatively expensive body walk only happens when there - // is an error-typed named return whose defer exemption we need to check. + if allowUnusedNamedReturns { + var referenced map[types.Object]bool + var hasNakedReturn bool + usageComputed := false + + for _, p := range funcResults.List { + if len(p.Names) == 0 { + continue + } + + for _, n := range p.Names { + if n.Name == "_" { + continue + } + + if !usageComputed { + referenced, hasNakedReturn = collectNamedReturnUsage(funcBody, pass.TypesInfo) + usageComputed = true + } + + obj := pass.TypesInfo.ObjectOf(n) + if referenced[obj] || hasNakedReturn { + pass.Reportf(n.Pos(), "named return %q with type %q must not be referenced or used by a naked return", n.Name, types.ExprString(p.Type)) + } + } + } + + return + } + + // existing behavior: report every named return (subject to the + // error-in-defer exemption) + + // deferUsed, assigned and hasReturnWithResults are computed lazily and + // at most once per function: the relatively expensive body walk only + // happens when there is an error-typed named return whose defer + // exemption we need to check. var deferUsed, assigned map[types.Object]bool + var hasReturnWithResults bool for _, p := range funcResults.List { if len(p.Names) == 0 { @@ -88,14 +129,16 @@ func run(pass *analysis.Pass) (any, error) { // A named error return is allowed when it is referenced inside a defer // (e.g. to inspect or modify it before returning) as long as it is also // assigned somewhere in the function body. The assignment may happen - // inside the defer itself or anywhere else in the function. + // inside the defer itself, anywhere else in the function, or implicitly + // via a `return` statement with result values (which assigns every + // named return before the defers run). if !reportErrorInDefer && isError { if deferUsed == nil { - deferUsed, assigned = collectDeferUsageAndAssignments(funcBody, pass.TypesInfo) + deferUsed, assigned, hasReturnWithResults = collectDeferUsageAndAssignments(funcBody, pass.TypesInfo) } obj := pass.TypesInfo.ObjectOf(n) - if deferUsed[obj] && assigned[obj] { + if deferUsed[obj] && (assigned[obj] || hasReturnWithResults) { continue } } @@ -111,41 +154,121 @@ func run(pass *analysis.Pass) (any, error) { // collectDeferUsageAndAssignments walks body a single time and returns: // - deferUsed: objects referenced (read or written) inside a deferred func literal // - assigned: objects that appear on the left-hand side of an assignment -// anywhere in the body, including inside a deferred func literal +// (including `for ... = range` statements) anywhere in the body, including +// inside a deferred func literal +// - hasReturnWithResults: true if the body contains a `return` statement with +// result values at the top level of the function. Such a return implicitly +// assigns every named return before the defers run, so it counts as an +// assignment for all of them. Returns inside nested closures (including the +// deferred closure itself) populate the closure's own results and are +// therefore excluded. // // Variable shadowing is handled naturally: a shadowed declaration introduces a // distinct types.Object, so it does not match the outer named return. -func collectDeferUsageAndAssignments(body *ast.BlockStmt, info *types.Info) (map[types.Object]bool, map[types.Object]bool) { +func collectDeferUsageAndAssignments(body *ast.BlockStmt, info *types.Info) (map[types.Object]bool, map[types.Object]bool, bool) { deferUsed := make(map[types.Object]bool) assigned := make(map[types.Object]bool) + hasReturnWithResults := false - ast.Inspect(body, func(node ast.Node) bool { - switch n := node.(type) { - case *ast.AssignStmt: - for _, lh := range n.Lhs { - if i, ok := lh.(*ast.Ident); ok { - if obj := info.ObjectOf(i); obj != nil { - assigned[obj] = true + markAssigned := func(expr ast.Expr) { + if i, ok := expr.(*ast.Ident); ok { + if obj := info.ObjectOf(i); obj != nil { + assigned[obj] = true + } + } + } + + var walk func(node ast.Node, inClosure bool) + walk = func(node ast.Node, inClosure bool) { + ast.Inspect(node, func(n ast.Node) bool { + switch x := n.(type) { + case *ast.AssignStmt: + for _, lh := range x.Lhs { + markAssigned(lh) + } + case *ast.RangeStmt: + if x.Tok == token.ASSIGN { + if x.Key != nil { + markAssigned(x.Key) + } + if x.Value != nil { + markAssigned(x.Value) } } - } - case *ast.DeferStmt: - if fn, ok := n.Call.Fun.(*ast.FuncLit); ok { - ast.Inspect(fn.Body, func(inner ast.Node) bool { - if i, ok := inner.(*ast.Ident); ok { - if obj := info.ObjectOf(i); obj != nil { - deferUsed[obj] = true + case *ast.ReturnStmt: + // a return inside a closure populates the closure's own + // results, not the enclosing function's named returns + if !inClosure && len(x.Results) > 0 { + hasReturnWithResults = true + } + case *ast.DeferStmt: + if fn, ok := x.Call.Fun.(*ast.FuncLit); ok { + ast.Inspect(fn.Body, func(inner ast.Node) bool { + if i, ok := inner.(*ast.Ident); ok { + if obj := info.ObjectOf(i); obj != nil { + deferUsed[obj] = true + } } - } - return true - }) + return true + }) + } + // keep descending (via the FuncLit case below) so assignments + // and nested defers inside the deferred closure are still + // collected by the outer walk + case *ast.FuncLit: + // everything inside a closure (deferred or not) is in-closure + // for return purposes, but assignments to captured named + // returns still count + walk(x.Body, true) + return false } - } + return true + }) + } + walk(body, false) - // keep descending so assignments (and nested defers) inside a deferred - // closure are still collected by the outer walk - return true - }) + return deferUsed, assigned, hasReturnWithResults +} + +// collectNamedReturnUsage walks body a single time and returns: +// - referenced: objects referenced (read or written) anywhere in the body, +// including inside nested closures (which may capture the outer named return) +// - hasNakedReturn: true if the body contains a return statement with no result +// expressions at the top level of the function (naked returns inside nested +// closures are excluded because they populate the closure's own results, not +// the enclosing function's named returns) +// +// Shadowing is handled naturally: a shadowed declaration introduces a distinct +// types.Object, so it does not match the outer named return. +func collectNamedReturnUsage(body *ast.BlockStmt, info *types.Info) (map[types.Object]bool, bool) { + referenced := make(map[types.Object]bool) + hasNakedReturn := false + + var walk func(node ast.Node, inClosure bool) + walk = func(node ast.Node, inClosure bool) { + ast.Inspect(node, func(n ast.Node) bool { + switch x := n.(type) { + case *ast.Ident: + if obj := info.ObjectOf(x); obj != nil { + referenced[obj] = true + } + case *ast.ReturnStmt: + // a naked return inside a closure populates the closure's + // own results, not the enclosing function's named returns + if !inClosure && len(x.Results) == 0 { + hasNakedReturn = true + } + case *ast.FuncLit: + // keep collecting referenced identifiers (closures can + // capture the outer named return), but everything inside + // the closure is in-closure for naked-return purposes + walk(x.Body, true) + return false + } + return true + }) + } + walk(body, false) - return deferUsed, assigned + return referenced, hasNakedReturn } diff --git a/tools/vendor/github.com/go-critic/go-critic/checkers/utils.go b/tools/vendor/github.com/go-critic/go-critic/checkers/utils.go index 5740f0d4d..89d757069 100644 --- a/tools/vendor/github.com/go-critic/go-critic/checkers/utils.go +++ b/tools/vendor/github.com/go-critic/go-critic/checkers/utils.go @@ -12,172 +12,189 @@ import ( // `internal` and `vendor` packages are excluded. // Used to detect packages that belong to standard Go packages distribution. var goStdlib = map[string]bool{ - "archive/tar": true, - "archive/zip": true, - "bufio": true, - "bytes": true, - "cmp": true, - "compress/bzip2": true, - "compress/flate": true, - "compress/gzip": true, - "compress/lzw": true, - "compress/zlib": true, - "container/heap": true, - "container/list": true, - "container/ring": true, - "context": true, - "crypto": true, - "crypto/aes": true, - "crypto/cipher": true, - "crypto/des": true, - "crypto/dsa": true, - "crypto/ecdh": true, - "crypto/ecdsa": true, - "crypto/ed25519": true, - "crypto/elliptic": true, - "crypto/hmac": true, - "crypto/md5": true, - "crypto/rand": true, - "crypto/rc4": true, - "crypto/rsa": true, - "crypto/sha1": true, - "crypto/sha256": true, - "crypto/sha512": true, - "crypto/subtle": true, - "crypto/tls": true, - "crypto/x509": true, - "crypto/x509/pkix": true, - "database/sql": true, - "database/sql/driver": true, - "debug/buildinfo": true, - "debug/dwarf": true, - "debug/elf": true, - "debug/gosym": true, - "debug/macho": true, - "debug/pe": true, - "debug/plan9obj": true, - "embed": true, - "encoding": true, - "encoding/ascii85": true, - "encoding/asn1": true, - "encoding/base32": true, - "encoding/base64": true, - "encoding/binary": true, - "encoding/csv": true, - "encoding/gob": true, - "encoding/hex": true, - "encoding/json": true, - "encoding/pem": true, - "encoding/xml": true, - "errors": true, - "expvar": true, - "flag": true, - "fmt": true, - "go/ast": true, - "go/build": true, - "go/build/constraint": true, - "go/constant": true, - "go/doc": true, - "go/doc/comment": true, - "go/format": true, - "go/importer": true, - "go/parser": true, - "go/printer": true, - "go/scanner": true, - "go/token": true, - "go/types": true, - "go/version": true, - "hash": true, - "hash/adler32": true, - "hash/crc32": true, - "hash/crc64": true, - "hash/fnv": true, - "hash/maphash": true, - "html": true, - "html/template": true, - "image": true, - "image/color": true, - "image/color/palette": true, - "image/draw": true, - "image/gif": true, - "image/jpeg": true, - "image/png": true, - "index/suffixarray": true, - "io": true, - "io/fs": true, - "io/ioutil": true, - "iter": true, - "log": true, - "log/slog": true, - "log/syslog": true, - "maps": true, - "math": true, - "math/big": true, - "math/bits": true, - "math/cmplx": true, - "math/rand": true, - "math/rand/v2": true, - "mime": true, - "mime/multipart": true, - "mime/quotedprintable": true, - "net": true, - "net/http": true, - "net/http/cgi": true, - "net/http/cookiejar": true, - "net/http/fcgi": true, - "net/http/httptest": true, - "net/http/httptrace": true, - "net/http/httputil": true, - "net/http/pprof": true, - "net/mail": true, - "net/netip": true, - "net/rpc": true, - "net/rpc/jsonrpc": true, - "net/smtp": true, - "net/textproto": true, - "net/url": true, - "os": true, - "os/exec": true, - "os/signal": true, - "os/user": true, - "path": true, - "path/filepath": true, - "plugin": true, - "reflect": true, - "regexp": true, - "regexp/syntax": true, - "runtime": true, - "runtime/cgo": true, - "runtime/coverage": true, - "runtime/debug": true, - "runtime/metrics": true, - "runtime/pprof": true, - "runtime/race": true, - "runtime/trace": true, - "slices": true, - "sort": true, - "strconv": true, - "strings": true, - "structs": true, - "sync": true, - "sync/atomic": true, - "syscall": true, - "testing": true, - "testing/fstest": true, - "testing/iotest": true, - "testing/quick": true, - "testing/slogtest": true, - "text/scanner": true, - "text/tabwriter": true, - "text/template": true, - "text/template/parse": true, - "time": true, - "time/tzdata": true, - "unicode": true, - "unicode/utf16": true, - "unicode/utf8": true, - "unique": true, - "unsafe": true, + "archive/tar": true, + "archive/zip": true, + "bufio": true, + "bytes": true, + "cmp": true, + "compress/bzip2": true, + "compress/flate": true, + "compress/gzip": true, + "compress/lzw": true, + "compress/zlib": true, + "container/heap": true, + "container/list": true, + "container/ring": true, + "context": true, + "crypto": true, + "crypto/aes": true, + "crypto/cipher": true, + "crypto/des": true, + "crypto/dsa": true, + "crypto/ecdh": true, + "crypto/ecdsa": true, + "crypto/ed25519": true, + "crypto/elliptic": true, + "crypto/fips140": true, + "crypto/hkdf": true, + "crypto/hmac": true, + "crypto/hpke": true, + "crypto/md5": true, + "crypto/mldsa": true, + "crypto/mlkem": true, + "crypto/mlkem/mlkemtest": true, + "crypto/pbkdf2": true, + "crypto/rand": true, + "crypto/rc4": true, + "crypto/rsa": true, + "crypto/sha1": true, + "crypto/sha256": true, + "crypto/sha3": true, + "crypto/sha512": true, + "crypto/subtle": true, + "crypto/tls": true, + "crypto/x509": true, + "crypto/x509/pkix": true, + "database/sql": true, + "database/sql/driver": true, + "debug/buildinfo": true, + "debug/dwarf": true, + "debug/elf": true, + "debug/gosym": true, + "debug/macho": true, + "debug/pe": true, + "debug/plan9obj": true, + "embed": true, + "encoding": true, + "encoding/ascii85": true, + "encoding/asn1": true, + "encoding/base32": true, + "encoding/base64": true, + "encoding/binary": true, + "encoding/csv": true, + "encoding/gob": true, + "encoding/hex": true, + "encoding/json": true, + "encoding/json/jsontext": true, + "encoding/json/v2": true, + "encoding/pem": true, + "encoding/xml": true, + "errors": true, + "expvar": true, + "flag": true, + "fmt": true, + "go/ast": true, + "go/build": true, + "go/build/constraint": true, + "go/constant": true, + "go/doc": true, + "go/doc/comment": true, + "go/format": true, + "go/importer": true, + "go/parser": true, + "go/printer": true, + "go/scanner": true, + "go/token": true, + "go/types": true, + "go/version": true, + "hash": true, + "hash/adler32": true, + "hash/crc32": true, + "hash/crc64": true, + "hash/fnv": true, + "hash/maphash": true, + "html": true, + "html/template": true, + "image": true, + "image/color": true, + "image/color/palette": true, + "image/draw": true, + "image/gif": true, + "image/jpeg": true, + "image/png": true, + "index/suffixarray": true, + "io": true, + "io/fs": true, + "io/ioutil": true, + "iter": true, + "log": true, + "log/internal": true, + "log/slog": true, + "log/slog/internal": true, + "log/syslog": true, + "maps": true, + "math": true, + "math/big": true, + "math/bits": true, + "math/cmplx": true, + "math/rand": true, + "math/rand/v2": true, + "mime": true, + "mime/multipart": true, + "mime/quotedprintable": true, + "net": true, + "net/http": true, + "net/http/cgi": true, + "net/http/cookiejar": true, + "net/http/fcgi": true, + "net/http/httptest": true, + "net/http/httptrace": true, + "net/http/httputil": true, + "net/http/internal": true, + "net/http/pprof": true, + "net/mail": true, + "net/netip": true, + "net/rpc": true, + "net/rpc/jsonrpc": true, + "net/smtp": true, + "net/textproto": true, + "net/url": true, + "os": true, + "os/exec": true, + "os/signal": true, + "os/user": true, + "path": true, + "path/filepath": true, + "plugin": true, + "reflect": true, + "regexp": true, + "regexp/syntax": true, + "runtime": true, + "runtime/cgo": true, + "runtime/coverage": true, + "runtime/debug": true, + "runtime/metrics": true, + "runtime/pprof": true, + "runtime/race": true, + "runtime/trace": true, + "slices": true, + "sort": true, + "strconv": true, + "strings": true, + "structs": true, + "sync": true, + "sync/atomic": true, + "syscall": true, + "testing": true, + "testing/cryptotest": true, + "testing/fstest": true, + "testing/iotest": true, + "testing/quick": true, + "testing/slogtest": true, + "testing/synctest": true, + "text/scanner": true, + "text/tabwriter": true, + "text/template": true, + "text/template/parse": true, + "time": true, + "time/tzdata": true, + "unicode": true, + "unicode/utf16": true, + "unicode/utf8": true, + "unique": true, + "unsafe": true, + "uuid": true, + "weak": true, } var goBuiltins = map[string]bool{ diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/marshaler.go b/tools/vendor/github.com/pelletier/go-toml/v2/marshaler.go index c7a08e3ac..7f6a9408e 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/marshaler.go +++ b/tools/vendor/github.com/pelletier/go-toml/v2/marshaler.go @@ -15,6 +15,9 @@ import ( "sync" "time" "unicode/utf8" + + "github.com/pelletier/go-toml/v2/internal/parserbridge" + "github.com/pelletier/go-toml/v2/unstable" ) // Marshal serializes a Go value as a TOML document. @@ -25,6 +28,7 @@ func Marshal(v interface{}) ([]byte, error) { e := encoderStatePool.Get().(*encoderState) e.Encoder = &enc + e.marshalerOn = enc.marshalerInterface e.buf = e.buf[:0] e.keyStack = e.keyStack[:0] e.lastWasHeader = false @@ -52,6 +56,9 @@ type Encoder struct { indentSymbol string indentTables bool marshalJSONNumbers bool + + // toggles the unstable.Marshaler interface + marshalerInterface bool } // NewEncoder returns a new Encoder that writes to w. @@ -110,6 +117,35 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder { return enc } +// EnableMarshalerInterface enables the unstable.Marshaler interface. +// +// With this feature enabled, types implementing the unstable.Marshaler +// interface emit their own raw TOML instead of being encoded structurally. It +// is the encoding counterpart of Decoder.EnableUnmarshalerInterface, and allows +// types such as unstable.RawMessage to round-trip raw TOML bytes. +// +// The bytes returned by MarshalTOML are spliced into the document verbatim. The +// encoder parses them to decide between the valid positions: +// - bytes forming a single value are emitted inline, as in `key = `; +// - bytes forming key-value lines are emitted as the body of a `[key]` table; +// - at the document root, the bytes are emitted as the whole document: the +// encode counterpart of the decoder delivering the whole document to a +// root unstable.Unmarshaler. +// +// An empty result is omitted from the output. Bytes that are not valid TOML +// for their position result in an error, as do bytes forming table content in +// a position where only a value is valid (an array element, an inline table, +// or a table forced inline). MarshalTOML can be called more than once for the +// same value during a single encode, so it must be deterministic. +// +// *Unstable:* This method does not follow the compatibility guarantees of +// semver. It can be changed or removed without a new major version being +// issued. +func (enc *Encoder) EnableMarshalerInterface() *Encoder { + enc.marshalerInterface = true + return enc +} + // Encode writes a TOML representation of v to the stream. // // If v cannot be represented to TOML it returns an error. @@ -186,6 +222,7 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder { func (enc *Encoder) Encode(v interface{}) error { e := encoderStatePool.Get().(*encoderState) e.Encoder = enc + e.marshalerOn = enc.marshalerInterface e.buf = e.buf[:0] e.keyStack = e.keyStack[:0] e.lastWasHeader = false @@ -227,6 +264,15 @@ type encoderState struct { // stringKeyBuf is a reusable buffer to read string map keys without // allocating one per map. stringKeyBuf reflect.Value + + // parser classifies the bytes returned by unstable.Marshaler values as a + // single value or a table body. Only used when marshalerOn is set. + parser unstable.Parser + + // marshalerOn mirrors Encoder.marshalerInterface, copied onto the state so + // the per-value hot path checks a direct field instead of dereferencing the + // embedded *Encoder on every value. + marshalerOn bool } // valueOptions are the encoding options attached to one entry of a table. @@ -236,7 +282,13 @@ type valueOptions struct { omitempty bool omitzero bool commented bool - comment string + // rawShape is the unstable.Marshaler classification of the entry's value, + // resolved at encode time (not from tags). It lives here, in the byte of + // padding the booleans already leave, so that entry does not grow and the + // encoder's default (interface-disabled) path keeps its exact layout and + // performance. It stays shapeUnknown for everything that is not a Marshaler. + rawShape rawShape + comment string } // entry is a deferred key-value of a table being encoded. @@ -246,6 +298,22 @@ type entry struct { options valueOptions } +// rawShape classifies the bytes produced by an unstable.Marshaler. +type rawShape uint8 + +const ( + // shapeUnknown is the default: not an unstable.Marshaler, or the interface + // is disabled. + shapeUnknown rawShape = iota + // shapeEmpty is whitespace-only content: it has no TOML representation and + // is omitted from the output. + shapeEmpty + // shapeValue is a single TOML value, emitted inline as `key = `. + shapeValue + // shapeTable is one or more key-value lines, emitted as a `[key]` body. + shapeTable +) + func (e *encoderState) encodeRoot(v interface{}) error { if v == nil { return errors.New("toml: cannot encode a nil interface") @@ -257,6 +325,10 @@ func (e *encoderState) encodeRoot(v interface{}) error { return errors.New("toml: cannot encode a nil pointer") } + if e.marshalerOn && encPropsForType(rv.Type()).marshaler != 0 { + return e.encodeMarshalerRoot(rv) + } + switch rv.Kind() { case reflect.Map, reflect.Struct: if isValueKind(rv) { @@ -268,6 +340,34 @@ func (e *encoderState) encodeRoot(v interface{}) error { } } +// encodeMarshalerRoot emits the bytes of a root-level unstable.Marshaler as +// the whole document: the encode counterpart of the decoder delivering the +// whole document to a root Unmarshaler. The bytes must form a TOML document +// (key-value lines and table headers); empty output produces an empty +// document. +func (e *encoderState) encodeMarshalerRoot(rv reflect.Value) error { + raw, err := e.marshalerBytes(rv) + if err != nil { + return err + } + trimmed := bytes.TrimSpace(raw) + if len(trimmed) == 0 { + return nil + } + if err := e.validateRawTableBody(rv.Type(), trimmed); err != nil { + // A single TOML value has no meaning at the document root; report it + // as such rather than as a syntax error. + if shape, _ := e.classifyRaw(trimmed); shape == shapeValue { + return fmt.Errorf("toml: cannot encode %s as a document root: MarshalTOML returned a single TOML value, not a document", rv.Type()) + } + return err + } + e.buf = append(e.buf, trimmed...) + e.buf = append(e.buf, '\n') + e.lastWasHeader = false + return nil +} + // resolve unwraps pointers and interfaces until a concrete value is found. // Returns false if it resolves to nil. func resolve(v reflect.Value) (reflect.Value, bool) { @@ -293,10 +393,15 @@ func resolve(v reflect.Value) (reflect.Value, bool) { type typeEncProps struct { // 0: not a TextMarshaler, 1: the type implements it, 2: its pointer does text uint8 + // 0: not an unstable.Marshaler, 1: the type implements it, 2: its pointer + // does. Only consulted when Encoder.marshalerInterface is set. + marshaler uint8 // encoded as a TOML value (as opposed to a table) isValue bool } +var marshalerType = reflect.TypeOf(new(unstable.Marshaler)).Elem() + var typeEncPropsCache sync.Map // reflect.Type -> typeEncProps func encPropsForType(t reflect.Type) typeEncProps { @@ -310,6 +415,12 @@ func encPropsForType(t reflect.Type) typeEncProps { case reflect.PtrTo(t).Implements(textMarshalerType): p.text = 2 } + switch { + case t.Implements(marshalerType): + p.marshaler = 1 + case reflect.PtrTo(t).Implements(marshalerType): + p.marshaler = 2 + } switch t { case timeType, localDateType, localTimeType, localDateTimeType: p.isValue = true @@ -360,6 +471,11 @@ func (e *encoderState) isArrayOfTables(v reflect.Value) bool { if v.Len() == 0 { return false } + // The Marshaler-aware classification lives in a separate method, hoisted out + // of this loop, so the default path keeps its exact original shape. + if e.marshalerOn { + return e.isMarshalerArrayOfTables(v) + } for i := 0; i < v.Len(); i++ { elem, ok := resolve(v.Index(i)) if !ok || isValueKind(elem) { @@ -369,6 +485,147 @@ func (e *encoderState) isArrayOfTables(v reflect.Value) bool { return true } +// isMarshalerArrayOfTables is the EnableMarshalerInterface variant of +// isArrayOfTables: a Marshaler element counts as a table only when its raw +// content is table shaped (key-value lines); one holding a single value makes +// the whole slice a plain array instead. +func (e *encoderState) isMarshalerArrayOfTables(v reflect.Value) bool { + for i := 0; i < v.Len(); i++ { + elem, ok := resolve(v.Index(i)) + if !ok { + return false + } + if encPropsForType(elem.Type()).marshaler != 0 { + raw, err := e.marshalerBytes(elem) + if err != nil { + return false + } + if shape, _ := e.classifyRaw(raw); shape != shapeTable { + return false + } + continue + } + if isValueKind(elem) { + return false + } + } + return true +} + +// marshalerBytes returns the raw TOML produced by v's unstable.Marshaler +// implementation. The caller guarantees v implements the interface +// (encPropsForType(v.Type()).marshaler != 0). +func (e *encoderState) marshalerBytes(v reflect.Value) ([]byte, error) { + t := v.Type() + var m unstable.Marshaler + switch { + case encPropsForType(t).marshaler == 1: + // The type itself implements Marshaler (e.g. a value receiver). + m = v.Interface().(unstable.Marshaler) + case v.CanAddr(): + // Only the pointer implements it, and v is addressable. + m = v.Addr().Interface().(unstable.Marshaler) + default: + // Only the pointer implements it, but v is not addressable: take the + // address of a copy. + tmp := reflect.New(t) + tmp.Elem().Set(v) + m = tmp.Interface().(unstable.Marshaler) + } + b, err := m.MarshalTOML() + if err != nil { + return nil, fmt.Errorf("toml: error calling MarshalTOML for type %s: %w", t, err) + } + return b, nil +} + +// validateRawTableBody checks that trimmed — table-shaped Marshaler output +// about to be spliced verbatim — is syntactically valid TOML, so a Marshaler +// cannot silently corrupt the document. It reuses e.parser, like classifyRaw. +func (e *encoderState) validateRawTableBody(t reflect.Type, trimmed []byte) error { + e.parser.Reset(trimmed) + for e.parser.NextExpression() { + } + if err := e.parser.Error(); err != nil { + return fmt.Errorf("toml: error calling MarshalTOML for type %s: invalid TOML: %w", t, err) + } + return nil +} + +// classifyRaw decides whether b (the output of an unstable.Marshaler) is empty, +// a single TOML value, or a table body. It returns the trimmed bytes that +// should be spliced into the document. It reuses e.parser, so it is not safe +// for concurrent use (encoderState is not shared). +func (e *encoderState) classifyRaw(b []byte) (rawShape, []byte) { + trimmed := bytes.TrimSpace(b) + if len(trimmed) == 0 { + return shapeEmpty, trimmed + } + e.parser.Reset(trimmed) + _, rest, err := parserbridge.ParseValue(&e.parser, trimmed) + if err == nil && len(bytes.TrimSpace(rest)) == 0 { + return shapeValue, trimmed + } + return shapeTable, trimmed +} + +// resolveMarshalerEntries classifies every entry whose value implements +// unstable.Marshaler, recording the shape on the entry so the two table passes +// can route it without re-classifying. Any error from MarshalTOML is surfaced +// eagerly. The marshaled bytes themselves are produced again at emit time by +// marshalerValue; that keeps entry small on the encoder's hot path, and only +// runs when the (opt-in) interface is enabled. +func (e *encoderState) resolveMarshalerEntries(entries []entry) error { + for i := range entries { + ent := &entries[i] + v, ok := resolve(ent.value) + if !ok || encPropsForType(v.Type()).marshaler == 0 { + continue + } + raw, err := e.marshalerBytes(v) + if err != nil { + return err + } + ent.options.rawShape, _ = e.classifyRaw(raw) + } + return nil +} + +// marshalerValue returns the trimmed bytes to splice for an entry already known +// to be an unstable.Marshaler (ent.options.rawShape != shapeUnknown). +func (e *encoderState) marshalerValue(ent *entry) ([]byte, error) { + v, _ := resolve(ent.value) + raw, err := e.marshalerBytes(v) + if err != nil { + return nil, err + } + return bytes.TrimSpace(raw), nil +} + +// appendMarshalerInline emits an unstable.Marshaler value in a value position +// (array element or inline-table member), where only a single TOML value is +// valid. done is false when t is not a Marshaler, so appendValue falls through +// to its normal handling. It is split out of appendValue (type check included) +// to keep that hot path lean. +func (e *encoderState) appendMarshalerInline(b []byte, v reflect.Value, t reflect.Type) (out []byte, done bool, err error) { + if encPropsForType(t).marshaler == 0 { + return b, false, nil + } + raw, err := e.marshalerBytes(v) + if err != nil { + return nil, true, err + } + shape, trimmed := e.classifyRaw(raw) + switch shape { + case shapeValue: + return append(b, trimmed...), true, nil + case shapeEmpty: + return nil, true, fmt.Errorf("toml: cannot encode an empty %s as an inline value", t) + default: + return nil, true, fmt.Errorf("toml: cannot encode %s as an inline value: %q is not a single TOML value", t, trimmed) + } +} + // encodeTable writes the content of a table at the given key path. func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) error { entries, err := e.collectEntries(v) @@ -376,15 +633,51 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) return err } + // Marshaler routing is hoisted behind a single local flag. When the (opt-in) + // interface is off, mOn is false and both passes run the exact baseline + // code, so the default Marshal path keeps its performance. + mOn := e.marshalerOn + if mOn { + // Classify Marshaler entries once, up front, so the passes can route + // them by shape and surface MarshalTOML errors eagerly. + if err := e.resolveMarshalerEntries(entries); err != nil { + return err + } + } + // First pass: emit all key-values; tables are handled by the second // pass. for i := range entries { ent := &entries[i] + if mOn { + switch ent.options.rawShape { + case shapeUnknown: + // Not a Marshaler: handled by the baseline logic below. + case shapeEmpty: + // No TOML representation: omit the key. + continue + case shapeValue: + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { + return err + } + continue + case shapeTable: + // A table body is emitted in the second pass, unless it is + // forced inline (SetTablesInline / inline tag), which has no + // valid inline form and is reported as an error by + // encodeKeyValue. + if e.tablesInline || ent.options.inline { + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { + return err + } + } + continue + } + } if e.entryIsTable(ent) { continue } - err := e.encodeKeyValue(*ent, commented, indent) - if err != nil { + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { return err } } @@ -392,6 +685,25 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) // Second pass: emit the sub-tables, extending the shared key stack. for i := range entries { ent := entries[i] + if mOn { + switch ent.options.rawShape { + case shapeUnknown: + // Not a Marshaler: handled by the baseline logic below. + case shapeValue, shapeEmpty: + // Not a table: already handled (or omitted) in the first pass. + continue + case shapeTable: + // Emit the raw body verbatim under the freshly pushed header. + // (The forced-inline case already errored in the first pass.) + entCommented := commented || ent.options.commented + e.keyStack = append(e.keyStack, ent.key) + if err := e.encodeMarshalerTable(&ent, entCommented, indent); err != nil { + return err + } + e.keyStack = e.keyStack[:len(e.keyStack)-1] + continue + } + } if !e.entryIsTable(&ent) { continue } @@ -423,8 +735,45 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) return nil } +// encodeMarshalerTable emits a table-shaped unstable.Marshaler entry: the +// header for the key currently on the stack, then the raw body verbatim. +func (e *encoderState) encodeMarshalerTable(ent *entry, commented bool, indent int) error { + raw, err := e.marshalerValue(ent) + if err != nil { + return err + } + // Validate the bytes actually being spliced: MarshalTOML is called again + // for the emit, so this both rejects invalid TOML and guards against an + // implementation that returned different content than during + // classification. + if err := e.validateRawTableBody(ent.value.Type(), raw); err != nil { + return err + } + e.writeTableHeader(ent.options.comment, commented, false, indent) + e.spliceRawTableBody(raw, commented) + return nil +} + +// spliceRawTableBody appends a raw table body verbatim after its header. When +// the table is commented, every physical line is prefixed with the comment +// marker so the body does not leak into the document as live keys. +func (e *encoderState) spliceRawTableBody(raw []byte, commented bool) { + if len(raw) == 0 { + return + } + if commented { + e.buf = append(e.buf, "# "...) + e.buf = append(e.buf, bytes.ReplaceAll(raw, []byte("\n"), []byte("\n# "))...) + } else { + e.buf = append(e.buf, raw...) + } + e.buf = append(e.buf, '\n') + e.lastWasHeader = false +} + // entryIsTable reports whether the entry is emitted as a (sub-)table rather -// than a key-value. +// than a key-value. Marshaler entries are routed by encodeTable before this is +// reached, so it carries no marshaler-specific cost. func (e *encoderState) entryIsTable(ent *entry) bool { return !e.tablesInline && !ent.options.inline && (e.isTableLike(ent.value) || e.isArrayOfTables(ent.value)) } @@ -458,6 +807,22 @@ func (e *encoderState) encodeArrayTable(ent entry, commented bool, indent int) e // The comment is only present before the first element. comment = "" + // A Marshaler element splices its raw table body verbatim. The shape + // was checked by isArrayOfTables, but MarshalTOML is called again for + // the emit, so the spliced bytes are validated here. + if e.marshalerOn && encPropsForType(elem.Type()).marshaler != 0 { + raw, err := e.marshalerBytes(elem) + if err != nil { + return err + } + trimmed := bytes.TrimSpace(raw) + if err := e.validateRawTableBody(elem.Type(), trimmed); err != nil { + return err + } + e.spliceRawTableBody(trimmed, commented) + continue + } + err := e.encodeTable(elem, commented, indent+1) if err != nil { return err @@ -478,10 +843,13 @@ func (e *encoderState) writeTableHeader(comment string, commented bool, array bo e.writeComment(comment, headerIndent) - e.writeIndent(headerIndent) + // The "commented" marker is emitted at column zero, ahead of any table + // indentation, so that the indentation appears inside the comment + // (e.g. `# [a.b]`). This matches the historical v2.3 layout. if commented { e.buf = append(e.buf, "# "...) } + e.writeIndent(headerIndent) e.buf = append(e.buf, '[') if array { e.buf = append(e.buf, '[') @@ -528,10 +896,14 @@ func (e *encoderState) encodeKeyValue(ent entry, commented bool, indent int) err e.writeComment(ent.options.comment, indent) - e.writeIndent(indent) + // The "commented" marker is emitted at column zero, ahead of any table + // indentation, so that the indentation appears inside the comment + // (e.g. `# key = value`). This matches the historical v2.3 layout. + lineStart := len(e.buf) if commented { e.buf = append(e.buf, "# "...) } + e.writeIndent(indent) e.buf = e.appendKey(e.buf, ent.key) e.buf = append(e.buf, " = "...) @@ -545,16 +917,63 @@ func (e *encoderState) encodeKeyValue(ent entry, commented bool, indent int) err valueIndent = 0 } + // A Marshaler value is delegated, keeping this hot function lean for the + // default path (rawShape stays shapeUnknown when the interface is off). It + // shares the commented/newline handling below. var err error - e.buf, err = e.appendValue(e.buf, ent.value, ent.options, valueIndent) + if ent.options.rawShape != shapeUnknown { + e.buf, err = e.appendMarshalerInlineValue(e.buf, &ent) + } else { + e.buf, err = e.appendValue(e.buf, ent.value, ent.options, valueIndent) + } if err != nil { return err } + + // A commented value that renders across multiple lines (a multiline string + // or a multiline array) must have every physical line prefixed with the + // comment marker, not just the first; otherwise the continuation lines are + // emitted as live, syntactically invalid TOML. + if commented { + if bytes.IndexByte(e.buf[lineStart:], '\n') >= 0 { + region := bytes.ReplaceAll( + append([]byte(nil), e.buf[lineStart:]...), + []byte("\n"), []byte("\n# "), + ) + e.buf = append(e.buf[:lineStart], region...) + } + } e.buf = append(e.buf, '\n') e.lastWasHeader = false return nil } +// appendMarshalerInlineValue appends the value part of a `key = ` line for an +// unstable.Marshaler entry, leaving the trailing newline and commented handling +// to encodeKeyValue. Empty entries are filtered out before this point, so the +// value is either a single value (spliced verbatim) or, when forced inline by +// SetTablesInline or an inline tag, table content (an error). +func (e *encoderState) appendMarshalerInlineValue(b []byte, ent *entry) ([]byte, error) { + errNotValue := func() error { + return fmt.Errorf("toml: cannot encode %s as an inline value: not a single TOML value", ent.value.Type()) + } + if ent.options.rawShape != shapeValue { + return nil, errNotValue() + } + raw, err := e.marshalerValue(ent) + if err != nil { + return nil, err + } + // Classify the just-returned bytes rather than trusting the earlier pass: + // MarshalTOML is called again for the emit, and an implementation that + // returns different content must not splice non-value bytes into a + // `key = ` position. + if shape, trimmed := e.classifyRaw(raw); shape == shapeValue { + return append(b, trimmed...), nil + } + return nil, errNotValue() +} + // collectEntries builds the ordered list of the entries of a table, // applying tags and omission rules. func (e *encoderState) collectEntries(v reflect.Value) ([]entry, error) { @@ -966,6 +1385,16 @@ func (e *encoderState) appendValue(b []byte, v reflect.Value, opts valueOptions, } } + // A Marshaler reached through a value position (an array element or inline + // table member) splices its bytes verbatim. Everything (including the type + // check) lives in a separate method so this hot function keeps its default + // layout: when the opt-in interface is off, only the bool test runs here. + if e.marshalerOn { + if b2, done, err := e.appendMarshalerInline(b, v, t); done { + return b2, err + } + } + switch encPropsForType(t).text { case 1: if t.Kind() != reflect.String { diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/toml.abnf b/tools/vendor/github.com/pelletier/go-toml/v2/toml.abnf index 473f3749e..7647c4bed 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/toml.abnf +++ b/tools/vendor/github.com/pelletier/go-toml/v2/toml.abnf @@ -36,7 +36,7 @@ newline =/ %x0D.0A ; CRLF comment-start-symbol = %x23 ; # non-ascii = %x80-D7FF / %xE000-10FFFF -non-eol = %x09 / %x20-7F / non-ascii +non-eol = %x09 / %x20-7E / non-ascii comment = comment-start-symbol *non-eol @@ -74,12 +74,14 @@ escape = %x5C ; \ escape-seq-char = %x22 ; " quotation mark U+0022 escape-seq-char =/ %x5C ; \ reverse solidus U+005C escape-seq-char =/ %x62 ; b backspace U+0008 +escape-seq-char =/ %x65 ; e escape U+001B escape-seq-char =/ %x66 ; f form feed U+000C escape-seq-char =/ %x6E ; n line feed U+000A escape-seq-char =/ %x72 ; r carriage return U+000D escape-seq-char =/ %x74 ; t tab U+0009 -escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX -escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX +escape-seq-char =/ %x78 2HEXDIG ; xHH U+00HH +escape-seq-char =/ %x75 4HEXDIG ; uHHHH U+HHHH +escape-seq-char =/ %x55 8HEXDIG ; UHHHHHHHH U+HHHHHHHH ;; Multiline Basic String @@ -174,7 +176,7 @@ time-secfrac = "." 1*DIGIT time-numoffset = ( "+" / "-" ) time-hour ":" time-minute time-offset = "Z" / time-numoffset -partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ] +partial-time = time-hour ":" time-minute [ ":" time-second [ time-secfrac ] ] full-date = date-fullyear "-" date-month "-" date-mday full-time = partial-time time-offset @@ -221,13 +223,14 @@ std-table-close = ws %x5D ; ] Right square bracket ;; Inline Table -inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close +inline-table = inline-table-open [ inline-table-keyvals ] ws-comment-newline inline-table-close -inline-table-open = %x7B ws ; { -inline-table-close = ws %x7D ; } -inline-table-sep = ws %x2C ws ; , Comma +inline-table-open = %x7B ; { +inline-table-close = %x7D ; } +inline-table-sep = %x2C ; , Comma -inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] +inline-table-keyvals = ws-comment-newline keyval ws-comment-newline inline-table-sep inline-table-keyvals +inline-table-keyvals =/ ws-comment-newline keyval ws-comment-newline [ inline-table-sep ] ;; Array Table diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go b/tools/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go index 9817d5b33..d110243f4 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go +++ b/tools/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go @@ -512,6 +512,15 @@ func (d *decoder) unmarshal(data []byte, v interface{}) error { } } + // When the root target itself implements the Unmarshaler interface, the + // whole document decodes into it. Open a capture spanning the entire + // document up front: the top-level key-values then flow through the + // existing capture branch and any tables attach to it via resumeCapture, + // so UnmarshalTOML receives the assembled document exactly once. + if d.unmarshalerInterface && hasUnmarshaler(root) { + d.startRootCapture() + } + for d.p.NextExpression() { err := d.handleRootExpression(d.p.Expression(), root) if err != nil { @@ -613,17 +622,18 @@ func (d *decoder) wrapError(data []byte, err error) error { return err } -// wrapSeenError turns an error returned by SeenTracker.CheckExpression into a -// ParserError carrying the position and key of the offending expression, so -// that redefinition and duplicate-key errors are reported as a DecodeError -// with context (see issue #668). +// keyedError turns a bare error raised while processing an expression into a +// ParserError carrying the position and key of that expression, so that it is +// reported as a DecodeError with context. It is used for the errors returned +// by SeenTracker.CheckExpression (redefinitions and duplicate keys, see issue +// #668) and for table placement errors raised by walkTable (see issue #806). // // The highlight spans the expression's key. Unlike Node.Raw, key nodes always // carry a Raw range, so this works for tables and array tables too (whose own // Raw range is not set by the parser). For a duplicate detected inside an // inline table, node is the enclosing key-value expression, so the error // points at that expression's key. -func (d *decoder) wrapSeenError(node *unstable.Node, err error) error { +func (d *decoder) keyedError(node *unstable.Node, err error) error { if err == nil { return nil } @@ -658,7 +668,7 @@ func (d *decoder) wrapSeenError(node *unstable.Node, err error) error { func (d *decoder) handleRootExpression(expr *unstable.Node, root reflect.Value) error { first, err := d.seen.CheckExpression(expr) if err != nil { - return d.wrapSeenError(expr, err) + return d.keyedError(expr, err) } switch expr.Kind { @@ -779,7 +789,7 @@ walk: } // Anything else is replaced by a fresh generic map. if !mapStringInterfaceType.AssignableTo(v.Type()) { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", v.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&pf, fresh) @@ -807,7 +817,7 @@ walk: d.setArrayCount(key, 1) } if cnt > v.Len() { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot reach element %d of array of size %d", cnt-1, v.Len()) + return d.keyedError(expr, fmt.Errorf("cannot reach element %d of array of size %d", cnt-1, v.Len())) } d.segIdx[idx] = cnt - 1 elem := v.Index(cnt - 1) @@ -890,7 +900,7 @@ walk: } default: if !ceIface { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", ce.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", ce.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&w, fresh) @@ -902,7 +912,7 @@ walk: switch et.Kind() { case reflect.Interface: if !mapStringInterfaceType.AssignableTo(et) { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", et) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et)) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&w, fresh) @@ -924,7 +934,7 @@ walk: pf = slotWriter{kind: 1, slot: tmp} v = tmp default: - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", et) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et)) } } idx++ @@ -936,12 +946,15 @@ walk: d.skipUntilTable = true return nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return err + } pf = slotWriter{kind: 1, slot: fv} v = fv idx++ default: - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind())) } } @@ -997,7 +1010,7 @@ walk: cnt = 0 } if cnt >= v.Len() { - return unstable.NewParserError(d.p.Raw(expr.Raw), "array of size %d is too small to store this array table", v.Len()) + return d.keyedError(expr, fmt.Errorf("array of size %d is too small to store this array table", v.Len())) } v.Index(cnt).Set(reflect.Zero(v.Type().Elem())) d.setArrayCount(akey, cnt+1) @@ -1010,7 +1023,7 @@ walk: pf = slotWriter{kind: 1, slot: elem} v = elem default: - return fmt.Errorf("toml: cannot store an array table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store an array table in a %s", v.Kind())) } } @@ -1037,7 +1050,7 @@ walk: } } if !mapStringInterfaceType.AssignableTo(v.Type()) { - return fmt.Errorf("toml: cannot store a table in a %s", v.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&pf, fresh) @@ -1063,7 +1076,7 @@ walk: d.tableTargetValid = true return nil default: - return fmt.Errorf("toml: cannot store a table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind())) } } } @@ -1153,6 +1166,18 @@ func (d *decoder) startCapture(pathLen int, expr *unstable.Node) { } } +// startRootCapture opens a capture covering the entire document, used when the +// root target itself implements the Unmarshaler interface. It is opened before +// reading any expression: top-level key-values are then accumulated through the +// regular capture branch, and its empty name path matches every table in +// resumeCapture, so the whole document is handed to UnmarshalTOML once. The +// single index slot is -1 because the root is never reached through an array +// table. +func (d *decoder) startRootCapture() { + d.captures = append(d.captures, rawCapture{indexes: []int{-1}}) + d.captureIdx = len(d.captures) - 1 +} + // resolveCapture walks back to the target of a capture and delivers the // accumulated raw bytes to its UnmarshalTOML implementation. func (d *decoder) resolveCapture(v reflect.Value, c *rawCapture, idx int, indexed bool) (reflect.Value, error) { @@ -1207,7 +1232,10 @@ func (d *decoder) resolveCapture(v reflect.Value, c *rawCapture, idx int, indexe if !found { return v, nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return reflect.Value{}, err + } nv, err := d.resolveCapture(fv, c, idx+1, false) if err != nil { return reflect.Value{}, err @@ -1468,9 +1496,11 @@ func (d *decoder) descend(v reflect.Value, path []pathPart, idx int, expr *unsta } return v, nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return reflect.Value{}, err + } var nv reflect.Value - var err error if idx+1 == len(path) { // Leaf field: assign directly. descend's first action for a // fully-consumed path is exactly this call, so skipping the extra @@ -1805,7 +1835,7 @@ func (d *decoder) assignDateTime(v reflect.Value, value *unstable.Node) (reflect } if v.Type() == timeType { - v.Set(reflect.ValueOf(t)) + setConcrete(v, t) return v, nil } if v.Kind() == reflect.Interface { @@ -1814,6 +1844,16 @@ func (d *decoder) assignDateTime(v reflect.Value, value *unstable.Node) (reflect return reflect.Value{}, d.typeMismatchError("datetime", v.Type(), d.p.Raw(value.Raw)) } +// setConcrete assigns x to v, which must be a settable value of x's concrete +// type. Writing through the address avoids the heap allocation that +// v.Set(reflect.ValueOf(x)) incurs from boxing x into an interface. Settable +// implies addressable: the decoder assigns to struct fields, slice elements, +// and reflect.New-allocated temporaries (map elements are decoded into such +// temporaries), all of which are addressable. +func setConcrete[T any](v reflect.Value, x T) { + *(v.Addr().Interface().(*T)) = x +} + func (d *decoder) assignLocalDateTime(v reflect.Value, value *unstable.Node) (reflect.Value, error) { dt, rest, err := parseLocalDateTime(value.Data) if err != nil { @@ -1825,10 +1865,10 @@ func (d *decoder) assignLocalDateTime(v reflect.Value, value *unstable.Node) (re switch v.Type() { case localDateTimeType: - v.Set(reflect.ValueOf(dt)) + setConcrete(v, dt) return v, nil case timeType: - v.Set(reflect.ValueOf(dt.AsTime(time.Local))) + setConcrete(v, dt.AsTime(time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -1845,10 +1885,10 @@ func (d *decoder) assignLocalDate(v reflect.Value, value *unstable.Node) (reflec switch v.Type() { case localDateType: - v.Set(reflect.ValueOf(date)) + setConcrete(v, date) return v, nil case timeType: - v.Set(reflect.ValueOf(date.AsTime(time.Local))) + setConcrete(v, date.AsTime(time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -1868,10 +1908,10 @@ func (d *decoder) assignLocalTime(v reflect.Value, value *unstable.Node) (reflec switch v.Type() { case localTimeType: - v.Set(reflect.ValueOf(t)) + setConcrete(v, t) return v, nil case timeType: - v.Set(reflect.ValueOf(time.Date(0, 1, 1, t.Hour, t.Minute, t.Second, t.Nanosecond, time.Local))) + setConcrete(v, time.Date(0, 1, 1, t.Hour, t.Minute, t.Second, t.Nanosecond, time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -2228,11 +2268,22 @@ func buildPlan(t reflect.Type) *structPlan { byName: map[string]structField{}, byFold: map[string]structField{}, } - addFields(plan, t, nil) + addFields(plan, t, nil, map[reflect.Type]bool{}) return plan } -func addFields(plan *structPlan, t reflect.Type, prefix []int) { +// addFields flattens the fields of t into the plan. visited holds the types +// being flattened on the current branch: a struct type that embeds itself +// (directly or through other types) is not descended into again, mirroring +// buildEncPlan. Without this guard a recursive embedding would recurse +// forever; the repeated fields are unreachable by flattening anyway. +func addFields(plan *structPlan, t reflect.Type, prefix []int, visited map[reflect.Type]bool) { + if visited[t] { + return + } + visited[t] = true + defer delete(visited, t) + var embedded []reflect.StructField for i := 0; i < t.NumField(); i++ { f := t.Field(i) @@ -2312,22 +2363,28 @@ func addFields(plan *structPlan, t reflect.Type, prefix []int) { index = append(index, prefix...) idx := f.Index[0] index = append(index, idx) - addFields(plan, ft, index) + addFields(plan, ft, index, visited) } } // fieldByIndexAlloc returns the field of v at the given index path, // allocating intermediate embedded pointers as needed. -func fieldByIndexAlloc(v reflect.Value, index []int) reflect.Value { +func fieldByIndexAlloc(v reflect.Value, index []int) (reflect.Value, error) { // Fast path for non-embedded fields, which have a single-element index: // no intermediate pointer dereferencing is possible. if len(index) == 1 { - return v.Field(index[0]) + return v.Field(index[0]), nil } for i, x := range index { if i > 0 { for v.Kind() == reflect.Ptr { if v.IsNil() { + if !v.CanSet() { + // A nil embedded pointer of unexported type cannot be + // allocated: reflect forbids setting it. Match + // encoding/json and report it instead of panicking. + return reflect.Value{}, fmt.Errorf("toml: cannot set embedded pointer to unexported struct: %s", v.Type().Elem()) + } v.Set(reflect.New(v.Type().Elem())) } v = v.Elem() @@ -2335,5 +2392,5 @@ func fieldByIndexAlloc(v reflect.Value, index []int) reflect.Value { } v = v.Field(x) } - return v + return v, nil } diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go index 54b19f9dd..f1912f77b 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go +++ b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go @@ -33,7 +33,7 @@ const ( Float // Integer represents an integer value. Integer - // LocalDate represents a a local date value. + // LocalDate represents a local date value. LocalDate // LocalTime represents a local time value. LocalTime diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go new file mode 100644 index 000000000..40c2e9780 --- /dev/null +++ b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go @@ -0,0 +1,29 @@ +package unstable + +// Marshaler is implemented by types that can marshal themselves into a raw +// TOML description. The returned bytes are spliced verbatim into the encoded +// document, so they must be valid TOML for the position they end up in: +// +// - A single value (string, integer, array, inline table, …) is emitted +// inline, as in `key = `. +// - One or more key-value lines (optionally with relative sub-table headers) +// is emitted as the body of a `[key]` table. +// - At the document root, the bytes are emitted as the whole document. +// +// The encoder decides between those forms by parsing the returned bytes, and +// reports an error when they are not valid TOML for their position; see +// Encoder.EnableMarshalerInterface in the root toml package. MarshalTOML can +// be called more than once for the same value during a single encode, so it +// must be deterministic. +// +// Marshaler is the encoding counterpart of Unmarshaler. +type Marshaler interface { + MarshalTOML() ([]byte, error) +} + +// MarshalTOML implements Marshaler. It returns the raw TOML bytes verbatim, +// mirroring json.RawMessage.MarshalJSON. The value receiver means both +// RawMessage and *RawMessage satisfy Marshaler. +func (m RawMessage) MarshalTOML() ([]byte, error) { + return []byte(m), nil +} diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go index 91e226998..cf72bb744 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go +++ b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go @@ -55,8 +55,21 @@ type Parser struct { left []byte nodes []Node err error + + // nesting is the current depth of nested arrays and inline tables being + // parsed. It guards parseVal/parseValArray/parseInlineTable against + // unbounded mutual recursion, which would otherwise let a deeply nested + // document overflow the goroutine stack (an unrecoverable fatal error). + nesting int } +// maxValueNesting is the maximum depth of nested arrays and inline tables the +// parser accepts. Beyond it, parsing fails with a ParserError instead of +// risking a stack overflow. Real-world TOML documents nest only a handful of +// levels deep, so this bound is generous; it matches the limit used by the +// standard library's encoding/json. +const maxValueNesting = 10000 + // Data returns the slice provided to the last call to Reset. func (p *Parser) Data() []byte { return p.data @@ -92,6 +105,7 @@ func (p *Parser) Reset(b []byte) { p.left = b p.nodes = p.nodes[:0] p.err = nil + p.nesting = 0 } // Error returns any error that has occurred during parsing. @@ -513,10 +527,24 @@ func (p *Parser) parseVal(b []byte) (int32, []byte, error) { return p.parseKeyword(b, "inf", Float) case c == 'n': return p.parseKeyword(b, "nan", Float) - case c == '[': - return p.parseValArray(b) - case c == '{': - return p.parseInlineTable(b) + case c == '[' || c == '{': + // Arrays and inline tables recurse back into parseVal for each of + // their elements. Bound that recursion so a document with millions of + // nested brackets or braces cannot overflow the goroutine stack. + if p.nesting >= maxValueNesting { + return 0, nil, NewParserError(b[:1], "arrays and inline tables are nested more than the maximum of %d levels deep", maxValueNesting) + } + p.nesting++ + var h int32 + var rest []byte + var err error + if c == '[' { + h, rest, err = p.parseValArray(b) + } else { + h, rest, err = p.parseInlineTable(b) + } + p.nesting-- + return h, rest, err case c == '+' || c == '-': return p.parseIntOrFloat(b) case c >= '0' && c <= '9': diff --git a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go index e417040a6..c84c90ccf 100644 --- a/tools/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go +++ b/tools/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go @@ -7,14 +7,20 @@ package unstable // For tables (including split tables defined in multiple places), the data // contains the raw key-value bytes from the original document with adjusted // table headers to be relative to the unmarshaling target. +// +// When the decoding target itself implements this interface, it receives the +// whole document — every top-level key-value as well as every table and array +// table — assembled into a single valid TOML document and delivered once. type Unmarshaler interface { UnmarshalTOML(data []byte) error } -// RawMessage is a raw encoded TOML value. It implements Unmarshaler and can -// be used to delay TOML decoding or capture raw content. +// RawMessage is a raw encoded TOML value. It implements both Unmarshaler and +// Marshaler and can be used to delay TOML decoding or capture raw content, +// similar to json.RawMessage. // -// Example usage: +// Decoding (requires Decoder.EnableUnmarshalerInterface) captures the raw TOML +// bytes for the target without decoding them: // // type Config struct { // Plugin RawMessage `toml:"plugin"` @@ -23,6 +29,11 @@ type Unmarshaler interface { // var cfg Config // toml.NewDecoder(r).EnableUnmarshalerInterface().Decode(&cfg) // // cfg.Plugin now contains the raw TOML bytes for [plugin] +// +// Encoding (requires Encoder.EnableMarshalerInterface) splices the stored bytes +// back into the document verbatim: +// +// toml.NewEncoder(w).EnableMarshalerInterface().Encode(cfg) type RawMessage []byte // UnmarshalTOML implements Unmarshaler. diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.go index 5fa28861e..c8619fa33 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.go @@ -139,7 +139,7 @@ func (check *checker) nonGoFile(pos token.Pos, fullText string) { inStar = false continue } - line, inStar = stringsCutPrefix(line, "/*") + line, inStar = strings.CutPrefix(line, "/*") if !inStar { break } @@ -194,11 +194,3 @@ func (check *checker) comment(pos token.Pos, line string) { } } } - -// Go 1.20 strings.CutPrefix. -func stringsCutPrefix(s, prefix string) (after string, found bool) { - if !strings.HasPrefix(s, prefix) { - return s, false - } - return s[len(prefix):], true -} diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go index f52f202e2..0e3f17fbc 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go @@ -32,7 +32,7 @@ var ErrorsAsTypeAnalyzer = &analysis.Analyzer{ Run: errorsastype, } -// errorsastype offers a fix to replace error.As with the newer +// errorsastype offers a fix to replace errors.As with the newer // errors.AsType[T] following this pattern: // // var myerr *MyErr @@ -228,6 +228,11 @@ func canUseErrorsAsType(info *types.Info, index *typeindex.Index, curCall inspec len(curDecl.Node().(*ast.GenDecl).Specs) != 1 { return // not a simple "var v T" decl } + // AsType requires that its type argument implements error. + // Reject if v does not implement error. + if !types.AssignableTo(v.Type(), errorType) { + return + } // Have: // var v *MyErr diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go index 104687693..d7dfe5582 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go @@ -139,6 +139,7 @@ var ( builtinTrue = types.Universe.Lookup("true") byteSliceType = types.NewSlice(types.Typ[types.Byte]) omitemptyRegex = regexp.MustCompile(`(?:^json| json):"[^"]*(,omitempty)(?:"|,[^"]*")\s?`) + errorType = types.Universe.Lookup("error").Type() ) // lookup returns the symbol denoted by name at the position of the cursor. diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go index 959939b5a..10fbdf8b4 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go @@ -17,7 +17,6 @@ import ( "golang.org/x/tools/internal/analysis/analyzerutil" typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex" "golang.org/x/tools/internal/astutil" - "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/typesinternal/typeindex" "golang.org/x/tools/internal/versions" @@ -92,11 +91,20 @@ func reflecttypefor(pass *analysis.Pass) (any, error) { continue } + // Don't offer the fix if it would erase a reference to a + // (non-type) symbol, as this may break intended coupling. + // Examples: + // TypeOf(0) -> TypeFor[int]() // ok + // TypeOf(pkg.Var) -> TypeFor[int]() // bad: loses connection to pkg.Var + // TypeOf(uint(0)) -> TypeFor[uint]() // ok: (most) type symbols are preserved + if usesNonTypeSymbol(info, expr) { + continue + } + file := astutil.EnclosingFile(curCall) if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_22) { continue // TypeFor requires go1.22 } - tokFile := pass.Fset.File(file.Pos()) // Format the type as valid Go syntax. // TODO(adonovan): FileQualifier needs to respect @@ -127,14 +135,6 @@ func reflecttypefor(pass *analysis.Pass) (any, error) { continue } - // If the call argument contains the last use - // of a variable, as in: - // var zero T - // reflect.TypeOf(zero) - // remove the declaration of that variable. - curArg0 := curCall.ChildAt(edge.CallExpr_Args, 0) - edits = append(edits, refactor.DeleteUnusedVars(index, info, tokFile, curArg0)...) - pass.Report(analysis.Diagnostic{ Pos: call.Fun.Pos(), End: call.Fun.End(), @@ -163,6 +163,33 @@ func reflecttypefor(pass *analysis.Pass) (any, error) { return nil, nil } +// usesNonTypeSymbol reports whether expr uses a non-type symbol: +// a value-level object (a var, const, or func) or any other named entity +// whose identifier would disappear in a TypeFor replacement. We suppress +// the fix in that case so the rewrite does not erase a symbol the author +// named on purpose, for example reflect.TypeOf(f), reflect.TypeOf(x.Field), +// or a named array length such as [arrayLen]byte. +// +// Type names, package names, nil, and builtins are not such symbols: they +// either reappear in the type argument (e.g. T in reflect.TypeOf(T{})) or +// are irrelevant to it, so the rewrite is allowed. +func usesNonTypeSymbol(info *types.Info, expr ast.Expr) bool { + for n := range ast.Preorder(expr) { + id, ok := n.(*ast.Ident) + if !ok { + continue + } + switch info.Uses[id].(type) { + case *types.TypeName, *types.PkgName, *types.Nil, *types.Builtin: + // Type-level names reappear in (or are irrelevant to) the + // type argument, so they may be erased safely. + default: + return true + } + } + return false +} + // 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 { diff --git a/tools/vendor/golang.org/x/tools/go/ssa/builder.go b/tools/vendor/golang.org/x/tools/go/ssa/builder.go index 0e47d2d01..1669d80b3 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/builder.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/builder.go @@ -583,33 +583,6 @@ func (b *builder) assign(fn *Function, loc lvalue, e ast.Expr, isZero bool, sb * } return } - - if _, ok := loc.(*address); ok { - if isNonTypeParamInterface(loc.typ()) { - // e.g. var x interface{} = T{...} - // Can't in-place initialize an interface value. - // Fall back to copying. - } else { - // x = T{...} or x := T{...} - addr := loc.address(fn) - if sb != nil { - b.compLit(fn, addr, e, isZero, sb) - } else { - var sb storebuf - b.compLit(fn, addr, e, isZero, &sb) - sb.emit(fn) - } - - // Subtle: emit debug ref for aggregate types only; - // slice and map are handled by store ops in compLit. - switch typeparams.CoreType(loc.typ()).(type) { - case *types.Struct, *types.Array: - emitDebugRef(fn, e, addr, true) - } - - return - } - } } // simple case: just copy diff --git a/tools/vendor/golang.org/x/tools/go/ssa/emit.go b/tools/vendor/golang.org/x/tools/go/ssa/emit.go index c38f1fbf6..fd54b3d00 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/emit.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/emit.go @@ -248,7 +248,7 @@ func emitConv(f *Function, val Value, typ types.Type) Value { // Record the types of operands to MakeInterface, if // non-parameterized, as they are the set of runtime types. t := val.Type() - if !f.hasTypeParams() || !f.Prog.isParameterized(t) { + if !f.Prog.isParameterized(t) { addMakeInterfaceType(f.Prog, t) } diff --git a/tools/vendor/golang.org/x/tools/internal/astutil/comment.go b/tools/vendor/golang.org/x/tools/internal/astutil/comment.go index 40a347214..db9e68b0d 100644 --- a/tools/vendor/golang.org/x/tools/internal/astutil/comment.go +++ b/tools/vendor/golang.org/x/tools/internal/astutil/comment.go @@ -13,11 +13,17 @@ import ( ) // Deprecation returns the paragraph of the doc comment that starts with the -// conventional "Deprecation: " marker, as defined by -// https://go.dev/wiki/Deprecated, or "" if the documented symbol is not -// deprecated. +// conventional "Deprecation: " marker, or the end of a single-line comment +// with the deprecation marker, as defined by https://go.dev/wiki/Deprecated. +// Returns "" if the documented symbol is not deprecated. +// +// Deprecation(nil) returns the empty string. func Deprecation(doc *ast.CommentGroup) string { - for p := range strings.SplitSeq(doc.Text(), "\n\n") { + // doc.Text() is newline-terminated. For legacy reasons, this function will + // return as newline-terminated if is the last segment of the CommentGroup + // but not if it is a paragraph in the middle of the CommentGroup. + docText := doc.Text() + for p := range strings.SplitSeq(docText, "\n\n") { // There is still some ambiguity for deprecation message. This function // only returns the paragraph introduced by "Deprecated: ". More // information related to the deprecation may follow in additional @@ -27,6 +33,19 @@ func Deprecation(doc *ast.CommentGroup) string { return p } } + + // We also want to support deprecation markers in line comments. Not all + // call sites know whether they have a line comment or the type of AST node + // the comment is associated with; so to best match line deprecations, + // the CommentGroup must meet these criteria: + // * The doc.Text() is a single line. + // * The comment uses the "// ..." format. + if doc == nil || len(doc.List) != 1 || !strings.HasPrefix(doc.List[0].Text, "//") { + return "" + } + if i := strings.Index(docText, "Deprecated: "); i != -1 { + return docText[i:] + } return "" } diff --git a/tools/vendor/golang.org/x/tools/internal/refactor/imports.go b/tools/vendor/golang.org/x/tools/internal/refactor/imports.go index e1860ab06..5ce70aee8 100644 --- a/tools/vendor/golang.org/x/tools/internal/refactor/imports.go +++ b/tools/vendor/golang.org/x/tools/internal/refactor/imports.go @@ -99,19 +99,28 @@ func AddImportEdits(file *ast.File, name, pkgpath string) []Edit { } // 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] - before := decl0.Pos() - switch decl0 := decl0.(type) { - case *ast.GenDecl: - if decl0.Doc != nil { - before = decl0.Doc.Pos() - } - case *ast.FuncDecl: - if decl0.Doc != nil { - before = decl0.Doc.Pos() + // declaration (if it exists), including its comments; or at the end of the + // file (if there are no decls); or inside the declaration, if it is an + // import group. + var ( + before token.Pos + decl0 ast.Decl + ) + if len(file.Decls) > 0 { + decl0 = file.Decls[0] + before = decl0.Pos() + switch decl0 := decl0.(type) { + case *ast.GenDecl: + if decl0.Doc != nil { + before = decl0.Doc.Pos() + } + case *ast.FuncDecl: + if decl0.Doc != nil { + before = decl0.Doc.Pos() + } } + } else { + before = file.FileEnd } var pos token.Pos if gd, ok := decl0.(*ast.GenDecl); ok && gd.Tok == token.IMPORT && gd.Rparen.IsValid() { diff --git a/tools/vendor/golang.org/x/tools/internal/refactor/inline/inline.go b/tools/vendor/golang.org/x/tools/internal/refactor/inline/inline.go index cf4c58717..b329ab6f5 100644 --- a/tools/vendor/golang.org/x/tools/internal/refactor/inline/inline.go +++ b/tools/vendor/golang.org/x/tools/internal/refactor/inline/inline.go @@ -768,12 +768,18 @@ func (st *state) inlineCall() (*inlineCallResult, error) { } } - typeArgs := st.typeArguments(caller.Call) - if len(typeArgs) != len(callee.TypeParams) { - return nil, fmt.Errorf("cannot inline: type parameter inference is not yet supported") - } - if err := substituteTypeParams(logf, callee.TypeParams, typeArgs, params, replaceCalleeID); err != nil { - return nil, err + // Substitute type parameters in calleeDecl AST with type arguments from the + // call, and synchronize the parameter metadata. + { + typeArgs := st.typeArguments(caller.Call) + if len(typeArgs) != len(callee.TypeParams) { + return nil, fmt.Errorf("cannot inline: type parameter inference is not yet supported") + } + if err := substituteTypeParams(logf, callee.TypeParams, typeArgs, replaceCalleeID); err != nil { + return nil, err + } + // Synchronize the parameters' type pointers with the mutated calleeDecl. + syncParamFieldTypes(calleeDecl, params) } // Log effective arguments. @@ -1506,9 +1512,9 @@ type parameter struct { // variadic elimination, and may be unpacked into variadic calls. type replacer = func(offset int, repl ast.Expr, unpackVariadic bool) -// substituteTypeParams replaces type parameters in the callee with the corresponding type arguments -// from the call. -func substituteTypeParams(logf logger, typeParams []*paramInfo, typeArgs []*argument, params []*parameter, replace replacer) error { +// substituteTypeParams replaces type parameters in the callee with the +// corresponding type arguments from the call. +func substituteTypeParams(logf logger, typeParams []*paramInfo, typeArgs []*argument, replace replacer) error { assert(len(typeParams) == len(typeArgs), "mismatched number of type params/args") for i, paramInfo := range typeParams { arg := typeArgs[i] @@ -1522,31 +1528,37 @@ func substituteTypeParams(logf logger, typeParams []*paramInfo, typeArgs []*argu for _, ref := range paramInfo.Refs { replace(ref.Offset, internalastutil.CloneNode(arg.expr), false) } - // Also replace parameter field types. - // TODO(jba): find a way to do this that is not so slow and clumsy. - // Ideally, we'd walk each p.fieldType once, replacing all type params together. - for _, p := range params { - if id, ok := p.fieldType.(*ast.Ident); ok && id.Name == paramInfo.Name { - p.fieldType = arg.expr - } else { - for _, id := range identsNamed(p.fieldType, paramInfo.Name) { - replaceNode(p.fieldType, id, arg.expr) - } - } - } } return nil } -func identsNamed(n ast.Node, name string) []*ast.Ident { - var ids []*ast.Ident - ast.Inspect(n, func(n ast.Node) bool { - if id, ok := n.(*ast.Ident); ok && id.Name == name { - ids = append(ids, id) +// syncParamFieldTypes synchronizes the fieldType of each parameter in params +// with the mutated calleeDecl AST. This is necessary because substituteTypeParams +// mutates the calleeDecl AST, replacing type nodes, but params still references +// the original (now outdated) type nodes. +func syncParamFieldTypes(calleeDecl *ast.FuncDecl, params []*parameter) { + var i int + setFieldType := func(t ast.Expr) { + assert(i < len(params), "mismatched parameter count") + params[i].fieldType = t + i++ + } + + if calleeDecl.Recv != nil && len(calleeDecl.Recv.List) > 0 { + setFieldType(calleeDecl.Recv.List[0].Type) + } + if calleeDecl.Type.Params != nil { + for _, field := range calleeDecl.Type.Params.List { + if field.Names == nil { + setFieldType(field.Type) + } else { + for range field.Names { + setFieldType(field.Type) + } + } } - return true - }) - return ids + } + assert(i == len(params), "mismatched parameter count") } // substitute implements parameter elimination by substitution. diff --git a/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go b/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go index dacfc1dff..0f73c719c 100644 --- a/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go +++ b/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go @@ -12,366 +12,386 @@ type pkginfo struct { } var deps = [...]pkginfo{ - {"archive/tar", "\x03q\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\r"}, - {"archive/zip", "\x02\x04g\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0f\x04"}, - {"bufio", "\x03q\x86\x01D\x15"}, - {"bytes", "t+[\x03\fH\x02\x02"}, + {"archive/tar", "\x03{\x03F>\x01\n\x01&\x01\x01\x02\x05\b\x02\x01\x02\x02\r"}, + {"archive/zip", "\x02\x04j\x0e\x03\x12\x022>\x01-\x05\x01\x0f\x03\x02\x0f\x04"}, + {"bufio", "\x03{\x87\x01F\x15"}, + {"bytes", "~*]\x03\fJ\x02\x02"}, {"cmp", ""}, - {"compress/bzip2", "\x02\x02\xf6\x01A"}, - {"compress/flate", "\x02r\x03\x83\x01\f\x033\x01\x03"}, - {"compress/gzip", "\x02\x04g\a\x03\x15nU"}, - {"compress/lzw", "\x02r\x03\x83\x01"}, - {"compress/zlib", "\x02\x04g\a\x03\x13\x01o"}, - {"container/heap", "\xbc\x02"}, + {"compress/bzip2", "\x02\x02\x81\x02C"}, + {"compress/flate", "\x02|\x03\x84\x01\f\x034\x02\x03"}, + {"compress/gzip", "\x02\x04j\x0e\x03\x14pW"}, + {"compress/lzw", "\x02|\x03\x84\x01"}, + {"compress/zlib", "\x02\x04j\x0e\x03\x12\x01q"}, + {"container/heap", "\xc9\x02"}, {"container/list", ""}, {"container/ring", ""}, - {"context", "t\\p\x01\x0e"}, - {"crypto", "\x8a\x01pC"}, - {"crypto/aes", "\x10\v\t\x99\x02"}, - {"crypto/cipher", "\x03!\x01\x01 \x12\x1c,Z"}, - {"crypto/des", "\x10\x16 .,\x9d\x01\x03"}, - {"crypto/dsa", "F\x03+\x86\x01\r"}, - {"crypto/ecdh", "\x03\v\r\x10\x04\x17\x03\x0f\x1c\x86\x01"}, - {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x10\b\v\x06\x01\x03\x0e\x01\x1c\x86\x01\r\x05L\x01"}, - {"crypto/ed25519", "\x0e\x1f\x12\a\x03\b\a\x1cI=C"}, - {"crypto/elliptic", "4@\x86\x01\r9"}, - {"crypto/fips140", "#\x05\x95\x01\x98\x01"}, - {"crypto/hkdf", "0\x15\x01.\x16"}, - {"crypto/hmac", "\x1b\x16\x14\x01\x122"}, - {"crypto/hpke", "\x03\v\x02\x03\x04\x01\f\x01\x05\x1f\x05\a\x01\x01\x1d\x03\x13\x16\x9b\x01\x1c"}, - {"crypto/internal/boring", "\x0e\x02\x0el"}, - {"crypto/internal/boring/bbig", "\x1b\xec\x01N"}, - {"crypto/internal/boring/bcache", "\xc1\x02\x14"}, + {"context", "~]r\x01\x0e"}, + {"crypto", "\x93\x01rE"}, + {"crypto/aes", "\x10\v\n\xa5\x02"}, + {"crypto/cipher", "\x03\"\x01\x01 \x13$+\\"}, + {"crypto/des", "\x10\x17 7+\xa1\x01\x03"}, + {"crypto/dsa", "G\x034\x87\x01\r"}, + {"crypto/ecdh", "\x03\v\r\x11\x04\x17\x03\x10$\x87\x01"}, + {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x11\b\v\x06\x01\x03\x0f\x01$\x87\x01\r\x05O\x01"}, + {"crypto/ed25519", "\x0e \x12\a\x03\t\a$I>E"}, + {"crypto/elliptic", "5I\x87\x01\r;"}, + {"crypto/fips140", "$\x05\x9e\x01\x9b\x01"}, + {"crypto/hkdf", "1\x15\x017\x15"}, + {"crypto/hmac", "\x1b\x17\x14\x01\x139"}, + {"crypto/hpke", "\x03\v\x02\x03\x04\x01\r\x01\x05\x1f\x06\a\x01\x01%\x03\x12\x16\x9f\x01\x1d"}, + {"crypto/internal/boring", "\x0e\x02\x0eu"}, + {"crypto/internal/boring/bbig", "\x1b\xf7\x01P"}, + {"crypto/internal/boring/bcache", "\xce\x02\x14"}, {"crypto/internal/boring/sig", ""}, {"crypto/internal/constanttime", ""}, - {"crypto/internal/cryptotest", "\x03\r\v\b%\x10\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\f"}, - {"crypto/internal/entropy", "K"}, - {"crypto/internal/entropy/v1.0.0", "D0\x95\x018\x14"}, - {"crypto/internal/fips140", "C1\xbf\x01\v\x17"}, - {"crypto/internal/fips140/aes", "\x03 \x03\x02\x14\x05\x01\x01\x05,\x95\x014"}, - {"crypto/internal/fips140/aes/gcm", "#\x01\x02\x02\x02\x12\x05\x01\x06,\x92\x01"}, - {"crypto/internal/fips140/alias", "\xd5\x02"}, - {"crypto/internal/fips140/bigmod", "(\x19\x01\x06,\x95\x01"}, - {"crypto/internal/fips140/check", "#\x0e\a\t\x02\xb7\x01["}, - {"crypto/internal/fips140/check/checktest", "(\x8b\x02\""}, - {"crypto/internal/fips140/drbg", "\x03\x1f\x01\x01\x04\x14\x05\n)\x86\x01\x0f7\x01"}, - {"crypto/internal/fips140/ecdh", "\x03 \x05\x02\n\r3\x86\x01\x0f7"}, - {"crypto/internal/fips140/ecdsa", "\x03 \x04\x01\x02\a\x03\x06:\x16pF"}, - {"crypto/internal/fips140/ed25519", "\x03 \x05\x02\x04\f:\xc9\x01\x03"}, - {"crypto/internal/fips140/edwards25519", "\x1f\t\a\x123\x95\x017"}, - {"crypto/internal/fips140/edwards25519/field", "(\x14\x053\x95\x01"}, - {"crypto/internal/fips140/hkdf", "\x03 \x05\t\a<\x16"}, - {"crypto/internal/fips140/hmac", "\x03 \x15\x01\x01:\x16"}, - {"crypto/internal/fips140/mldsa", "\x03\x1c\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, - {"crypto/internal/fips140/mlkem", "\x03 \x05\x02\x0f\x03\x053\xcc\x01"}, - {"crypto/internal/fips140/nistec", "\x1f\t\r\f3\x95\x01*\r\x15"}, - {"crypto/internal/fips140/nistec/fiat", "(\x148\x95\x01"}, - {"crypto/internal/fips140/pbkdf2", "\x03 \x05\t\a<\x16"}, - {"crypto/internal/fips140/rsa", "\x03\x1c\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, - {"crypto/internal/fips140/sha256", "\x03 \x1e\x01\x06,\x16\x7f"}, - {"crypto/internal/fips140/sha3", "\x03 \x19\x05\x012\x95\x01L"}, - {"crypto/internal/fips140/sha512", "\x03 \x1e\x01\x06,\x16\x7f"}, - {"crypto/internal/fips140/ssh", "(b"}, - {"crypto/internal/fips140/subtle", "\x1f\a\x1b\xc8\x01"}, - {"crypto/internal/fips140/tls12", "\x03 \x05\t\a\x02:\x16"}, - {"crypto/internal/fips140/tls13", "\x03 \x05\b\b\t3\x16"}, - {"crypto/internal/fips140cache", "\xb3\x02\r'"}, + {"crypto/internal/cryptotest", "\x03\r\v\t%\x11\x1a\r\x12\x12!\x04\x06\n\x19\x01\x11\x11\x1d\x01\a\x03\x02\b\x02\x01\x05\f"}, + {"crypto/internal/cryptotest/wycheproof", "\x0e\x12S\x01\f\x01r@\x05\x03\x15\x10"}, + {"crypto/internal/entropy", "L"}, + {"crypto/internal/entropy/v1.0.0", "E9\x96\x01:\x14"}, + {"crypto/internal/fips140", "D:\xc2\x01\v\x17"}, + {"crypto/internal/fips140/aes", "\x03!\x03\x02\x14\x05\x01\x01\x055\x96\x016"}, + {"crypto/internal/fips140/aes/gcm", "$\x01\x02\x02\x02\x12\x05\x01\x065\x93\x01"}, + {"crypto/internal/fips140/alias", "\xe2\x02"}, + {"crypto/internal/fips140/bigmod", ")\x19\x01\x065\x96\x01"}, + {"crypto/internal/fips140/check", "$\x0e\a\t\x02\xc1\x01]"}, + {"crypto/internal/fips140/check/checktest", ")\x97\x02\""}, + {"crypto/internal/fips140/drbg", "\x03 \x01\x01\x04\x14\x05\n2\x87\x01\x0f9\x01"}, + {"crypto/internal/fips140/ecdh", "\x03!\x05\x02\n\r<\x87\x01\x0f9"}, + {"crypto/internal/fips140/ecdsa", "\x03!\x04\x01\x02\a\x03\x06C\x15r\x0f9"}, + {"crypto/internal/fips140/ed25519", "\x03!\x05\x02\x04\fC\xcc\x01\x03"}, + {"crypto/internal/fips140/edwards25519", "\x1f\n\a\x12<\x96\x019"}, + {"crypto/internal/fips140/edwards25519/field", ")\x14\x05<\x96\x01"}, + {"crypto/internal/fips140/hkdf", "\x03!\x05\t\aE\x15"}, + {"crypto/internal/fips140/hmac", "\x03!\x15\x01\x01C\x15"}, + {"crypto/internal/fips140/mldsa", "\x03\x1c\x05\x05\x02\x0e\x01\x03\x05<\x96\x019"}, + {"crypto/internal/fips140/mlkem", "\x03!\x05\x02\x0f\x03\x05<\xcf\x01"}, + {"crypto/internal/fips140/nistec", "\x1f\n\r\f<\x96\x01,\r\x15"}, + {"crypto/internal/fips140/nistec/fiat", ")\x14A\x96\x01"}, + {"crypto/internal/fips140/pbkdf2", "\x03!\x05\t\aE\x15"}, + {"crypto/internal/fips140/rsa", "\x03\x1c\x05\x04\x01\x02\x0e\x01\x01\x02A\x15rH"}, + {"crypto/internal/fips140/sha256", "\x03!\x1e\x01\x065\x15\x81\x01"}, + {"crypto/internal/fips140/sha3", "\x03!\x19\x05\x01;\x96\x01N"}, + {"crypto/internal/fips140/sha512", "\x03!\x1e\x01\x065\x15\x81\x01"}, + {"crypto/internal/fips140/ssh", ")j"}, + {"crypto/internal/fips140/subtle", "\x1f\b\x1b\xd2\x01"}, + {"crypto/internal/fips140/tls12", "\x03!\x05\t\a\x02C\x15"}, + {"crypto/internal/fips140/tls13", "\x03!\x05\b\b\t<\x15"}, + {"crypto/internal/fips140cache", "\xc0\x02\r."}, {"crypto/internal/fips140deps", ""}, - {"crypto/internal/fips140deps/byteorder", "\xa0\x01"}, - {"crypto/internal/fips140deps/cpu", "\xb5\x01\a"}, - {"crypto/internal/fips140deps/godebug", "\xbd\x01"}, - {"crypto/internal/fips140deps/time", "\xcf\x02"}, - {"crypto/internal/fips140hash", "9\x1d4\xcb\x01"}, - {"crypto/internal/fips140only", "\x17\x13\x0e\x01\x01Pp"}, + {"crypto/internal/fips140deps/byteorder", "\xa9\x01"}, + {"crypto/internal/fips140deps/cpu", "\xbe\x01\b"}, + {"crypto/internal/fips140deps/godebug", "\xc7\x01"}, + {"crypto/internal/fips140deps/time", "\xe2\x02"}, + {"crypto/internal/fips140hash", ":\x1e;\xcf\x01"}, + {"crypto/internal/fips140only", "\x17\x14\x0e\x01\x01Xr"}, {"crypto/internal/fips140test", ""}, - {"crypto/internal/impl", "\xbe\x02"}, - {"crypto/internal/rand", "\x1b\x0f s=["}, - {"crypto/internal/randutil", "\xfa\x01\x12"}, - {"crypto/internal/sysrand", "tq! \r\r\x01\x01\r\x06"}, - {"crypto/internal/sysrand/internal/seccomp", "t"}, - {"crypto/md5", "\x0e8.\x16\x16i"}, - {"crypto/mlkem", "\x0e%"}, - {"crypto/mlkem/mlkemtest", "3\x13\b&"}, - {"crypto/pbkdf2", "6\x0f\x01.\x16"}, - {"crypto/rand", "\x1b\x0f\x1c\x03+\x86\x01\rN"}, - {"crypto/rc4", "& .\xc9\x01"}, - {"crypto/rsa", "\x0e\r\x01\v\x10\x0e\x01\x03\b\a\x1c\x03\x133=\f\x01"}, - {"crypto/sha1", "\x0e\r+\x02,\x16\x16\x15T"}, - {"crypto/sha256", "\x0e\r\x1dR"}, - {"crypto/sha3", "\x0e+Q\xcb\x01"}, - {"crypto/sha512", "\x0e\r\x1fP"}, - {"crypto/subtle", "\x1f\x1d\x9f\x01z"}, - {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\t\x01\x18\x01\x0f\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\x0e\x06\x02\x01\x0f"}, - {"crypto/tls/internal/fips140tls", "\x17\xaa\x02"}, - {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x017\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\x0f\x02\x01\x01\x02\x03\x01"}, - {"crypto/x509/pkix", "j\x06\a\x90\x01H"}, - {"database/sql", "\x03\nQ\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\x0e\x02\x02\x02"}, - {"database/sql/driver", "\rg\x03\xb7\x01\x0f\x12"}, - {"debug/buildinfo", "\x03^\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f "}, - {"debug/dwarf", "\x03j\a\x03\x83\x011\x11\x01\x01"}, - {"debug/elf", "\x03\x06W\r\a\x03g\x1b\x01\f \x17\x01\x17"}, - {"debug/gosym", "\x03j\n$\xa1\x01\x01\x01\x02"}, - {"debug/macho", "\x03\x06W\r\ng\x1c,\x17\x01"}, - {"debug/pe", "\x03\x06W\r\a\x03g\x1c,\x17\x01\x17"}, - {"debug/plan9obj", "m\a\x03g\x1c,"}, - {"embed", "t+B\x19\x01T"}, + {"crypto/internal/impl", "\xcb\x02"}, + {"crypto/internal/rand", "\x1b\x10 |>]"}, + {"crypto/internal/randutil", "\x85\x02\x12"}, + {"crypto/internal/sysrand", "~r!\"\r\r\x01\x01\r\x06"}, + {"crypto/internal/sysrand/internal/seccomp", "~"}, + {"crypto/md5", "\x0e97\x15\x16k"}, + {"crypto/mldsa", "\x0e%K\x87\x01"}, + {"crypto/mlkem", "\x0e&"}, + {"crypto/mlkem/mlkemtest", "4\x13\t."}, + {"crypto/pbkdf2", "7\x0f\x017\x15"}, + {"crypto/rand", "\x1b\x10\x1c\x034\x87\x01\rP"}, + {"crypto/rc4", "' 7\xcc\x01"}, + {"crypto/rsa", "\x0e\r\x01\f\x10\x0e\x01\x03\t\a$\x03\x124>\f\x01"}, + {"crypto/sha1", "\x0e\r,\x025\x15\x16\x15V"}, + {"crypto/sha256", "\x0e\r\x1eZ"}, + {"crypto/sha3", "\x0e,Y\xcf\x01"}, + {"crypto/sha512", "\x0e\r X"}, + {"crypto/subtle", "\x1f\x1e\xa9\x01|"}, + {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\n\x01\x18\x01\x0f\x01\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x1f\x02\x03\x12\x16\x15\t>\x16\x18\r\b\x01\x01\x01\x02\x01\x0e\x06\x03\x01\x15"}, + {"crypto/tls/internal/fips140tls", "\x17\xb7\x02"}, + {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x01\x017\x01\x06\x01\x01\x02\x05\x0f\x06\t\x02\x03F\x03;\x01\x02\b\x01\x01\x02\a\x12\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x04\x01"}, + {"crypto/x509/pkix", "m\x06\x0e\x91\x019\x11"}, + {"database/sql", "\x03\nS\x01\x1d\x03\x84\x01\v\a$\x05\b\x02\x03\x01\x0e\x02\x02\x02\x01"}, + {"database/sql/driver", "\rT\x1d\x03\xba\x01\x0f\x12\a"}, + {"database/sql/internal", ""}, + {"debug/buildinfo", "\x03a\x02\x01\x01\b\x0e\x03h\x1a\x02\x01-\x0f "}, + {"debug/dwarf", "\x03m\x0e\x03\x84\x013\x11\x01\x01"}, + {"debug/elf", "\x03\x06Z\r\x0e\x03h\x1b\x01\f\"\x17\x01\x17"}, + {"debug/gosym", "\x03m\x11#\xa5\x01\x01\x01\x02"}, + {"debug/macho", "\x03\x06Z\r\x11h\x1c.\x17\x01"}, + {"debug/pe", "\x03\x06Z\r\x0e\x03h\x1c.\x17\x01\x17"}, + {"debug/plan9obj", "p\x0e\x03h\x1c."}, + {"embed", "~*D\x19\x01V"}, {"embed/internal/embedtest", ""}, {"encoding", ""}, - {"encoding/ascii85", "\xfa\x01C"}, - {"encoding/asn1", "\x03q\x03g(\x01'\r\x02\x01\x11\x03\x01"}, - {"encoding/base32", "\xfa\x01A\x02"}, - {"encoding/base64", "\xa0\x01ZA\x02"}, - {"encoding/binary", "t\x86\x01\f(\r\x05"}, - {"encoding/csv", "\x02\x01q\x03\x83\x01D\x13\x02"}, - {"encoding/gob", "\x02f\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x10\x02"}, - {"encoding/hex", "t\x03\x83\x01A\x03"}, - {"encoding/json", "\x03\x01d\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x11\x01\x01\x02"}, - {"encoding/pem", "\x03i\b\x86\x01A\x03"}, - {"encoding/xml", "\x02\x01e\f\x03\x83\x014\x05\n\x01\x02\x11\x02"}, - {"errors", "\xd0\x01\x85\x01"}, - {"expvar", "qLA\b\v\x15\r\b\x02\x03\x01\x12"}, - {"flag", "h\f\x03\x83\x01,\b\x05\b\x02\x01\x11"}, - {"fmt", "tF'\x19\f \b\r\x02\x03\x13"}, - {"go/ast", "\x03\x01s\x0f\x01s\x03)\b\r\x02\x01\x13\x02"}, - {"go/build", "\x02\x01q\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, - {"go/build/constraint", "t\xc9\x01\x01\x13\x02"}, - {"go/constant", "w\x10\x7f\x01\x024\x01\x02\x13"}, - {"go/doc", "\x04s\x01\x05\n=61\x10\x02\x01\x13\x02"}, - {"go/doc/comment", "\x03t\xc4\x01\x01\x01\x01\x13\x02"}, - {"go/format", "\x03t\x01\f\x01\x02sD"}, - {"go/importer", "y\a\x01\x02\x04\x01r9"}, - {"go/internal/gccgoimporter", "\x02\x01^\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\r\b"}, - {"go/internal/gcimporter", "\x02u\x10\x010\x05\r0,\x15\x03\x02"}, - {"go/internal/scannerhooks", "\x87\x01"}, - {"go/internal/srcimporter", "w\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x15"}, - {"go/parser", "\x03q\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, - {"go/printer", "w\x01\x02\x03\ns\f \x15\x02\x01\x02\f\x05\x02"}, - {"go/scanner", "\x03t\v\x05s2\x10\x01\x14\x02"}, - {"go/token", "\x04s\x86\x01>\x02\x03\x01\x10\x02"}, - {"go/types", "\x03\x01\x06j\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, - {"go/version", "\xc2\x01|"}, - {"hash", "\xfa\x01"}, - {"hash/adler32", "t\x16\x16"}, - {"hash/crc32", "t\x16\x16\x15\x8b\x01\x01\x14"}, - {"hash/crc64", "t\x16\x16\xa0\x01"}, - {"hash/fnv", "t\x16\x16i"}, - {"hash/maphash", "\x8a\x01\x11<~"}, - {"html", "\xbe\x02\x02\x13"}, - {"html/template", "\x03n\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\r\x01\x03\x02"}, - {"image", "\x02r\x1fg\x0f4\x03\x01"}, + {"encoding/ascii85", "\x85\x02E"}, + {"encoding/asn1", "\x03{\x03h(\x01)\r\x02\x01\x11\x03\x01"}, + {"encoding/base32", "\x85\x02C\x02"}, + {"encoding/base64", "\xa9\x01\\C\x02"}, + {"encoding/binary", "~\x87\x01\f*\r\x05"}, + {"encoding/csv", "\x02\x01{\x03\x84\x01F\x13\x02"}, + {"encoding/gob", "\x02i\x05\x0e\x03h\x1c\v\x01\x03\x1f\b\x12\x01\x10\x02"}, + {"encoding/hex", "~\x03\x84\x01C\x03"}, + {"encoding/json", "\x03\x01g\n\x01\x01\x02\x01\x01\x03\x03\x84\x016\x0f\x01"}, + {"encoding/json/internal", "~"}, + {"encoding/json/internal/jsonflags", "u"}, + {"encoding/json/internal/jsonopts", "u\x01"}, + {"encoding/json/internal/jsontest", "\x03f\x15\x03\x83\x01\x01\x012\b\b\x03\x02\x0f"}, + {"encoding/json/internal/jsonwire", "\x04r\b\x87\x01\f7\x02\x01\x13\x01\x01"}, + {"encoding/json/jsontext", "\x03r\x01\x01\x02\x05\x87\x01\x03\t\x034\x02\x01\x02\x13"}, + {"encoding/json/v2", "\x03\x01g\x03\x01\x01\x03\x02\x01\x01\x02\x01\x04\x03\x84\x01\f\x03'\r\x02\x01\x02\x0f\x02\x02"}, + {"encoding/pem", "\x03l\x0f\x87\x01C\x03"}, + {"encoding/xml", "\x02\x01h\x13\x03\x84\x016\x05\n\x01\x02\x11\x02"}, + {"errors", "\xdb\x01\x87\x01"}, + {"expvar", "tSB\b\v\x17\r\b\x02\x03\x01\x12"}, + {"flag", "k\x13\x03\x84\x01.\b\x05\b\x02\x01\x11"}, + {"fmt", "~E)\x19\f\"\b\r\x02\x03\x13"}, + {"go/ast", "\x03\x01}\x0e\x01u\x03+\b\r\x02\x01\x13\x02"}, + {"go/build", "\x02\x01{\x03\x01\x02\x02\a\x02\x01\x17 \x04\x02\t\x1c\x13\x01-\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, + {"go/build/constraint", "~\xcc\x01\x01\x13\x02"}, + {"go/constant", "\x81\x01\x0f\x81\x01\x01\x026\x01\x02\x13"}, + {"go/doc", "\x04}\x01\x05\t>73\x10\x02\x01\x13\x02"}, + {"go/doc/comment", "\x03~\xc7\x01\x01\x01\x01\x13\x02"}, + {"go/format", "\x03~\x01\v\x01\x02uF"}, + {"go/importer", "\x83\x01\a\x01\x01\x04\x01t;"}, + {"go/internal/gccgoimporter", "\x02\x01a\x1a\x03\x04\v\x01r\x02.\x01\x05\x11\x01\r\b"}, + {"go/internal/gcimporter", "\x02\x7f\x0f\x010\x140.\x15\x03\x02"}, + {"go/internal/srcimporter", "\x81\x01\x01\x01\n\x03\x01t.\x01\x05\x12\x02\x15"}, + {"go/parser", "\x03{\x03\x01\x02\v\x01u\x01-\x06\x12"}, + {"go/printer", "\x81\x01\x01\x02\x03\tu\f\"\x15\x02\x01\x02\f\x05\x02"}, + {"go/scanner", "\x03~\x0fu4\x10\x01\x14\x02"}, + {"go/token", "\x04}\x87\x01@\x02\x03\x01\x10\x02"}, + {"go/types", "\x03\x01\x06t\x03\x01\x03\b\x03\x02\x0654\x04\x03\t\"\x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, + {"go/version", "\xcc\x01\x7f"}, + {"hash", "\x85\x02"}, + {"hash/adler32", "~\x15\x16"}, + {"hash/crc32", "~\x15\x16\x15\x8f\x01\x01\x14"}, + {"hash/crc64", "~\x15\x16\xa4\x01"}, + {"hash/fnv", "~\x15\x16k"}, + {"hash/maphash", "\x93\x01\x11>\x80\x01"}, + {"html", "\xcb\x02\x02\x13"}, + {"html/template", "\x03q\r\x18.>\x01\n#\x05\x01\x02\x03\n\x02\x01\x02\r\x01\x03\x02"}, + {"image", "\x02|\x1ei\x0f6\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x93\x01"}, - {"image/draw", "\x92\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05l\x03\x1b\x01\x01\x01\vZ\x0f"}, - {"image/internal/imageutil", "\x92\x01"}, - {"image/jpeg", "\x02r\x1e\x01\x04c"}, - {"image/png", "\x02\ad\n\x13\x02\x06\x01gC"}, - {"index/suffixarray", "\x03j\a\x86\x01\f+\n\x01"}, - {"internal/abi", "\xbc\x01\x99\x01"}, - {"internal/asan", "\xd5\x02"}, - {"internal/bisect", "\xb3\x02\r\x01"}, - {"internal/buildcfg", "wHg\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb5\x01\xa0\x01"}, + {"image/color/palette", "\x9c\x01"}, + {"image/draw", "\x9b\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05v\x03\x1a\x01\x01\x01\v\\\x0f"}, + {"image/internal/imageutil", "\x9b\x01"}, + {"image/jpeg", "\x02|\x1d\x01\x04e"}, + {"image/png", "\x02\ag\x11\x12\x02\x06\x01iE"}, + {"index/suffixarray", "\x03m\x0e\x87\x01\f-\n\x01"}, + {"internal/abi", "\xc6\x01\x9c\x01"}, + {"internal/asan", "\xe2\x02"}, + {"internal/bisect", "\xc0\x02\r\x01"}, + {"internal/buildcfg", "\x81\x01Hj\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xbe\x01\xa4\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "w[T\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\xa0\x01\x15\a\x99\x01"}, + {"internal/cgrouptest", "\x81\x01\\V\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\xa9\x01\x15\b\x9c\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "q\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\x0e\x06"}, - {"internal/coverage/cformat", "\x04s.\x04Q\v6\x01\x02\x0e"}, - {"internal/coverage/cmerge", "w.a"}, - {"internal/coverage/decodecounter", "m\n.\v\x02H,\x17\x18"}, - {"internal/coverage/decodemeta", "\x02k\n\x17\x17\v\x02H,"}, - {"internal/coverage/encodecounter", "\x02k\n.\f\x01\x02F\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01j\n\x13\x04\x17\r\x02F,/"}, - {"internal/coverage/pods", "\x04s.\x81\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xd5\x02"}, - {"internal/coverage/slicereader", "m\n\x83\x01["}, - {"internal/coverage/slicewriter", "w\x83\x01"}, - {"internal/coverage/stringtab", "w9\x04F"}, + {"internal/coverage/cfile", "t\r\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01$\x02'.\x06\a\n\x01\x03\x0e\x06"}, + {"internal/coverage/cformat", "\x04}-\x04S\v8\x01\x02\x0e"}, + {"internal/coverage/cmerge", "\x81\x01-c"}, + {"internal/coverage/decodecounter", "p\x11-\v\x02J.\x17\x18"}, + {"internal/coverage/decodemeta", "\x02n\x11\x16\x17\v\x02J."}, + {"internal/coverage/encodecounter", "\x02n\x11-\f\x01\x02H\v#\x15"}, + {"internal/coverage/encodemeta", "\x02\x01m\x11\x12\x04\x17\r\x02H./"}, + {"internal/coverage/pods", "\x04}-\x85\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xe2\x02"}, + {"internal/coverage/slicereader", "p\x11\x84\x01]"}, + {"internal/coverage/slicewriter", "\x81\x01\x84\x01"}, + {"internal/coverage/stringtab", "\x81\x018\x04H"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xd5\x02"}, - {"internal/dag", "\x04s\xc4\x01\x03"}, - {"internal/diff", "\x03t\xc5\x01\x02"}, - {"internal/exportdata", "\x02\x01q\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "t+B\x1a@"}, - {"internal/fmtsort", "\x04\xaa\x02\r"}, - {"internal/fuzz", "\x03\nH\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, + {"internal/cpu", "\xe2\x02"}, + {"internal/dag", "\x04}\xc7\x01\x03"}, + {"internal/diff", "\x03~\xc8\x01\x02"}, + {"internal/exportdata", "\x02\x01{\x03\x02f\x1c.\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "~*D\x1aB"}, + {"internal/fmtsort", "\x04\xb7\x02\r"}, + {"internal/fuzz", "\x03\nJ\x19\x04\n\x03\x01\v\x037>\f\x03\x1f\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, + {"internal/gate", "\r"}, {"internal/goarch", ""}, - {"internal/godebug", "\x9d\x01!\x82\x01\x01\x14"}, + {"internal/godebug", "\xa6\x01\"\x85\x01\x01\x14"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa6\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xb3\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa6\x02\v\r\x02"}, - {"internal/lazytemplate", "\xfa\x01,\x18\x02\r"}, - {"internal/msan", "\xd5\x02"}, + {"internal/lazyregexp", "\xb3\x02\v\r\x02"}, + {"internal/lazytemplate", "\x85\x02.\x18\x02\r"}, + {"internal/msan", "\xe2\x02"}, + {"internal/nettest", "\x03\nqG@\f\n\x12\x06\x15\x05\x0f"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "l\x8e\x01,"}, - {"internal/oserror", "t"}, - {"internal/pkgbits", "\x03R\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "o\x96\x01."}, + {"internal/oserror", "~"}, + {"internal/pkgbits", "\x03T\x19\x0e\x03\x04\vu\r!\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "tl\x05\x159\r\x01\x01\r\x06"}, - {"internal/profile", "\x03\x04m\x03\x83\x017\n\x01\x01\x01\x11"}, + {"internal/poll", "~m\x05\x15;\r\x01\x01\r\x06"}, + {"internal/profile", "\x03\x04w\x03\x84\x019\n\x01\x01\x01\x11"}, {"internal/profilerecord", ""}, - {"internal/race", "\x9b\x01\xba\x01"}, - {"internal/reflectlite", "\x9b\x01!;<\""}, - {"internal/runtime/atomic", "\xbc\x01\x99\x01"}, - {"internal/runtime/cgroup", "\x9f\x01=\x04u"}, - {"internal/runtime/exithook", "\xd1\x01\x84\x01"}, - {"internal/runtime/gc", "\xbc\x01"}, - {"internal/runtime/gc/internal/gen", "\nc\n\x18k\x04\v\x1d\b\x10\x02"}, - {"internal/runtime/gc/scan", "\xb5\x01\a\x18\az"}, - {"internal/runtime/maps", "\x9b\x01\x01 \n\t\t\x03z"}, - {"internal/runtime/math", "\xbc\x01"}, + {"internal/race", "\xa4\x01\xbe\x01"}, + {"internal/reflectlite", "\xa4\x01\"<>\""}, + {"internal/runtime/atomic", "\xc6\x01\x9c\x01"}, + {"internal/runtime/cgroup", "\xa8\x01?\x04w"}, + {"internal/runtime/exithook", "\xdc\x01\x86\x01"}, + {"internal/runtime/gc", "\xc6\x01"}, + {"internal/runtime/gc/internal/gen", "\nf\x11\x17m\x04\v\x1f\b\x10\x02"}, + {"internal/runtime/gc/scan", "\xbe\x01\b\x19\a|"}, + {"internal/runtime/maps", "\xa4\x01\x01\x04\x15\b\x03\a\n\t\x03.N"}, + {"internal/runtime/math", "\xc6\x01"}, {"internal/runtime/pprof/label", ""}, {"internal/runtime/startlinetest", ""}, - {"internal/runtime/sys", "\xbc\x01\x04"}, - {"internal/runtime/syscall/linux", "\xbc\x01\x99\x01"}, + {"internal/runtime/sys", "\xc6\x01\x04"}, + {"internal/runtime/syscall/linux", "\xc6\x01\x9c\x01"}, {"internal/runtime/wasitest", ""}, - {"internal/saferio", "\xfa\x01["}, - {"internal/singleflight", "\xc0\x02"}, - {"internal/strconv", "\x89\x02L"}, - {"internal/stringslite", "\x9f\x01\xb6\x01"}, - {"internal/sync", "\x9b\x01!\x13r\x14"}, - {"internal/synctest", "\x9b\x01\xba\x01"}, - {"internal/syscall/execenv", "\xc2\x02"}, - {"internal/syscall/unix", "\xb3\x02\x0e\x01\x13"}, - {"internal/sysinfo", "\x02\x01\xb2\x01E,\x18\x02"}, + {"internal/saferio", "\x85\x02]"}, + {"internal/singleflight", "\xcd\x02"}, + {"internal/strconv", "\x94\x02N"}, + {"internal/stringslite", "\xa8\x01\xba\x01"}, + {"internal/sync", "\xa4\x01\"\x14t\x14"}, + {"internal/synctest", "\xa4\x01\xbe\x01"}, + {"internal/syscall/execenv", "\xcf\x02"}, + {"internal/syscall/unix", "\xeb\x01U\x0e\x01\x13"}, + {"internal/sysinfo", "\x02\x01\xbb\x01G.\x18\x02"}, {"internal/syslist", ""}, - {"internal/testenv", "\x03\ng\x02\x01*\x1b\x0f0+\x01\x05\a\n\x01\x02\x02\x01\f"}, - {"internal/testhash", "\x03\x87\x01p\x118\f"}, - {"internal/testlog", "\xc0\x02\x01\x14"}, - {"internal/testpty", "t\x03\xaf\x01"}, - {"internal/trace", "\x02\x01\x01\x06c\a\x03w\x03\x03\x06\x03\t+\n\x01\x01\x01\x11\x06"}, - {"internal/trace/internal/testgen", "\x03j\nu\x03\x02\x03\x011\v\r\x11"}, - {"internal/trace/internal/tracev1", "\x03\x01i\a\x03}\x06\f5\x01"}, - {"internal/trace/raw", "\x02k\nz\x03\x06C\x01\x13"}, - {"internal/trace/testtrace", "\x02\x01q\x03q\x04\x03\x05\x01\x05,\v\x02\b\x02\x01\x05"}, + {"internal/testenv", "\x03\nq\x02\x01)\x1c\x100-\x01\x05\a\n\x01\x02\x02\x01\f"}, + {"internal/testhash", "\x03\x90\x01r\x11:\f"}, + {"internal/testlog", "\xcd\x02\x01\x14"}, + {"internal/testpty", "~\x03\xb2\x01"}, + {"internal/trace", "\x02\x01\x01\x06f\x0e\x03x\x03\x03\x06\x03\t-\n\x01\x01\x01\x11\x06"}, + {"internal/trace/internal/testgen", "\x03m\x11v\x03\x02\x03\x013\v\r\x11"}, + {"internal/trace/internal/tracev1", "\x03\x01l\x0e\x03~\x06\f7\x01"}, + {"internal/trace/raw", "\x02n\x11{\x03\x06E\x01\x13"}, + {"internal/trace/testtrace", "\x02\x01{\x03r\x04\x03\x05\x01\x05.\v\x02\b\x02\x01\x05"}, {"internal/trace/tracev2", ""}, - {"internal/trace/traceviewer", "\x02d\v\x06\x1a<\x1f\a\a\x04\b\v\x15\x01\x05\a\n\x01\x02\x0f"}, + {"internal/trace/traceviewer", "\x02g\v\r\x19>\x1f\a\a\x04\b\v\x17\x01\x05\a\n\x01\x02\x0f"}, {"internal/trace/traceviewer/format", ""}, - {"internal/trace/version", "wz\t"}, - {"internal/txtar", "\x03t\xaf\x01\x18"}, - {"internal/types/errors", "\xbd\x02"}, - {"internal/unsafeheader", "\xd5\x02"}, - {"internal/xcoff", "`\r\a\x03g\x1c,\x17\x01"}, - {"internal/zstd", "m\a\x03\x83\x01\x0f"}, - {"io", "t\xcc\x01"}, - {"io/fs", "t+*11\x10\x14\x04"}, - {"io/ioutil", "\xfa\x01\x01+\x15\x03"}, - {"iter", "\xcf\x01d\""}, - {"log", "w\x83\x01\x05'\r\r\x01\x0e"}, + {"internal/trace/version", "\x81\x01{\t"}, + {"internal/txtar", "\x03~\xb2\x01\x18"}, + {"internal/types/errors", "\xca\x02"}, + {"internal/unsafeheader", "\xe2\x02"}, + {"internal/xcoff", "c\r\x0e\x03h\x1c.\x17\x01"}, + {"internal/zstd", "p\x0e\x03\x84\x01\x0f"}, + {"io", "~\xcf\x01"}, + {"io/fs", "~*,13\x10\x14\x04"}, + {"io/ioutil", "\x85\x02\x01-\x15\x03"}, + {"iter", "\xda\x01f\""}, + {"log", "\x81\x01\x84\x01\x05)\r\r\x01\x0e"}, {"log/internal", ""}, - {"log/slog", "\x03\n[\t\x03\x03\x83\x01\x04\x01\x02\x02\x03(\x05\b\x02\x01\x02\x01\x0e\x02\x02\x02"}, + {"log/slog", "\x03\n^\t\n\x03H<\x04\x01\x02\x02\x03*\x05\b\x02\x01\x02\x01\x0e\x02\x02\x02"}, {"log/slog/internal", ""}, - {"log/slog/internal/benchmarks", "\rg\x03\x83\x01\x06\x03:\x12"}, - {"log/slog/internal/buffer", "\xc0\x02"}, - {"log/syslog", "t\x03\x87\x01\x12\x16\x18\x02\x0f"}, - {"maps", "\xfd\x01X"}, - {"math", "\xb5\x01TL"}, - {"math/big", "\x03q\x03)\x15E\f\x03\x020\x02\x01\x02\x15"}, - {"math/big/internal/asmgen", "\x03\x01s\x92\x012\x03"}, - {"math/bits", "\xd5\x02"}, - {"math/cmplx", "\x86\x02\x03"}, - {"math/rand", "\xbd\x01I:\x01\x14"}, - {"math/rand/v2", "t,\x03c\x03L"}, - {"mime", "\x02\x01i\b\x03\x83\x01\v!\x15\x03\x02\x11\x02"}, - {"mime/multipart", "\x02\x01N#\x03F=\v\x01\a\x02\x15\x02\x06\x0f\x02\x01\x17"}, - {"mime/quotedprintable", "\x02\x01t\x83\x01"}, - {"net", "\x04\tg+\x1e\n\x05\x13\x01\x01\x04\x15\x01%\x06\r\b\x05\x01\x01\r\x06\a"}, - {"net/http", "\x02\x01\x03\x01\x04\x02D\b\x13\x01\a\x03F=\x01\x03\a\x01\x03\x02\x02\x01\x02\x06\x02\x01\x01\n\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\x0e\x02\x02\x02\b\x01\x01\x01"}, - {"net/http/cgi", "\x02W\x1b\x03\x83\x01\x04\a\v\x01\x13\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x11\x0e"}, - {"net/http/cookiejar", "\x04p\x03\x99\x01\x01\b\a\x05\x16\x03\x02\x0f\x04"}, - {"net/http/fcgi", "\x02\x01\n`\a\x03\x83\x01\x16\x01\x01\x14\x18\x02\x0f"}, - {"net/http/httptest", "\x02\x01\nL\x02\x1b\x01\x83\x01\x04\x12\x01\n\t\x02\x17\x01\x02\x0f\x0e"}, - {"net/http/httptrace", "\rLnI\x14\n!"}, - {"net/http/httputil", "\x02\x01\ng\x03\x83\x01\x04\x0f\x03\x01\x05\x02\x01\v\x01\x19\x02\x01\x0e\x0e"}, - {"net/http/internal", "\x02\x01q\x03\x83\x01"}, - {"net/http/internal/ascii", "\xbe\x02\x13"}, - {"net/http/internal/httpcommon", "\rg\x03\x9f\x01\x0e\x01\x17\x01\x01\x02\x1d\x02"}, - {"net/http/internal/testcert", "\xbe\x02"}, - {"net/http/pprof", "\x02\x01\nj\x19-\x02\x0e-\x04\x13\x14\x01\r\x04\x03\x01\x02\x01\x11"}, + {"log/slog/internal/benchmarks", "\rq\x03\x84\x01\x06\x03<\x12"}, + {"log/slog/internal/buffer", "\xcd\x02"}, + {"log/syslog", "~\x03\x88\x01\x12\x18\x18\x02\x0f"}, + {"maps", "\x88\x02Z"}, + {"math", "\xbe\x01VN"}, + {"math/big", "\x03{\x03(\x15G\f\x03\x022\x02\x01\x02\x15"}, + {"math/big/internal/asmgen", "\x03\x01}\x93\x014\x03"}, + {"math/bits", "\xe2\x02"}, + {"math/cmplx", "\x91\x02\x03"}, + {"math/rand", "\xc7\x01J<\x01\x14"}, + {"math/rand/v2", "~+\x03e\x03N"}, + {"mime", "\x02\x01l\x0f\x03\x84\x01\v#\x15\x03\x02\x11\x02"}, + {"mime/multipart", "\x02\x01P+\x03F>\v\x01\a\x02\x17\x02\x06\x0f\x02\x01\x17"}, + {"mime/quotedprintable", "\x02\x01~\x84\x01"}, + {"net", "\x04\tq*\x1f\v\x05\x13\x01\x01\x04\x15\x01'\x06\r\b\x05\x01\x01\r\x06\t"}, + {"net/http", "\x02\x01\x03\x01\x04\x02N\x14\x0f\x03F>\x01\x03\a\x01\x06\x01\x01\x02\x06\x02\x01\x01\f\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\x0e\x02\x02\x02\n\x01\x03"}, + {"net/http/cgi", "\x02Y#\x03\x84\x01\x04\a\v\x01\x15\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x11\x10"}, + {"net/http/cookiejar", "\x04z\x03\x9a\x01\x01\b\t\x05\x16\x03\x02\x0f\x04"}, + {"net/http/fcgi", "\x02\x01\nc\x0e\x03\x84\x01\x16\x01\x01\x16\x18\x02\x0f"}, + {"net/http/httptest", "\x02\x01\nN\x02#\x01P4\x04\x12\x01\f\t\x02\r\n\x01\x02\x03\f\x06\n"}, + {"net/http/httptrace", "\rNwI\x16+"}, + {"net/http/httputil", "\x02\x01\nq\x03F>\x04\x0f\x03\x01\x05\x02\x01\r\x01\x19\x02\x01\x0e\x10"}, + {"net/http/internal", "\x02\x01m\x0e\x03\x84\x01"}, + {"net/http/internal/ascii", "\xcb\x02\x13"}, + {"net/http/internal/http2", "\x02\x01\x03\x01\x06F\b\x15\x0e\x03\x84\x01\x01\x03\b\x03\x02\x03\x02\x06\x02\x03\x01\n\x01\x01\b\x05\b\x02\x01\x02\x01\x0e\x10\x02\x02"}, + {"net/http/internal/httpcommon", "\rq\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"}, + {"net/http/internal/httpsfv", "\xc8\x02\x02\x01\x11\x04"}, + {"net/http/internal/testcert", "\xcb\x02"}, + {"net/http/pprof", "\x02\x01\nt\x18.\x11-\x04\x13\x16\x01\r\x04\x03\x01\x02\x01\x11"}, {"net/internal/cgotest", ""}, - {"net/internal/socktest", "w\xc9\x01\x02"}, - {"net/mail", "\x02r\x03\x83\x01\x04\x0f\x03\x14\x1a\x02\x0f\x04"}, - {"net/netip", "\x04p+\x01f\x034\x17"}, - {"net/rpc", "\x02m\x05\x03\x10\ni\x04\x12\x01\x1d\r\x03\x02"}, - {"net/rpc/jsonrpc", "q\x03\x03\x83\x01\x16\x11\x1f"}, - {"net/smtp", "\x194\f\x13\b\x03\x83\x01\x16\x14\x1a"}, - {"net/textproto", "\x02\x01q\x03\x83\x01\f\n-\x01\x02\x15"}, - {"net/url", "t\x03Fc\v\x10\x02\x01\x17"}, - {"os", "t+\x01\x19\x03\x10\x14\x01\x03\x01\x05\x10\x018\b\x05\x01\x01\r\x06"}, - {"os/exec", "\x03\ngI'\x01\x15\x01+\x06\a\n\x01\x03\x01\r"}, - {"os/exec/internal/fdtest", "\xc2\x02"}, - {"os/signal", "\r\x99\x02\x15\x05\x02"}, - {"os/user", "\x02\x01q\x03\x83\x01,\r\n\x01\x02"}, - {"path", "t+\xb4\x01"}, - {"path/filepath", "t+\x1aB+\r\b\x03\x04\x11"}, - {"plugin", "t"}, - {"reflect", "t'\x04\x1d\x13\b\x04\x05\x17\x06\t-\n\x03\x11\x02\x02"}, + {"net/internal/socktest", "\x81\x01\xcc\x01\x02"}, + {"net/mail", "\x02|\x03\x84\x01\x04\x0f\x03\x16\x1a\x02\x0f\x04"}, + {"net/netip", "\x04z*\x01h\x036\x17"}, + {"net/rpc", "\x02p\f\x03\x0f\nk\x04\x12\x01\x1f\r\x03\x02"}, + {"net/rpc/jsonrpc", "t\n\x03\x84\x01\x16\x13\x1f"}, + {"net/smtp", "\x195\r\x14\x0f\x03\x84\x01\x16\x16\x1a"}, + {"net/textproto", "\x02\x01{\x03\x84\x01\f\n/\x01\x02\x15"}, + {"net/url", "~\x03Ff\v\x10\x02\x01\x17"}, + {"os", "~*\x01\x19\x04\x11\x14\x01\x03\x01\x05\x10\x01:\b\x05\x01\x01\r\x06"}, + {"os/exec", "\x03\nqI(\x01\x15\x01-\x06\a\n\x01\x03\x01\r"}, + {"os/exec/internal/fdtest", "\xcf\x02"}, + {"os/signal", "\r\xa6\x02\x15\x05\x02"}, + {"os/user", "\x02\x01{\x03\x84\x01.\r\n\x01\x02"}, + {"path", "~*\xb8\x01"}, + {"path/filepath", "~*\x1aD-\r\b\x03\x04\x11"}, + {"plugin", "~"}, + {"reflect", "~&\x04\x1e\x03\x11\b\x04\x05\x17\x06\t/\n\x03\x11\x02\x02"}, {"reflect/internal/example1", ""}, {"reflect/internal/example2", ""}, - {"regexp", "\x03\xf7\x018\t\x02\x01\x02\x11\x02"}, - {"regexp/syntax", "\xbb\x02\x01\x01\x01\x02\x11\x02"}, - {"runtime", "\x9b\x01\x04\x01\x03\f\x06\a\x02\x01\x01\x0e\x03\x01\x01\x01\x02\x01\x01\x01\x02\x01\x04\x01\x10\x18L"}, - {"runtime/coverage", "\xa7\x01S"}, - {"runtime/debug", "wUZ\r\b\x02\x01\x11\x06"}, - {"runtime/metrics", "\xbe\x01H-\""}, - {"runtime/pprof", "\x02\x01\x01\x03\x06`\a\x03$$\x0f\v!\f \r\b\x01\x01\x01\x02\x02\n\x03\x06"}, - {"runtime/race", "\xb9\x02"}, + {"regexp", "\x03\x82\x02\x037\t\x02\x01\x02\x11\x02"}, + {"regexp/syntax", "\xc8\x02\x01\x01\x01\x02\x11\x02"}, + {"runtime", "\xa4\x01\x04\x01\x03\f\x06\b\x02\x01\x01\x0f\x03\x01\x01\x01\x02\x01\x01\x01\x02\x01\x04\x01\x10\x18N"}, + {"runtime/coverage", "\xb0\x01U"}, + {"runtime/debug", "\x81\x01V\\\r\b\x02\x01\x11\x06"}, + {"runtime/metrics", "\xc8\x01I/\""}, + {"runtime/pprof", "\x02\x01\x01\x03\x06c\x0e\x03#5\v!\f\"\r\b\x01\x01\x01\x02\x02\n\x03\x06"}, + {"runtime/race", "\xc6\x02"}, {"runtime/race/internal/amd64v1", ""}, - {"runtime/trace", "\rg\x03z\t9\b\x05\x01\x0e\x06"}, - {"slices", "\x04\xf9\x01\fL"}, - {"sort", "\xd0\x0192"}, - {"strconv", "t+A\x01r"}, - {"strings", "t'\x04B\x19\x03\f7\x11\x02\x02"}, + {"runtime/trace", "\rq\x03{\t;\b\x05\x01\x0e\x06"}, + {"slices", "\x04\x84\x02\fN"}, + {"sort", "\xdb\x0194"}, + {"strconv", "~*C\x01t"}, + {"strings", "~&\x04D\x19\x03\f9\x11\x02\x02"}, {"structs", ""}, - {"sync", "\xcf\x01\x13\x01P\x0e\x14"}, - {"sync/atomic", "\xd5\x02"}, - {"syscall", "t(\x03\x01\x1c\n\x03\x06\r\x04S\b\x05\x01\x14"}, - {"testing", "\x03\ng\x02\x01X\x17\x14\f\x05\x1b\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\x0e\x02\x04"}, - {"testing/cryptotest", "QOZ\x124\x03\x12"}, - {"testing/fstest", "t\x03\x83\x01\x01\n&\x10\x03\t\b"}, - {"testing/internal/testdeps", "\x02\v\xae\x01/\x10,\x03\x05\x03\x06\a\x02\x0f"}, - {"testing/iotest", "\x03q\x03\x83\x01\x04"}, - {"testing/quick", "v\x01\x8f\x01\x05#\x10\x11"}, - {"testing/slogtest", "\rg\x03\x89\x01.\x05\x10\f"}, - {"testing/synctest", "\xe3\x01`\x12"}, - {"text/scanner", "\x03t\x83\x01,+\x02"}, - {"text/tabwriter", "w\x83\x01Y"}, - {"text/template", "t\x03C@\x01\n \x01\x05\x01\x02\x05\v\x02\x0e\x03\x02"}, - {"text/template/parse", "\x03t\xbc\x01\n\x01\x13\x02"}, - {"time", "t+\x1e$(*\r\x02\x13"}, - {"time/tzdata", "t\xce\x01\x13"}, + {"sync", "\xda\x01\x02\x11\x01R\x0e\x14"}, + {"sync/atomic", "\xe2\x02"}, + {"syscall", "~'\x03\x01\x1d\n\x04\x06\r\x04U\b\x05\x01\x14"}, + {"testing", "\x03\nq\x02\x01Y\x17\x14\f\x05\x1d\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\x0e\x02\x04"}, + {"testing/cryptotest", "SV\\\x126\x03\x12"}, + {"testing/fstest", "~\x03\x84\x01\x01\n(\x10\x03\t\b"}, + {"testing/internal/testdeps", "\x02\v\xb7\x011\x10.\x03\x05\x03\x06\a\x02\x0f"}, + {"testing/iotest", "\x03{\x03\x84\x01\x04"}, + {"testing/quick", "\x80\x01\x01\x90\x01\x05%\x10\x11"}, + {"testing/slogtest", "\rq\x03\x8a\x010\x05\x10\f"}, + {"testing/synctest", "\xee\x01b\f\x06"}, + {"text/scanner", "\x03~\x84\x01.+\x02"}, + {"text/tabwriter", "\x81\x01\x84\x01["}, + {"text/template", "~\x03BB\x01\n\"\x01\x05\x01\x02\x05\v\x02\x0e\x03\x02"}, + {"text/template/parse", "\x03~\xbf\x01\n\x01\x13\x02"}, + {"time", "~*D(,\r\x02\x13"}, + {"time/tzdata", "~\xd1\x01\x13"}, {"unicode", ""}, {"unicode/utf16", ""}, {"unicode/utf8", ""}, - {"unique", "\x9b\x01!%\x01Q\r\x01\x14\x12"}, + {"unique", "\xa4\x01\"&\x01S\r\x01\x14\x19"}, {"unsafe", ""}, - {"vendor/golang.org/x/crypto/chacha20", "\x10]\a\x95\x01*'"}, - {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10\aV\a\xe2\x01\x04\x01\a"}, - {"vendor/golang.org/x/crypto/cryptobyte", "j\n\x03\x90\x01'!\n"}, + {"uuid", "\x03\x01O\x1d\x03\v\xcf\x01\x0f"}, + {"vendor/golang.org/x/crypto/chacha20", "\x10`\x0e\x96\x01,)"}, + {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10\aY\x0e\xe6\x01\x05\x01\f"}, + {"vendor/golang.org/x/crypto/cryptobyte", "m\x11\x03\x91\x01)!\v"}, {"vendor/golang.org/x/crypto/cryptobyte/asn1", ""}, - {"vendor/golang.org/x/crypto/internal/alias", "\xd5\x02"}, - {"vendor/golang.org/x/crypto/internal/poly1305", "X\x15\x9c\x01"}, - {"vendor/golang.org/x/net/dns/dnsmessage", "t\xc7\x01"}, - {"vendor/golang.org/x/net/http/httpguts", "\x90\x02\x14\x1a\x15\r"}, - {"vendor/golang.org/x/net/http/httpproxy", "t\x03\x99\x01\x10\x05\x01\x18\x15\r"}, - {"vendor/golang.org/x/net/http2/hpack", "\x03q\x03\x83\x01F"}, - {"vendor/golang.org/x/net/idna", "w\x8f\x018\x15\x10\x02\x01"}, - {"vendor/golang.org/x/net/nettest", "\x03j\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\f"}, - {"vendor/golang.org/x/sys/cpu", "\xa6\x02\r\n\x01\x17"}, - {"vendor/golang.org/x/text/secure/bidirule", "t\xdf\x01\x11\x01"}, - {"vendor/golang.org/x/text/transform", "\x03q\x86\x01Y"}, - {"vendor/golang.org/x/text/unicode/bidi", "\x03\bl\x87\x01>\x17"}, - {"vendor/golang.org/x/text/unicode/norm", "m\n\x83\x01F\x13\x11"}, - {"weak", "\x9b\x01\x98\x01\""}, + {"vendor/golang.org/x/crypto/hkdf", "\x18\x01e\x15r"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xe2\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "Z\x16\xa4\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "~\xca\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x9b\x02\x16\x1a\x15\x10"}, + {"vendor/golang.org/x/net/http/httpproxy", "~\x03\x9a\x01\x12\x05\x01\x18\x15\x10"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03{\x03\x84\x01H"}, + {"vendor/golang.org/x/net/http3", "\x9c\x02@\x06\x0f\x04"}, + {"vendor/golang.org/x/net/idna", "\x81\x01\x90\x01:\x13\x02\x17\x02\x01"}, + {"vendor/golang.org/x/net/internal/http3", "\rN#\x03\x84\x01\v\x04\a\x01\x05\x10\x01\x16\x02\x01\x02\x0f\x10\x02\x04\x03"}, + {"vendor/golang.org/x/net/internal/httpcommon", "\rq\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"}, + {"vendor/golang.org/x/net/internal/quic/quicwire", "p"}, + {"vendor/golang.org/x/net/nettest", "\x03m\x0e\x03\x84\x01\x11\x05\x18\x01\f\n\x01\x02\x02\x01\f"}, + {"vendor/golang.org/x/net/quic", "\x03\n\x01\x01\x01\t:\x04\x04\x15\x03\v\x03\x12r\x06\x06\x06\x04\x12\x06\x15\x02\x01\x02\x01\x01\r\x06\x02\x01\x01\x02\v"}, + {"vendor/golang.org/x/sys/cpu", "\xb3\x02\r\n\x01\x17"}, + {"vendor/golang.org/x/text/secure/bidirule", "~\xe2\x01\x18\x01"}, + {"vendor/golang.org/x/text/transform", "\x03{\x87\x01["}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bv\x88\x01@\x17"}, + {"vendor/golang.org/x/text/unicode/norm", "p\x11\x84\x01H\x13\x18"}, + {"weak", "\xa4\x01\x9c\x01\""}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. @@ -408,6 +428,7 @@ var bootstrap = map[string]bool{ "cmd/compile/internal/logopt": true, "cmd/compile/internal/loong64": true, "cmd/compile/internal/loopvar": true, + "cmd/compile/internal/midway": true, "cmd/compile/internal/mips": true, "cmd/compile/internal/mips64": true, "cmd/compile/internal/noder": true, @@ -512,6 +533,7 @@ var bootstrap = map[string]bool{ "internal/race": true, "internal/runtime/gc": true, "internal/saferio": true, + "internal/strconv": true, "internal/syscall/unix": true, "internal/types/errors": true, "internal/unsafeheader": true, diff --git a/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go index 33e4f505f..2180c296e 100644 --- a/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -270,6 +270,7 @@ var PackageSymbols = map[string][]Symbol{ {"ContainsRune", Func, 7, "func(b []byte, r rune) bool"}, {"Count", Func, 0, "func(s []byte, sep []byte) int"}, {"Cut", Func, 18, "func(s []byte, sep []byte) (before []byte, after []byte, found bool)"}, + {"CutLast", Func, 27, "func(s []byte, sep []byte) (before []byte, after []byte, found bool)"}, {"CutPrefix", Func, 20, "func(s []byte, prefix []byte) (after []byte, found bool)"}, {"CutSuffix", Func, 20, "func(s []byte, suffix []byte) (before []byte, found bool)"}, {"Equal", Func, 0, "func(a []byte, b []byte) bool"}, @@ -538,6 +539,7 @@ var PackageSymbols = map[string][]Symbol{ {"MD4", Const, 0, ""}, {"MD5", Const, 0, ""}, {"MD5SHA1", Const, 0, ""}, + {"MLDSAMu", Const, 27, ""}, {"MessageSigner", Type, 25, ""}, {"PrivateKey", Type, 0, ""}, {"PublicKey", Type, 2, ""}, @@ -812,6 +814,40 @@ var PackageSymbols = map[string][]Symbol{ {"Size", Const, 0, ""}, {"Sum", Func, 2, "func(data []byte) [16]byte"}, }, + "crypto/mldsa": { + {"(*Options).HashFunc", Method, 27, ""}, + {"(*PrivateKey).Bytes", Method, 27, ""}, + {"(*PrivateKey).Equal", Method, 27, ""}, + {"(*PrivateKey).Public", Method, 27, ""}, + {"(*PrivateKey).PublicKey", Method, 27, ""}, + {"(*PrivateKey).Sign", Method, 27, ""}, + {"(*PrivateKey).SignDeterministic", Method, 27, ""}, + {"(*PublicKey).Bytes", Method, 27, ""}, + {"(*PublicKey).Equal", Method, 27, ""}, + {"(*PublicKey).Parameters", Method, 27, ""}, + {"(Parameters).PublicKeySize", Method, 27, ""}, + {"(Parameters).SignatureSize", Method, 27, ""}, + {"(Parameters).String", Method, 27, ""}, + {"GenerateKey", Func, 27, "func(params Parameters) (*PrivateKey, error)"}, + {"MLDSA44", Func, 27, "func() Parameters"}, + {"MLDSA44PublicKeySize", Const, 27, ""}, + {"MLDSA44SignatureSize", Const, 27, ""}, + {"MLDSA65", Func, 27, "func() Parameters"}, + {"MLDSA65PublicKeySize", Const, 27, ""}, + {"MLDSA65SignatureSize", Const, 27, ""}, + {"MLDSA87", Func, 27, "func() Parameters"}, + {"MLDSA87PublicKeySize", Const, 27, ""}, + {"MLDSA87SignatureSize", Const, 27, ""}, + {"NewPrivateKey", Func, 27, "func(params Parameters, seed []byte) (*PrivateKey, error)"}, + {"NewPublicKey", Func, 27, "func(params Parameters, encoding []byte) (*PublicKey, error)"}, + {"Options", Type, 27, ""}, + {"Options.Context", Field, 27, ""}, + {"Parameters", Type, 27, ""}, + {"PrivateKey", Type, 27, ""}, + {"PrivateKeySize", Const, 27, ""}, + {"PublicKey", Type, 27, ""}, + {"Verify", Func, 27, "func(pk *PublicKey, message []byte, signature []byte, opts *Options) error"}, + }, "crypto/mlkem": { {"(*DecapsulationKey1024).Bytes", Method, 24, ""}, {"(*DecapsulationKey1024).Decapsulate", Method, 24, ""}, @@ -1120,6 +1156,7 @@ var PackageSymbols = map[string][]Symbol{ {"ConnectionState.ECHAccepted", Field, 23, ""}, {"ConnectionState.HandshakeComplete", Field, 0, ""}, {"ConnectionState.HelloRetryRequest", Field, 26, ""}, + {"ConnectionState.LocalCertificate", Field, 27, ""}, {"ConnectionState.NegotiatedProtocol", Field, 0, ""}, {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0, ""}, {"ConnectionState.OCSPResponse", Field, 5, ""}, @@ -1152,6 +1189,10 @@ var PackageSymbols = map[string][]Symbol{ {"InsecureCipherSuites", Func, 14, "func() []*CipherSuite"}, {"Listen", Func, 0, "func(network string, laddr string, config *Config) (net.Listener, error)"}, {"LoadX509KeyPair", Func, 0, "func(certFile string, keyFile string) (Certificate, error)"}, + {"MLDSA44", Const, 27, ""}, + {"MLDSA65", Const, 27, ""}, + {"MLDSA87", Const, 27, ""}, + {"MLKEM1024", Const, 27, ""}, {"NewLRUClientSessionCache", Func, 3, "func(capacity int) ClientSessionCache"}, {"NewListener", Func, 0, "func(inner net.Listener, config *Config) net.Listener"}, {"NewResumptionState", Func, 21, "func(ticket []byte, state *SessionState) (*ClientSessionState, error)"}, @@ -1166,6 +1207,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParseSessionState", Func, 21, "func(data []byte) (*SessionState, error)"}, {"QUICClient", Func, 21, "func(config *QUICConfig) *QUICConn"}, {"QUICConfig", Type, 21, ""}, + {"QUICConfig.ClientHelloInfoConn", Field, 27, ""}, {"QUICConfig.EnableSessionEvents", Field, 23, ""}, {"QUICConfig.TLSConfig", Field, 21, ""}, {"QUICConn", Type, 21, ""}, @@ -1334,6 +1376,7 @@ var PackageSymbols = map[string][]Symbol{ {"Certificate.PublicKeyAlgorithm", Field, 0, ""}, {"Certificate.Raw", Field, 0, ""}, {"Certificate.RawIssuer", Field, 0, ""}, + {"Certificate.RawSignatureAlgorithm", Field, 27, ""}, {"Certificate.RawSubject", Field, 0, ""}, {"Certificate.RawSubjectPublicKeyInfo", Field, 0, ""}, {"Certificate.RawTBSCertificate", Field, 0, ""}, @@ -1362,6 +1405,7 @@ var PackageSymbols = map[string][]Symbol{ {"CertificateRequest.PublicKey", Field, 3, ""}, {"CertificateRequest.PublicKeyAlgorithm", Field, 3, ""}, {"CertificateRequest.Raw", Field, 3, ""}, + {"CertificateRequest.RawSignatureAlgorithm", Field, 27, ""}, {"CertificateRequest.RawSubject", Field, 3, ""}, {"CertificateRequest.RawSubjectPublicKeyInfo", Field, 3, ""}, {"CertificateRequest.RawTBSCertificateRequest", Field, 3, ""}, @@ -1422,6 +1466,10 @@ var PackageSymbols = map[string][]Symbol{ {"KeyUsageKeyEncipherment", Const, 0, ""}, {"MD2WithRSA", Const, 0, ""}, {"MD5WithRSA", Const, 0, ""}, + {"MLDSA", Const, 27, ""}, + {"MLDSA44", Const, 27, ""}, + {"MLDSA65", Const, 27, ""}, + {"MLDSA87", Const, 27, ""}, {"MarshalECPrivateKey", Func, 2, "func(key *ecdsa.PrivateKey) ([]byte, error)"}, {"MarshalPKCS1PrivateKey", Func, 0, "func(key *rsa.PrivateKey) []byte"}, {"MarshalPKCS1PublicKey", Func, 10, "func(key *rsa.PublicKey) []byte"}, @@ -1468,6 +1516,7 @@ var PackageSymbols = map[string][]Symbol{ {"RevocationList.Number", Field, 15, ""}, {"RevocationList.Raw", Field, 19, ""}, {"RevocationList.RawIssuer", Field, 19, ""}, + {"RevocationList.RawSignatureAlgorithm", Field, 27, ""}, {"RevocationList.RawTBSRevocationList", Field, 19, ""}, {"RevocationList.RevokedCertificateEntries", Field, 21, ""}, {"RevocationList.RevokedCertificates", Field, 15, ""}, @@ -1648,6 +1697,7 @@ var PackageSymbols = map[string][]Symbol{ {"(Scanner).Scan", Method, 0, ""}, {"ColumnType", Type, 8, ""}, {"Conn", Type, 9, ""}, + {"ConvertAssign", Func, 27, "func(scanCtx driver.ScanContext, dest any, src driver.Value) error"}, {"DB", Type, 0, ""}, {"DBStats", Type, 5, ""}, {"DBStats.Idle", Field, 11, ""}, @@ -1744,6 +1794,11 @@ var PackageSymbols = map[string][]Symbol{ {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, + {"(RowsColumnScanner).Close", Method, 27, ""}, + {"(RowsColumnScanner).Columns", Method, 27, ""}, + {"(RowsColumnScanner).Next", Method, 27, ""}, + {"(RowsColumnScanner).NextRow", Method, 27, ""}, + {"(RowsColumnScanner).ScanColumn", Method, 27, ""}, {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, @@ -1815,12 +1870,14 @@ var PackageSymbols = map[string][]Symbol{ {"ResultNoRows", Var, 0, ""}, {"Rows", Type, 0, ""}, {"RowsAffected", Type, 0, ""}, + {"RowsColumnScanner", Type, 27, ""}, {"RowsColumnTypeDatabaseTypeName", Type, 8, ""}, {"RowsColumnTypeLength", Type, 8, ""}, {"RowsColumnTypeNullable", Type, 8, ""}, {"RowsColumnTypePrecisionScale", Type, 8, ""}, {"RowsColumnTypeScanType", Type, 8, ""}, {"RowsNextResultSet", Type, 8, ""}, + {"ScanContext", Type, 27, ""}, {"SessionResetter", Type, 10, ""}, {"Stmt", Type, 0, ""}, {"StmtExecContext", Type, 8, ""}, @@ -5038,24 +5095,32 @@ var PackageSymbols = map[string][]Symbol{ {"(*InvalidUnmarshalError).Error", Method, 0, ""}, {"(*MarshalerError).Error", Method, 0, ""}, {"(*MarshalerError).Unwrap", Method, 13, ""}, + {"(*Number).UnmarshalJSONFrom", Method, 27, ""}, {"(*RawMessage).MarshalJSON", Method, 0, ""}, {"(*RawMessage).UnmarshalJSON", Method, 0, ""}, {"(*SyntaxError).Error", Method, 0, ""}, {"(*UnmarshalFieldError).Error", Method, 0, ""}, {"(*UnmarshalTypeError).Error", Method, 0, ""}, + {"(*UnmarshalTypeError).Unwrap", Method, 27, ""}, {"(*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).MarshalJSONTo", Method, 27, ""}, {"(Number).String", Method, 1, ""}, {"(RawMessage).MarshalJSON", Method, 8, ""}, {"(Unmarshaler).UnmarshalJSON", Method, 0, ""}, + {"CallMethodsWithLegacySemantics", Func, 27, "func(v bool) Options"}, {"Compact", Func, 0, "func(dst *bytes.Buffer, src []byte) error"}, {"Decoder", Type, 0, ""}, + {"DefaultOptionsV1", Func, 27, "func() Options"}, {"Delim", Type, 5, ""}, {"Encoder", Type, 0, ""}, + {"FormatByteArrayAsArray", Func, 27, "func(v bool) Options"}, + {"FormatBytesWithLegacySemantics", Func, 27, "func(v bool) Options"}, + {"FormatDurationAsNano", Func, 27, "func(v bool) Options"}, {"HTMLEscape", Func, 0, "func(dst *bytes.Buffer, src []byte)"}, {"Indent", Func, 0, "func(dst *bytes.Buffer, src []byte, prefix string, indent string) error"}, {"InvalidUTF8Error", Type, 0, ""}, @@ -5068,19 +5133,29 @@ var PackageSymbols = map[string][]Symbol{ {"MarshalerError", Type, 0, ""}, {"MarshalerError.Err", Field, 0, ""}, {"MarshalerError.Type", Field, 0, ""}, + {"MatchCaseSensitiveDelimiter", Func, 27, "func(v bool) Options"}, + {"MergeWithLegacySemantics", Func, 27, "func(v bool) Options"}, {"NewDecoder", Func, 0, "func(r io.Reader) *Decoder"}, {"NewEncoder", Func, 0, "func(w io.Writer) *Encoder"}, {"Number", Type, 1, ""}, + {"OmitEmptyWithLegacySemantics", Func, 27, "func(v bool) Options"}, + {"Options", Type, 27, ""}, + {"ParseBytesWithLooseRFC4648", Func, 27, "func(v bool) Options"}, + {"ParseTimeWithLooseRFC3339", Func, 27, "func(v bool) Options"}, {"RawMessage", Type, 0, ""}, + {"ReportErrorsWithLegacySemantics", Func, 27, "func(v bool) Options"}, + {"StringifyWithLegacySemantics", Func, 27, "func(v bool) Options"}, {"SyntaxError", Type, 0, ""}, {"SyntaxError.Offset", Field, 0, ""}, {"Token", Type, 5, ""}, {"Unmarshal", Func, 0, "func(data []byte, v any) error"}, + {"UnmarshalArrayFromAnyLength", Func, 27, "func(v bool) Options"}, {"UnmarshalFieldError", Type, 0, ""}, {"UnmarshalFieldError.Field", Field, 0, ""}, {"UnmarshalFieldError.Key", Field, 0, ""}, {"UnmarshalFieldError.Type", Field, 0, ""}, {"UnmarshalTypeError", Type, 0, ""}, + {"UnmarshalTypeError.Err", Field, 27, ""}, {"UnmarshalTypeError.Field", Field, 8, ""}, {"UnmarshalTypeError.Offset", Field, 5, ""}, {"UnmarshalTypeError.Struct", Field, 8, ""}, @@ -5094,6 +5169,158 @@ var PackageSymbols = map[string][]Symbol{ {"UnsupportedValueError.Value", Field, 0, ""}, {"Valid", Func, 9, "func(data []byte) bool"}, }, + "encoding/json/jsontext": { + {"(*Decoder).InputOffset", Method, 27, ""}, + {"(*Decoder).Options", Method, 27, ""}, + {"(*Decoder).PeekKind", Method, 27, ""}, + {"(*Decoder).ReadToken", Method, 27, ""}, + {"(*Decoder).ReadValue", Method, 27, ""}, + {"(*Decoder).Reset", Method, 27, ""}, + {"(*Decoder).SkipValue", Method, 27, ""}, + {"(*Decoder).StackDepth", Method, 27, ""}, + {"(*Decoder).StackIndex", Method, 27, ""}, + {"(*Decoder).StackPointer", Method, 27, ""}, + {"(*Decoder).UnreadBuffer", Method, 27, ""}, + {"(*Encoder).AvailableBuffer", Method, 27, ""}, + {"(*Encoder).Options", Method, 27, ""}, + {"(*Encoder).OutputOffset", Method, 27, ""}, + {"(*Encoder).Reset", Method, 27, ""}, + {"(*Encoder).StackDepth", Method, 27, ""}, + {"(*Encoder).StackIndex", Method, 27, ""}, + {"(*Encoder).StackPointer", Method, 27, ""}, + {"(*Encoder).WriteToken", Method, 27, ""}, + {"(*Encoder).WriteValue", Method, 27, ""}, + {"(*SyntacticError).Error", Method, 27, ""}, + {"(*SyntacticError).Unwrap", Method, 27, ""}, + {"(*Value).Canonicalize", Method, 27, ""}, + {"(*Value).Compact", Method, 27, ""}, + {"(*Value).Format", Method, 27, ""}, + {"(*Value).Indent", Method, 27, ""}, + {"(*Value).UnmarshalJSON", Method, 27, ""}, + {"(Kind).String", Method, 27, ""}, + {"(Pointer).AppendToken", Method, 27, ""}, + {"(Pointer).Contains", Method, 27, ""}, + {"(Pointer).IsValid", Method, 27, ""}, + {"(Pointer).LastToken", Method, 27, ""}, + {"(Pointer).Parent", Method, 27, ""}, + {"(Pointer).Tokens", Method, 27, ""}, + {"(Token).Bool", Method, 27, ""}, + {"(Token).Clone", Method, 27, ""}, + {"(Token).Float", Method, 27, ""}, + {"(Token).Float32", Method, 27, ""}, + {"(Token).Int", Method, 27, ""}, + {"(Token).Kind", Method, 27, ""}, + {"(Token).String", Method, 27, ""}, + {"(Token).Uint", Method, 27, ""}, + {"(Value).Clone", Method, 27, ""}, + {"(Value).IsValid", Method, 27, ""}, + {"(Value).Kind", Method, 27, ""}, + {"(Value).MarshalJSON", Method, 27, ""}, + {"(Value).String", Method, 27, ""}, + {"AllowDuplicateNames", Func, 27, "func(v bool) Options"}, + {"AllowInvalidUTF8", Func, 27, "func(v bool) Options"}, + {"AppendFloat", Func, 27, "func(dst []byte, src float64, bits int) []byte"}, + {"AppendFormat", Func, 27, "func[Bytes ~[]byte | ~string](dst []byte, src Bytes, opts ...Options) ([]byte, error)"}, + {"AppendQuote", Func, 27, "func[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error)"}, + {"AppendUnquote", Func, 27, "func[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error)"}, + {"BeginArray", Var, 27, ""}, + {"BeginObject", Var, 27, ""}, + {"Bool", Func, 27, "func(b bool) Token"}, + {"CanonicalizeRawFloats", Func, 27, "func(v bool) Options"}, + {"CanonicalizeRawInts", Func, 27, "func(v bool) Options"}, + {"Decoder", Type, 27, ""}, + {"Encoder", Type, 27, ""}, + {"EndArray", Var, 27, ""}, + {"EndObject", Var, 27, ""}, + {"ErrDuplicateName", Var, 27, ""}, + {"ErrNonStringName", Var, 27, ""}, + {"EscapeForHTML", Func, 27, "func(v bool) Options"}, + {"EscapeForJS", Func, 27, "func(v bool) Options"}, + {"False", Var, 27, ""}, + {"Float", Func, 27, "func(n float64) Token"}, + {"Float32", Func, 27, "func(n float32) Token"}, + {"Int", Func, 27, "func(n int64) Token"}, + {"Internal", Var, 27, ""}, + {"Kind", Type, 27, ""}, + {"KindBeginArray", Const, 27, ""}, + {"KindBeginObject", Const, 27, ""}, + {"KindEndArray", Const, 27, ""}, + {"KindEndObject", Const, 27, ""}, + {"KindFalse", Const, 27, ""}, + {"KindInvalid", Const, 27, ""}, + {"KindNull", Const, 27, ""}, + {"KindNumber", Const, 27, ""}, + {"KindString", Const, 27, ""}, + {"KindTrue", Const, 27, ""}, + {"Multiline", Func, 27, "func(v bool) Options"}, + {"NewDecoder", Func, 27, "func(r io.Reader, opts ...Options) *Decoder"}, + {"NewEncoder", Func, 27, "func(w io.Writer, opts ...Options) *Encoder"}, + {"Null", Var, 27, ""}, + {"Options", Type, 27, ""}, + {"Pointer", Type, 27, ""}, + {"PreserveRawStrings", Func, 27, "func(v bool) Options"}, + {"ReorderRawObjects", Func, 27, "func(v bool) Options"}, + {"SpaceAfterColon", Func, 27, "func(v bool) Options"}, + {"SpaceAfterComma", Func, 27, "func(v bool) Options"}, + {"String", Func, 27, "func(s string) Token"}, + {"SyntacticError", Type, 27, ""}, + {"SyntacticError.ByteOffset", Field, 27, ""}, + {"SyntacticError.Err", Field, 27, ""}, + {"SyntacticError.JSONPointer", Field, 27, ""}, + {"Token", Type, 27, ""}, + {"True", Var, 27, ""}, + {"Uint", Func, 27, "func(n uint64) Token"}, + {"Value", Type, 27, ""}, + {"WithIndent", Func, 27, "func(indent string) Options"}, + {"WithIndentPrefix", Func, 27, "func(prefix string) Options"}, + }, + "encoding/json/v2": { + {"(*SemanticError).Error", Method, 27, ""}, + {"(*SemanticError).Unwrap", Method, 27, ""}, + {"(Marshaler).MarshalJSON", Method, 27, ""}, + {"(MarshalerTo).MarshalJSONTo", Method, 27, ""}, + {"(Unmarshaler).UnmarshalJSON", Method, 27, ""}, + {"(UnmarshalerFrom).UnmarshalJSONFrom", Method, 27, ""}, + {"DefaultOptionsV2", Func, 27, "func() Options"}, + {"Deterministic", Func, 27, "func(v bool) Options"}, + {"ErrUnknownName", Var, 27, ""}, + {"FormatNilMapAsNull", Func, 27, "func(v bool) Options"}, + {"FormatNilSliceAsNull", Func, 27, "func(v bool) Options"}, + {"GetOption", Func, 27, "func[T any](opts Options, setter func(T) Options) (T, bool)"}, + {"JoinMarshalers", Func, 27, "func(ms ...*Marshalers) *Marshalers"}, + {"JoinOptions", Func, 27, "func(srcs ...Options) Options"}, + {"JoinUnmarshalers", Func, 27, "func(us ...*Unmarshalers) *Unmarshalers"}, + {"Marshal", Func, 27, "func(in any, opts ...Options) (out []byte, err error)"}, + {"MarshalEncode", Func, 27, "func(out *jsontext.Encoder, in any, opts ...Options) (err error)"}, + {"MarshalFunc", Func, 27, "func[T any](fn func(T) ([]byte, error)) *Marshalers"}, + {"MarshalToFunc", Func, 27, "func[T any](fn func(*jsontext.Encoder, T) error) *Marshalers"}, + {"MarshalWrite", Func, 27, "func(out io.Writer, in any, opts ...Options) (err error)"}, + {"Marshaler", Type, 27, ""}, + {"MarshalerTo", Type, 27, ""}, + {"Marshalers", Type, 27, ""}, + {"MatchCaseInsensitiveNames", Func, 27, "func(v bool) Options"}, + {"OmitZeroStructFields", Func, 27, "func(v bool) Options"}, + {"Options", Type, 27, ""}, + {"RejectUnknownMembers", Func, 27, "func(v bool) Options"}, + {"SemanticError", Type, 27, ""}, + {"SemanticError.ByteOffset", Field, 27, ""}, + {"SemanticError.Err", Field, 27, ""}, + {"SemanticError.GoType", Field, 27, ""}, + {"SemanticError.JSONKind", Field, 27, ""}, + {"SemanticError.JSONPointer", Field, 27, ""}, + {"SemanticError.JSONValue", Field, 27, ""}, + {"StringifyNumbers", Func, 27, "func(v bool) Options"}, + {"Unmarshal", Func, 27, "func(in []byte, out any, opts ...Options) (err error)"}, + {"UnmarshalDecode", Func, 27, "func(in *jsontext.Decoder, out any, opts ...Options) (err error)"}, + {"UnmarshalFromFunc", Func, 27, "func[T any](fn func(*jsontext.Decoder, T) error) *Unmarshalers"}, + {"UnmarshalFunc", Func, 27, "func[T any](fn func([]byte, T) error) *Unmarshalers"}, + {"UnmarshalRead", Func, 27, "func(in io.Reader, out any, opts ...Options) (err error)"}, + {"Unmarshaler", Type, 27, ""}, + {"UnmarshalerFrom", Type, 27, ""}, + {"Unmarshalers", Type, 27, ""}, + {"WithMarshalers", Func, 27, "func(v *Marshalers) Options"}, + {"WithUnmarshalers", Func, 27, "func(v *Unmarshalers) Options"}, + }, "encoding/pem": { {"Block", Type, 0, ""}, {"Block.Bytes", Field, 0, ""}, @@ -6002,6 +6229,7 @@ var PackageSymbols = map[string][]Symbol{ {"Shift", Func, 5, "func(x Value, op token.Token, s uint) Value"}, {"Sign", Func, 5, "func(x Value) int"}, {"String", Const, 5, ""}, + {"StringLen", Func, 27, "func(x Value) int64"}, {"StringVal", Func, 5, "func(x Value) string"}, {"ToComplex", Func, 6, "func(x Value) Value"}, {"ToFloat", Func, 6, "func(x Value) Value"}, @@ -6183,6 +6411,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*ErrorList).Add", Method, 0, ""}, {"(*ErrorList).RemoveMultiples", Method, 0, ""}, {"(*ErrorList).Reset", Method, 0, ""}, + {"(*Scanner).End", Method, 27, ""}, {"(*Scanner).Init", Method, 0, ""}, {"(*Scanner).Scan", Method, 0, ""}, {"(Error).Error", Method, 0, ""}, @@ -6222,6 +6451,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*File).SetLines", Method, 0, ""}, {"(*File).SetLinesForContent", Method, 0, ""}, {"(*File).Size", Method, 0, ""}, + {"(*File).String", Method, 27, ""}, {"(*FileSet).AddExistingFiles", Method, 25, ""}, {"(*FileSet).AddFile", Method, 0, ""}, {"(*FileSet).Base", Method, 0, ""}, @@ -6529,6 +6759,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Tuple).Variables", Method, 24, ""}, {"(*TypeList).At", Method, 18, ""}, {"(*TypeList).Len", Method, 18, ""}, + {"(*TypeList).String", Method, 27, ""}, {"(*TypeList).Types", Method, 24, ""}, {"(*TypeName).Exported", Method, 5, ""}, {"(*TypeName).Id", Method, 5, ""}, @@ -6547,6 +6778,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*TypeParam).Underlying", Method, 18, ""}, {"(*TypeParamList).At", Method, 18, ""}, {"(*TypeParamList).Len", Method, 18, ""}, + {"(*TypeParamList).String", Method, 27, ""}, {"(*TypeParamList).TypeParams", Method, 24, ""}, {"(*Union).Len", Method, 18, ""}, {"(*Union).String", Method, 18, ""}, @@ -6571,9 +6803,14 @@ var PackageSymbols = map[string][]Symbol{ {"(Checker).PkgNameOf", Method, 22, ""}, {"(Checker).TypeOf", Method, 5, ""}, {"(Error).Error", Method, 5, ""}, + {"(Hasher).Equal", Method, 27, ""}, + {"(Hasher).Hash", Method, 27, ""}, + {"(HasherIgnoreTags).Equal", Method, 27, ""}, + {"(HasherIgnoreTags).Hash", Method, 27, ""}, {"(Importer).Import", Method, 5, ""}, {"(ImporterFrom).Import", Method, 6, ""}, {"(ImporterFrom).ImportFrom", Method, 6, ""}, + {"(Instance).String", Method, 27, ""}, {"(Object).Exported", Method, 5, ""}, {"(Object).Id", Method, 5, ""}, {"(Object).Name", Method, 5, ""}, @@ -6643,6 +6880,8 @@ var PackageSymbols = map[string][]Symbol{ {"Float32", Const, 5, ""}, {"Float64", Const, 5, ""}, {"Func", Type, 5, ""}, + {"Hasher", Type, 27, ""}, + {"HasherIgnoreTags", Type, 27, ""}, {"Id", Func, 5, "func(pkg *Package, name string) string"}, {"Identical", Func, 5, "func(x Type, y Type) bool"}, {"IdenticalIgnoreTags", Func, 8, "func(x Type, y Type) bool"}, @@ -6877,9 +7116,13 @@ var PackageSymbols = map[string][]Symbol{ {"(*Hash).Write", Method, 14, ""}, {"(*Hash).WriteByte", Method, 14, ""}, {"(*Hash).WriteString", Method, 14, ""}, + {"(ComparableHasher).Equal", Method, 27, ""}, + {"(ComparableHasher).Hash", Method, 27, ""}, {"Bytes", Func, 19, "func(seed Seed, b []byte) uint64"}, {"Comparable", Func, 24, "func[T comparable](seed Seed, v T) uint64"}, + {"ComparableHasher", Type, 27, ""}, {"Hash", Type, 14, ""}, + {"Hasher", Type, 27, ""}, {"MakeSeed", Func, 14, "func() Seed"}, {"Seed", Type, 14, ""}, {"String", Func, 19, "func(seed Seed, s string) uint64"}, @@ -8035,6 +8278,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Int).CmpAbs", Method, 10, ""}, {"(*Int).Div", Method, 0, ""}, {"(*Int).DivMod", Method, 0, ""}, + {"(*Int).Divide", Method, 27, ""}, {"(*Int).Exp", Method, 0, ""}, {"(*Int).FillBytes", Method, 15, ""}, {"(*Int).Float64", Method, 21, ""}, @@ -8119,9 +8363,11 @@ var PackageSymbols = map[string][]Symbol{ {"Accuracy", Type, 5, ""}, {"AwayFromZero", Const, 5, ""}, {"Below", Const, 5, ""}, + {"Ceil", Const, 27, ""}, {"ErrNaN", Type, 5, ""}, {"Exact", Const, 5, ""}, {"Float", Type, 5, ""}, + {"Floor", Const, 27, ""}, {"Int", Type, 0, ""}, {"Jacobi", Func, 5, "func(x *Int, y *Int) int"}, {"MaxBase", Const, 0, ""}, @@ -8133,12 +8379,14 @@ var PackageSymbols = map[string][]Symbol{ {"NewRat", Func, 0, "func(a int64, b int64) *Rat"}, {"ParseFloat", Func, 5, "func(s string, base int, prec uint, mode RoundingMode) (f *Float, b int, err error)"}, {"Rat", Type, 0, ""}, + {"Round", Const, 27, ""}, {"RoundingMode", Type, 5, ""}, {"ToNearestAway", Const, 5, ""}, {"ToNearestEven", Const, 5, ""}, {"ToNegativeInf", Const, 5, ""}, {"ToPositiveInf", Const, 5, ""}, {"ToZero", Const, 5, ""}, + {"Trunc", Const, 27, ""}, {"Word", Type, 0, ""}, }, "math/bits": { @@ -8290,6 +8538,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).Int64", Method, 22, ""}, {"(*Rand).Int64N", Method, 22, ""}, {"(*Rand).IntN", Method, 22, ""}, + {"(*Rand).N", Method, 27, ""}, {"(*Rand).NormFloat64", Method, 22, ""}, {"(*Rand).Perm", Method, 22, ""}, {"(*Rand).Shuffle", Method, 22, ""}, @@ -8985,7 +9234,7 @@ var PackageSymbols = map[string][]Symbol{ {"NoBody", Var, 8, ""}, {"NotFound", Func, 0, "func(w ResponseWriter, r *Request)"}, {"NotFoundHandler", Func, 0, "func() Handler"}, - {"ParseCookie", Func, 23, "func(line string) ([]*Cookie, error)"}, + {"ParseCookie", Func, 23, "func(line string) (#rv1 []*Cookie, #rv2 error)"}, {"ParseHTTPVersion", Func, 0, "func(vers string) (major int, minor int, ok bool)"}, {"ParseSetCookie", Func, 23, "func(line string) (*Cookie, error)"}, {"ParseTime", Func, 1, "func(text string) (t time.Time, err error)"}, @@ -9061,6 +9310,7 @@ var PackageSymbols = map[string][]Symbol{ {"Server.BaseContext", Field, 13, ""}, {"Server.ConnContext", Field, 13, ""}, {"Server.ConnState", Field, 3, ""}, + {"Server.DisableClientPriority", Field, 27, ""}, {"Server.DisableGeneralOptionsHandler", Field, 20, ""}, {"Server.ErrorLog", Field, 3, ""}, {"Server.HTTP2", Field, 24, ""}, @@ -9226,6 +9476,7 @@ var PackageSymbols = map[string][]Symbol{ {"NewRequestWithContext", Func, 23, "func(ctx context.Context, method string, target string, body io.Reader) *http.Request"}, {"NewServer", Func, 0, "func(handler http.Handler) *Server"}, {"NewTLSServer", Func, 0, "func(handler http.Handler) *Server"}, + {"NewTestServer", Func, 27, "func(t testing.TB, handler http.Handler) *Server"}, {"NewUnstartedServer", Func, 0, "func(handler http.Handler) *Server"}, {"ResponseRecorder", Type, 0, ""}, {"ResponseRecorder.Body", Field, 0, ""}, @@ -9596,6 +9847,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Error).Timeout", Method, 6, ""}, {"(*Error).Unwrap", Method, 13, ""}, {"(*URL).AppendBinary", Method, 24, ""}, + {"(*URL).Clone", Method, 27, ""}, {"(*URL).EscapedFragment", Method, 15, ""}, {"(*URL).EscapedPath", Method, 5, ""}, {"(*URL).Hostname", Method, 8, ""}, @@ -9616,6 +9868,7 @@ var PackageSymbols = map[string][]Symbol{ {"(EscapeError).Error", Method, 0, ""}, {"(InvalidHostError).Error", Method, 6, ""}, {"(Values).Add", Method, 0, ""}, + {"(Values).Clone", Method, 27, ""}, {"(Values).Del", Method, 0, ""}, {"(Values).Encode", Method, 0, ""}, {"(Values).Get", Method, 0, ""}, @@ -10793,6 +11046,7 @@ var PackageSymbols = map[string][]Symbol{ {"ContainsRune", Func, 0, "func(s string, r rune) bool"}, {"Count", Func, 0, "func(s string, substr string) int"}, {"Cut", Func, 18, "func(s string, sep string) (before string, after string, found bool)"}, + {"CutLast", Func, 27, "func(s string, sep string) (before string, after string, found bool)"}, {"CutPrefix", Func, 20, "func(s string, prefix string) (after string, found bool)"}, {"CutSuffix", Func, 20, "func(s string, suffix string) (before string, found bool)"}, {"EqualFold", Func, 0, "func(s string, t string) bool"}, @@ -17476,6 +17730,7 @@ var PackageSymbols = map[string][]Symbol{ {"TestHandler", Func, 21, "func(h slog.Handler, results func() []map[string]any) error"}, }, "testing/synctest": { + {"Sleep", Func, 27, "func(d time.Duration)"}, {"Test", Func, 25, "func(t *testing.T, f func(*testing.T))"}, {"Wait", Func, 25, "func()"}, }, @@ -17980,6 +18235,7 @@ var PackageSymbols = map[string][]Symbol{ {"Bassa_Vah", Var, 4, ""}, {"Batak", Var, 0, ""}, {"Bengali", Var, 0, ""}, + {"Beria_Erfe", Var, 27, ""}, {"Bhaiksuki", Var, 7, ""}, {"Bidi_Control", Var, 0, ""}, {"Bopomofo", Var, 0, ""}, @@ -18029,6 +18285,7 @@ var PackageSymbols = map[string][]Symbol{ {"Extender", Var, 0, ""}, {"FoldCategory", Var, 0, ""}, {"FoldScript", Var, 0, ""}, + {"Garay", Var, 27, ""}, {"Georgian", Var, 0, ""}, {"Glagolitic", Var, 0, ""}, {"Gothic", Var, 0, ""}, @@ -18038,6 +18295,7 @@ var PackageSymbols = map[string][]Symbol{ {"Gujarati", Var, 0, ""}, {"Gunjala_Gondi", Var, 13, ""}, {"Gurmukhi", Var, 0, ""}, + {"Gurung_Khema", Var, 27, ""}, {"Han", Var, 0, ""}, {"Hangul", Var, 0, ""}, {"Hanifi_Rohingya", Var, 13, ""}, @@ -18049,6 +18307,9 @@ var PackageSymbols = map[string][]Symbol{ {"Hyphen", Var, 0, ""}, {"IDS_Binary_Operator", Var, 0, ""}, {"IDS_Trinary_Operator", Var, 0, ""}, + {"IDS_Unary_Operator", Var, 27, ""}, + {"ID_Compat_Math_Continue", Var, 27, ""}, + {"ID_Compat_Math_Start", Var, 27, ""}, {"Ideographic", Var, 0, ""}, {"Imperial_Aramaic", Var, 0, ""}, {"In", Func, 2, "func(r rune, ranges ...*RangeTable) bool"}, @@ -18082,6 +18343,7 @@ var PackageSymbols = map[string][]Symbol{ {"Khmer", Var, 0, ""}, {"Khojki", Var, 4, ""}, {"Khudawadi", Var, 4, ""}, + {"Kirat_Rai", Var, 27, ""}, {"L", Var, 0, ""}, {"LC", Var, 25, ""}, {"Lao", Var, 0, ""}, @@ -18125,6 +18387,7 @@ var PackageSymbols = map[string][]Symbol{ {"Miao", Var, 1, ""}, {"Mn", Var, 0, ""}, {"Modi", Var, 4, ""}, + {"Modifier_Combining_Mark", Var, 27, ""}, {"Mongolian", Var, 0, ""}, {"Mro", Var, 4, ""}, {"Multani", Var, 5, ""}, @@ -18145,6 +18408,7 @@ var PackageSymbols = map[string][]Symbol{ {"Nyiakeng_Puachue_Hmong", Var, 14, ""}, {"Ogham", Var, 0, ""}, {"Ol_Chiki", Var, 0, ""}, + {"Ol_Onal", Var, 27, ""}, {"Old_Hungarian", Var, 5, ""}, {"Old_Italic", Var, 0, ""}, {"Old_North_Arabian", Var, 4, ""}, @@ -18214,6 +18478,7 @@ var PackageSymbols = map[string][]Symbol{ {"Sharada", Var, 1, ""}, {"Shavian", Var, 0, ""}, {"Siddham", Var, 4, ""}, + {"Sidetic", Var, 27, ""}, {"SignWriting", Var, 5, ""}, {"SimpleFold", Func, 0, "func(r rune) rune"}, {"Sinhala", Var, 0, ""}, @@ -18227,6 +18492,7 @@ var PackageSymbols = map[string][]Symbol{ {"Space", Var, 0, ""}, {"SpecialCase", Type, 0, ""}, {"Sundanese", Var, 0, ""}, + {"Sunuwar", Var, 27, ""}, {"Syloti_Nagri", Var, 0, ""}, {"Symbol", Var, 0, ""}, {"Syriac", Var, 0, ""}, @@ -18235,6 +18501,7 @@ var PackageSymbols = map[string][]Symbol{ {"Tai_Le", Var, 0, ""}, {"Tai_Tham", Var, 0, ""}, {"Tai_Viet", Var, 0, ""}, + {"Tai_Yo", Var, 27, ""}, {"Takri", Var, 1, ""}, {"Tamil", Var, 0, ""}, {"Tangsa", Var, 21, ""}, @@ -18252,7 +18519,10 @@ var PackageSymbols = map[string][]Symbol{ {"ToLower", Func, 0, "func(r rune) rune"}, {"ToTitle", Func, 0, "func(r rune) rune"}, {"ToUpper", Func, 0, "func(r rune) rune"}, + {"Todhri", Var, 27, ""}, + {"Tolong_Siki", Var, 27, ""}, {"Toto", Var, 21, ""}, + {"Tulu_Tigalari", Var, 27, ""}, {"TurkishCase", Var, 0, ""}, {"Ugaritic", Var, 0, ""}, {"Unified_Ideograph", Var, 0, ""}, @@ -18320,6 +18590,21 @@ var PackageSymbols = map[string][]Symbol{ {"String", Func, 0, ""}, {"StringData", Func, 0, ""}, }, + "uuid": { + {"(*UUID).UnmarshalText", Method, 27, ""}, + {"(UUID).AppendText", Method, 27, ""}, + {"(UUID).Compare", Method, 27, ""}, + {"(UUID).MarshalText", Method, 27, ""}, + {"(UUID).String", Method, 27, ""}, + {"Max", Func, 27, "func() UUID"}, + {"MustParse", Func, 27, "func(s string) UUID"}, + {"New", Func, 27, "func() UUID"}, + {"NewV4", Func, 27, "func() UUID"}, + {"NewV7", Func, 27, "func() UUID"}, + {"Nil", Func, 27, "func() UUID"}, + {"Parse", Func, 27, "func(s string) (UUID, error)"}, + {"UUID", Type, 27, ""}, + }, "weak": { {"(Pointer).Value", Method, 24, ""}, {"Make", Func, 24, "func[T any](ptr *T) Pointer[T]"}, diff --git a/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go b/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go index d612a7102..706ad33ef 100644 --- a/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go +++ b/tools/vendor/golang.org/x/tools/internal/typesinternal/zerovalue.go @@ -259,13 +259,13 @@ func TypeExpr(t types.Type, qual types.Qualifier) ast.Expr { case *types.Signature: var params []*ast.Field for v := range t.Params().Variables() { + var names []*ast.Ident + if v.Name() != "" { + names = []*ast.Ident{ast.NewIdent(v.Name())} + } params = append(params, &ast.Field{ - Type: TypeExpr(v.Type(), qual), - Names: []*ast.Ident{ - { - Name: v.Name(), - }, - }, + Type: TypeExpr(v.Type(), qual), + Names: names, }) } if t.Variadic() { @@ -328,10 +328,10 @@ func TypeExpr(t types.Type, qual types.Qualifier) ast.Expr { return expr case *types.Struct: - return ast.NewIdent(t.String()) + return ast.NewIdent(types.TypeString(t, qual)) case *types.Interface: - return ast.NewIdent(t.String()) + return ast.NewIdent(types.TypeString(t, qual)) case *types.Union: if t.Len() == 0 { diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index f0171ce54..7097d027c 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -4,7 +4,7 @@ # 4d63.com/gochecknoglobals v0.2.2 ## explicit; go 1.18 4d63.com/gochecknoglobals/checknoglobals -# charm.land/lipgloss/v2 v2.0.4 +# charm.land/lipgloss/v2 v2.0.5 ## explicit; go 1.25.0 charm.land/lipgloss/v2 # codeberg.org/chavacava/garif v0.2.1 @@ -231,7 +231,7 @@ github.com/fatih/color # github.com/fatih/structtag v1.2.0 ## explicit; go 1.12 github.com/fatih/structtag -# github.com/firefart/nonamedreturns v1.0.7 +# github.com/firefart/nonamedreturns v1.0.8 ## explicit; go 1.25.0 github.com/firefart/nonamedreturns/analyzer # github.com/fsnotify/fsnotify v1.10.1 @@ -244,7 +244,7 @@ github.com/fzipp/gocyclo # github.com/ghostiam/protogetter v0.3.21 ## explicit; go 1.25.0 github.com/ghostiam/protogetter -# github.com/go-critic/go-critic v0.14.3 +# github.com/go-critic/go-critic v0.14.4 ## explicit; go 1.24.0 github.com/go-critic/go-critic/checkers github.com/go-critic/go-critic/checkers/internal/astwalk @@ -705,7 +705,7 @@ github.com/nunnatsa/ginkgolinter/internal/rules github.com/nunnatsa/ginkgolinter/internal/typecheck github.com/nunnatsa/ginkgolinter/linter github.com/nunnatsa/ginkgolinter/version -# github.com/pelletier/go-toml/v2 v2.4.2 +# github.com/pelletier/go-toml/v2 v2.4.3 ## explicit; go 1.21.0 github.com/pelletier/go-toml/v2 github.com/pelletier/go-toml/v2/internal/parserbridge @@ -994,7 +994,7 @@ golang.org/x/text/runes golang.org/x/text/transform golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/tools v0.46.0 +# golang.org/x/tools v0.47.0 ## explicit; go 1.25.0 golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/passes/appends @@ -1330,6 +1330,6 @@ mvdan.cc/gofumpt/internal/version # mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 ## explicit; go 1.24.0 mvdan.cc/unparam/check -# github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 -# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 -# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 +# github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.1 +# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.8 +# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.5 diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go index 420ba5303..70e7ed10f 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go @@ -15,4 +15,4 @@ package core // limitations under the License. // Version of the SDK -const __VERSION__ = "5.22.0" +const __VERSION__ = "5.22.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 46cb77c20..92732c3d1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.0" +const goModuleVersion = "1.42.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index 223ba3003..b4782971d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.7.14 (2026-07-01) + +* No change notes available for this release. + # v1.7.13 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index f1e8adeac..10135bbb3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.7.13" +const goModuleVersion = "1.7.14" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 291357a31..8df8986ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.32.28 (2026-07-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.27 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.26 (2026-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.32.25 (2026-06-10) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 8086d6dbc..7ec444d57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.32.25" +const goModuleVersion = "1.32.28" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 18b02dee8..ad8092eda 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.19.27 (2026-07-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.26 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.25 (2026-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.24 (2026-06-10) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 161da7f54..e5dd696d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.24" +const goModuleVersion = "1.19.27" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index a2f7103a9..ee157027e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.18.30 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.29 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 64d469b04..894583646 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.29" +const goModuleVersion = "1.18.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 26f507f8b..b7a7eb692 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.4.30 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.29 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 851fed2b3..10e18063f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.29" +const goModuleVersion = "1.4.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 508593b45..437a42a86 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.7.30 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.29 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 1c161a0a7..a3a825349 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.29" +const goModuleVersion = "2.7.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index 554f43b5e..26219e9a2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.4.31 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.30 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index 2703ec797..91d0e69b8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.30" +const goModuleVersion = "1.4.31" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index 2fb0269e7..33bb21035 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.13.13 (2026-07-01) + +* No change notes available for this release. + # v1.13.12 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index b769e8427..b02fbce7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.12" +const goModuleVersion = "1.13.13" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index 1b6e1fd07..acaa576aa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.9.23 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.9.22 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index f4054b7e8..aa8a9b64c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.9.22" +const goModuleVersion = "1.9.23" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 2a082b44f..a4aae9c2e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.13.30 (2026-07-01) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.29 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index 84b406a78..b8592ad86 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.29" +const goModuleVersion = "1.13.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index 2acbdd52e..d66379d86 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.19.31 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.30 (2026-06-29) + +* No change notes available for this release. + # v1.19.29 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index 303c37c76..ce36afa34 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.29" +const goModuleVersion = "1.19.31" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go index 0f43ec0d4..db470b27b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/s3100continue.go @@ -13,9 +13,9 @@ const default100ContinueThresholdBytes int64 = 1024 * 1024 * 2 // Add100Continue add middleware, which adds {Expect: 100-continue} header for s3 client HTTP PUT request larger than 2MB // or with unknown size streaming bodies, during operation builder step func Add100Continue(stack *middleware.Stack, continueHeaderThresholdBytes int64) error { - return stack.Build.Add(&s3100Continue{ + return stack.Build.Insert(&s3100Continue{ continueHeaderThresholdBytes: continueHeaderThresholdBytes, - }, middleware.After) + }, "RecursionDetection", middleware.Before) } type s3100Continue struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md index 09658aa00..d7f1e6eb6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.3.0 (2026-07-06) + +* **Feature**: Add request serialization snapshot tests. + +# v1.2.2 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.2.1 (2026-06-29) + +* No change notes available for this release. + # v1.2.0 (2026-06-10) * **Feature**: AWS Sign-In now allows customers to control access to the AWS Management Console using resource-based policies. With this release customers can restrict console access based on network perimeters such as VPC IDs, VPC endpoints, and IP addresses. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go index 3c7296775..545b8f106 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go @@ -263,6 +263,10 @@ func (c *Client) invokeOperation( finalizeClientEndpointResolverOptions(&options) + if err := c.addCommonMiddlewares(stack, options, opID); err != nil { + return nil, metadata, err + } + for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err @@ -367,6 +371,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o } return nil } + +func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + if err := addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err := addClientRequestID(stack); err != nil { + return err + } + if err := addRetry(stack, options, c); err != nil { + return err + } + if err := addRawResponseToMetadata(stack); err != nil { + return err + } + if err := addSpanRetryLoop(stack, options); err != nil { + return err + } + if err := addClientUserAgent(stack, options); err != nil { + return err + } + if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err := addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err := addRecursionDetection(stack); err != nil { + return err + } + if err := addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err := addInterceptAttempt(stack, options); err != nil { + return err + } + return nil +} func resolveAuthSchemeResolver(options *Options) { if options.AuthSchemeResolver == nil { options.AuthSchemeResolver = &defaultAuthSchemeResolver{} @@ -639,7 +686,7 @@ func addClientRequestID(stack *middleware.Stack) error { } func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) + return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After) } func addRawResponseToMetadata(stack *middleware.Stack) error { @@ -832,6 +879,14 @@ type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } +func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: operation, + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go index 18e25c3ae..415f9a2b4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go @@ -4,8 +4,6 @@ package signin import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/signin/types" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" @@ -110,9 +108,6 @@ type CreateOAuth2TokenOutput struct { } func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOAuth2Token{}, middleware.After) if err != nil { return err @@ -121,62 +116,32 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOAuth2Token"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpCreateOAuth2TokenValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOAuth2Token(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateOAuth2Token"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -191,22 +156,8 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opCreateOAuth2Token(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateOAuth2Token", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go index cf81328ca..a9c42942a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go @@ -4,8 +4,6 @@ package signin import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -66,9 +64,6 @@ type DeleteConsoleAuthorizationConfigurationOutput struct { } func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration{}, middleware.After) if err != nil { return err @@ -77,19 +72,10 @@ func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares( if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteConsoleAuthorizationConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -99,40 +85,19 @@ func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares( if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteConsoleAuthorizationConfiguration"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -147,22 +112,8 @@ func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares( if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opDeleteConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteConsoleAuthorizationConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go index b6056c753..add06008d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go @@ -5,7 +5,6 @@ package signin import ( "context" "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -55,9 +54,6 @@ type DeleteResourcePermissionStatementOutput struct { } func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePermissionStatement{}, middleware.After) if err != nil { return err @@ -66,19 +62,10 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePermissionStatement"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -88,33 +75,15 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } @@ -124,10 +93,7 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack if err = addOpDeleteResourcePermissionStatementValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePermissionStatement(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteResourcePermissionStatement"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -142,12 +108,6 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } @@ -186,11 +146,3 @@ func (m *idempotencyToken_initializeOpDeleteResourcePermissionStatement) HandleI func addIdempotencyToken_opDeleteResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } - -func newServiceMetadataMiddleware_opDeleteResourcePermissionStatement(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteResourcePermissionStatement", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go index 27b48843b..2def43d98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go @@ -4,8 +4,6 @@ package signin import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -66,9 +64,6 @@ type GetConsoleAuthorizationConfigurationOutput struct { } func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration{}, middleware.After) if err != nil { return err @@ -77,19 +72,10 @@ func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetConsoleAuthorizationConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -99,40 +85,19 @@ func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetConsoleAuthorizationConfiguration"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -147,22 +112,8 @@ func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetConsoleAuthorizationConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go index 0326dce11..9b571203c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go @@ -4,8 +4,6 @@ package signin import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/signin/types" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" @@ -53,9 +51,6 @@ type GetResourcePolicyOutput struct { } func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After) if err != nil { return err @@ -64,19 +59,10 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -86,40 +72,19 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetResourcePolicy"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -134,22 +99,8 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetResourcePolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go index 631885c60..46a4c6c89 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go @@ -5,7 +5,6 @@ package signin import ( "context" "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/signin/types" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" @@ -63,9 +62,6 @@ type ListResourcePermissionStatementsOutput struct { } func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpListResourcePermissionStatements{}, middleware.After) if err != nil { return err @@ -74,19 +70,10 @@ func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack * if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourcePermissionStatements"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -96,40 +83,19 @@ func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack * if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourcePermissionStatements(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListResourcePermissionStatements"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -144,12 +110,6 @@ func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } @@ -251,11 +211,3 @@ type ListResourcePermissionStatementsAPIClient interface { } var _ ListResourcePermissionStatementsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListResourcePermissionStatements(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListResourcePermissionStatements", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go index 5cbddac14..d54b0d421 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go @@ -4,8 +4,6 @@ package signin import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -66,9 +64,6 @@ type PutConsoleAuthorizationConfigurationOutput struct { } func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration{}, middleware.After) if err != nil { return err @@ -77,19 +72,10 @@ func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutConsoleAuthorizationConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -99,40 +85,19 @@ func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutConsoleAuthorizationConfiguration"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -147,22 +112,8 @@ func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opPutConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutConsoleAuthorizationConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go index 4d5a81444..e04aaba5c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go @@ -5,7 +5,6 @@ package signin import ( "context" "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -78,9 +77,6 @@ type PutResourcePermissionStatementOutput struct { } func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePermissionStatement{}, middleware.After) if err != nil { return err @@ -89,19 +85,10 @@ func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *mi if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePermissionStatement"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -111,43 +98,22 @@ func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *mi if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePermissionStatement(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutResourcePermissionStatement"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,12 +128,6 @@ func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } @@ -206,11 +166,3 @@ func (m *idempotencyToken_initializeOpPutResourcePermissionStatement) HandleInit func addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpPutResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } - -func newServiceMetadataMiddleware_opPutResourcePermissionStatement(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutResourcePermissionStatement", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json index 4965af441..40f6a162d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json @@ -26,6 +26,7 @@ "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", + "serde_snapshot_test.go", "serializers.go", "snapshot_test.go", "sra_operation_order_test.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go index ca6d7d6ff..a92e13b67 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go @@ -3,4 +3,4 @@ package signin // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.2.0" +const goModuleVersion = "1.3.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index f97ebb7f2..5539a0553 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.32.0 (2026-07-06) + +* **Feature**: Add request serialization snapshot tests. + +# v1.31.5 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.4 (2026-06-29) + +* No change notes available for this release. + # v1.31.3 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go index ca5364792..127944307 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go @@ -259,6 +259,10 @@ func (c *Client) invokeOperation( finalizeClientEndpointResolverOptions(&options) + if err := c.addCommonMiddlewares(stack, options, opID); err != nil { + return nil, metadata, err + } + for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err @@ -363,6 +367,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o } return nil } + +func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + if err := addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err := addClientRequestID(stack); err != nil { + return err + } + if err := addRetry(stack, options, c); err != nil { + return err + } + if err := addRawResponseToMetadata(stack); err != nil { + return err + } + if err := addSpanRetryLoop(stack, options); err != nil { + return err + } + if err := addClientUserAgent(stack, options); err != nil { + return err + } + if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err := addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err := addRecursionDetection(stack); err != nil { + return err + } + if err := addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err := addInterceptAttempt(stack, options); err != nil { + return err + } + return nil +} func resolveAuthSchemeResolver(options *Options) { if options.AuthSchemeResolver == nil { options.AuthSchemeResolver = &defaultAuthSchemeResolver{} @@ -635,7 +682,7 @@ func addClientRequestID(stack *middleware.Stack) error { } func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) + return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After) } func addRawResponseToMetadata(stack *middleware.Stack) error { @@ -816,6 +863,14 @@ func resolveMeterProvider(options *Options) { } } +func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: operation, + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go index 5482b7a03..a6532c20f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go @@ -4,8 +4,6 @@ package sso import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sso/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -63,9 +61,6 @@ type GetRoleCredentialsOutput struct { } func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoleCredentials{}, middleware.After) if err != nil { return err @@ -74,62 +69,32 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetRoleCredentials"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoleCredentials(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetRoleCredentials"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -144,22 +109,8 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetRoleCredentials(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetRoleCredentials", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go index 8759d5257..b48097259 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go @@ -5,7 +5,6 @@ package sso import ( "context" "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sso/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -68,9 +67,6 @@ type ListAccountRolesOutput struct { } func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountRoles{}, middleware.After) if err != nil { return err @@ -79,62 +75,32 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountRoles"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpListAccountRolesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountRoles(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccountRoles"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -149,12 +115,6 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } @@ -253,11 +213,3 @@ type ListAccountRolesAPIClient interface { } var _ ListAccountRolesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAccountRoles", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go index fea5b4391..6142a5d39 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go @@ -5,7 +5,6 @@ package sso import ( "context" "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sso/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -67,9 +66,6 @@ type ListAccountsOutput struct { } func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccounts{}, middleware.After) if err != nil { return err @@ -78,62 +74,32 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccounts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpListAccountsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccounts"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -148,12 +114,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } @@ -251,11 +211,3 @@ type ListAccountsAPIClient interface { } var _ ListAccountsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAccounts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go index 84aef7ce5..ccafa26f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go @@ -4,8 +4,6 @@ package sso import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -62,9 +60,6 @@ type LogoutOutput struct { } func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpLogout{}, middleware.After) if err != nil { return err @@ -73,62 +68,32 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "Logout"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpLogoutValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLogout(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "Logout"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -143,22 +108,8 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opLogout(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "Logout", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json index 39a393d44..75d526ee7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json @@ -22,6 +22,7 @@ "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", + "serde_snapshot_test.go", "serializers.go", "snapshot_test.go", "sra_operation_order_test.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index f0408d2d8..8775b7729 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.3" +const goModuleVersion = "1.32.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index 34618bf03..8c8f2e5a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.37.0 (2026-07-06) + +* **Feature**: Add request serialization snapshot tests. + +# v1.36.8 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.7 (2026-06-29) + +* No change notes available for this release. + # v1.36.6 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go index 2c0958ade..ebdaff6e6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go @@ -259,6 +259,10 @@ func (c *Client) invokeOperation( finalizeClientEndpointResolverOptions(&options) + if err := c.addCommonMiddlewares(stack, options, opID); err != nil { + return nil, metadata, err + } + for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err @@ -363,6 +367,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o } return nil } + +func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + if err := addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err := addClientRequestID(stack); err != nil { + return err + } + if err := addRetry(stack, options, c); err != nil { + return err + } + if err := addRawResponseToMetadata(stack); err != nil { + return err + } + if err := addSpanRetryLoop(stack, options); err != nil { + return err + } + if err := addClientUserAgent(stack, options); err != nil { + return err + } + if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err := addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err := addRecursionDetection(stack); err != nil { + return err + } + if err := addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err := addInterceptAttempt(stack, options); err != nil { + return err + } + return nil +} func resolveAuthSchemeResolver(options *Options) { if options.AuthSchemeResolver == nil { options.AuthSchemeResolver = &defaultAuthSchemeResolver{} @@ -635,7 +682,7 @@ func addClientRequestID(stack *middleware.Stack) error { } func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) + return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After) } func addRawResponseToMetadata(stack *middleware.Stack) error { @@ -816,6 +863,14 @@ func resolveMeterProvider(options *Options) { } } +func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: operation, + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go index cd739d53f..5c1df1c08 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go @@ -4,8 +4,6 @@ package ssooidc import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -133,9 +131,6 @@ type CreateTokenOutput struct { } func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After) if err != nil { return err @@ -144,62 +139,32 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpCreateTokenValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateToken"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -214,22 +179,8 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go index a02f62a28..088e7f2ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go @@ -4,8 +4,6 @@ package ssooidc import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/ssooidc/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -177,9 +175,6 @@ type CreateTokenWithIAMOutput struct { } func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTokenWithIAM{}, middleware.After) if err != nil { return err @@ -188,19 +183,10 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTokenWithIAM"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -210,43 +196,22 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTokenWithIAM(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateTokenWithIAM"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -261,22 +226,8 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opCreateTokenWithIAM(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTokenWithIAM", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go index f32e86be9..4632f3656 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go @@ -4,8 +4,6 @@ package ssooidc import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -104,9 +102,6 @@ type RegisterClientOutput struct { } func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After) if err != nil { return err @@ -115,62 +110,32 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterClient"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpRegisterClientValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RegisterClient"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -185,22 +150,8 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterClient", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go index a35750b22..3417f8dbd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go @@ -4,8 +4,6 @@ package ssooidc import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -86,9 +84,6 @@ type StartDeviceAuthorizationOutput struct { } func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After) if err != nil { return err @@ -97,62 +92,32 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartDeviceAuthorization"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "StartDeviceAuthorization"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,22 +132,8 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartDeviceAuthorization", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json index 1e34b9a9d..f1e65258b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json @@ -22,6 +22,7 @@ "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", + "serde_snapshot_test.go", "serializers.go", "snapshot_test.go", "sra_operation_order_test.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index 61a97713c..ab94f97c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.36.6" +const goModuleVersion = "1.37.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 94f33a32d..e6171b320 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.44.0 (2026-07-06) + +* **Feature**: Add request serialization snapshot tests. + +# v1.43.5 (2026-07-01) + +* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.4 (2026-06-29) + +* No change notes available for this release. + # v1.43.3 (2026-06-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index 1aa2c357e..c0d927a0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -268,6 +268,10 @@ func (c *Client) invokeOperation( finalizeClientEndpointResolverOptions(&options) + if err := c.addCommonMiddlewares(stack, options, opID); err != nil { + return nil, metadata, err + } + for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err @@ -372,6 +376,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o } return nil } + +func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + if err := addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err := addClientRequestID(stack); err != nil { + return err + } + if err := addRetry(stack, options, c); err != nil { + return err + } + if err := addRawResponseToMetadata(stack); err != nil { + return err + } + if err := addSpanRetryLoop(stack, options); err != nil { + return err + } + if err := addClientUserAgent(stack, options); err != nil { + return err + } + if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err := addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err := addRecursionDetection(stack); err != nil { + return err + } + if err := addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err := addInterceptAttempt(stack, options); err != nil { + return err + } + return nil +} func resolveAuthSchemeResolver(options *Options) { if options.AuthSchemeResolver == nil { options.AuthSchemeResolver = &defaultAuthSchemeResolver{} @@ -649,7 +696,7 @@ func addClientRequestID(stack *middleware.Stack) error { } func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) + return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After) } func addRawResponseToMetadata(stack *middleware.Stack) error { @@ -854,6 +901,14 @@ func resolveMeterProvider(options *Options) { } } +func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: operation, + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index 83aa65a5a..a1c0534bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" @@ -415,9 +413,6 @@ type AssumeRoleOutput struct { } func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRole{}, middleware.After) if err != nil { return err @@ -426,19 +421,10 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRole"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -448,43 +434,22 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpAssumeRoleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRole"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -499,26 +464,12 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } -func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRole", - } -} - // PresignAssumeRole is used to generate a presigned HTTP Request which contains // presigned URL, signed headers and HTTP method used. func (c *PresignClient) PresignAssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index 520e6e1c6..16ffcf2ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -353,9 +351,6 @@ type AssumeRoleWithSAMLOutput struct { } func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithSAML{}, middleware.After) if err != nil { return err @@ -364,62 +359,32 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithSAML"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithSAML"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -434,22 +399,8 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opAssumeRoleWithSAML(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoleWithSAML", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 8a164be5b..2fe5f9284 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -370,9 +368,6 @@ type AssumeRoleWithWebIdentityOutput struct { } func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithWebIdentity{}, middleware.After) if err != nil { return err @@ -381,62 +376,32 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithWebIdentity"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithWebIdentity"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -451,22 +416,8 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoleWithWebIdentity", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go index b52a372db..353512bb2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -124,9 +122,6 @@ type AssumeRootOutput struct { } func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After) if err != nil { return err @@ -135,19 +130,10 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -157,43 +143,22 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpAssumeRootValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoot"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -208,22 +173,8 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go index eaeab8a68..2e54340ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -84,9 +82,6 @@ type DecodeAuthorizationMessageOutput struct { } func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpDecodeAuthorizationMessage{}, middleware.After) if err != nil { return err @@ -95,19 +90,10 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "DecodeAuthorizationMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -117,43 +103,22 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DecodeAuthorizationMessage"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -168,22 +133,8 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opDecodeAuthorizationMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DecodeAuthorizationMessage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go index 2f7adb2f5..c1e9af440 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -75,9 +73,6 @@ type GetAccessKeyInfoOutput struct { } func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyInfo{}, middleware.After) if err != nil { return err @@ -86,19 +81,10 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessKeyInfo"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -108,43 +94,22 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetAccessKeyInfo"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -159,22 +124,8 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetAccessKeyInfo(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAccessKeyInfo", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go index f2d4fbc24..7c2b4e922 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -66,9 +64,6 @@ type GetCallerIdentityOutput struct { } func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCallerIdentity{}, middleware.After) if err != nil { return err @@ -77,19 +72,10 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetCallerIdentity"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -99,40 +85,19 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetCallerIdentity"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -147,26 +112,12 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } -func newServiceMetadataMiddleware_opGetCallerIdentity(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetCallerIdentity", - } -} - // PresignGetCallerIdentity is used to generate a presigned HTTP Request which // contains presigned URL, signed headers and HTTP method used. func (c *PresignClient) PresignGetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go index 78d688acc..e00165161 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -64,9 +62,6 @@ type GetDelegatedAccessTokenOutput struct { } func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetDelegatedAccessToken{}, middleware.After) if err != nil { return err @@ -75,19 +70,10 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetDelegatedAccessToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -97,43 +83,22 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpGetDelegatedAccessTokenValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegatedAccessToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetDelegatedAccessToken"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -148,22 +113,8 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetDelegatedAccessToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetDelegatedAccessToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 57b77ebcc..ba5f92bef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -288,9 +286,6 @@ type GetFederationTokenOutput struct { } func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetFederationToken{}, middleware.After) if err != nil { return err @@ -299,19 +294,10 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetFederationToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -321,43 +307,22 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetFederationToken"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -372,22 +337,8 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetFederationToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetFederationToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go index 4b4083501..644e95ece 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -137,9 +135,6 @@ type GetSessionTokenOutput struct { } func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSessionToken{}, middleware.After) if err != nil { return err @@ -148,19 +143,10 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSessionToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -170,40 +156,19 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetSessionToken"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -218,22 +183,8 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetSessionToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSessionToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go index 7738de5f6..09cbebc25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go @@ -4,8 +4,6 @@ package sts import ( "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -87,9 +85,6 @@ type GetWebIdentityTokenOutput struct { } func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } err = stack.Serialize.Add(&awsAwsquery_serializeOpGetWebIdentityToken{}, middleware.After) if err != nil { return err @@ -98,19 +93,10 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetWebIdentityToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } if err = addComputeContentLength(stack); err != nil { return err } @@ -120,43 +106,22 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options, c); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } if err = addRecordResponseTiming(stack); err != nil { return err } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } if err = addCredentialSource(stack, options); err != nil { return err } if err = addOpGetWebIdentityTokenValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWebIdentityToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetWebIdentityToken"), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -171,22 +136,8 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } if err = addInterceptors(stack, options); err != nil { return err } return nil } - -func newServiceMetadataMiddleware_opGetWebIdentityToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetWebIdentityToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json index 2fc7b400f..085290c4f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json @@ -32,6 +32,7 @@ "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", + "serde_snapshot_test.go", "serializers.go", "snapshot_test.go", "sra_operation_order_test.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index ec43bec7c..f785b1e04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.43.3" +const goModuleVersion = "1.44.0" diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index fe8409e5f..1c96bba23 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,12 @@ +# Release (2026-06-26) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.27.3 + * **Bug Fix**: Fix bug in JSON doc encoder and endpoint host label format validation + # Release (2026-06-05) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/document/json/encoder.go b/vendor/github.com/aws/smithy-go/document/json/encoder.go index 653d5b781..e9138330c 100644 --- a/vendor/github.com/aws/smithy-go/document/json/encoder.go +++ b/vendor/github.com/aws/smithy-go/document/json/encoder.go @@ -232,6 +232,7 @@ func (e *Encoder) encodeScalar(vp valueProvider, rv reflect.Value) error { return &document.InvalidMarshalError{Message: fmt.Sprintf("invalid number literal: %s", number)} } vp.GetValue().Write([]byte(number)) + return nil } switch rv.Kind() { diff --git a/vendor/github.com/aws/smithy-go/encoding/json/value.go b/vendor/github.com/aws/smithy-go/encoding/json/value.go index b41ff1e15..eac49c44c 100644 --- a/vendor/github.com/aws/smithy-go/encoding/json/value.go +++ b/vendor/github.com/aws/smithy-go/encoding/json/value.go @@ -106,6 +106,11 @@ func (jv Value) BigInteger(v *big.Int) { // BigDecimal encodes v as JSON value func (jv Value) BigDecimal(v *big.Float) { + if v.Sign() == 0 && v.Signbit() { + // Preserve negative zero sign which Int64() would lose. + jv.w.Write([]byte("-0")) + return + } if i, accuracy := v.Int64(); accuracy == big.Exact { jv.Long(i) return diff --git a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go index 0c1154127..68828dbfe 100644 --- a/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go +++ b/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/uri.go @@ -27,6 +27,9 @@ func IsValidHostLabel(input string, allowSubDomains bool) bool { if !smithyhttp.ValidHostLabel(label) { return false } + if label[0] == '-' || label[len(label)-1] == '-' { + return false + } } return true diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index 8b6dcf929..c9230c669 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.2" +const goModuleVersion = "1.27.3" diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go index db9801bea..b504a455d 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/host.go +++ b/vendor/github.com/aws/smithy-go/transport/http/host.go @@ -69,7 +69,7 @@ func ValidPortNumber(port string) bool { return true } -// ValidHostLabel returns whether the label is a valid RFC 3986 host label. +// ValidHostLabel returns whether the label is a valid RFC 952/1123 host label. func ValidHostLabel(label string) bool { if l := len(label); l == 0 || l > 63 { return false diff --git a/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md index d86830a0f..c793ad250 100644 --- a/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/analysis/CONTRIBUTORS.md @@ -4,11 +4,11 @@ | Total Contributors | Total Contributions | | --- | --- | -| 22 | 267 | +| 22 | 271 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | -| @fredbi | 127 | | +| @fredbi | 131 | | | @casualjim | 91 | | | @keramix | 9 | | | @youyuanwu | 8 | | diff --git a/vendor/github.com/go-openapi/analysis/README.md b/vendor/github.com/go-openapi/analysis/README.md index e4e308659..2a9046297 100644 --- a/vendor/github.com/go-openapi/analysis/README.md +++ b/vendor/github.com/go-openapi/analysis/README.md @@ -18,12 +18,9 @@ A foundational library to analyze, diff, flatten, merge, and fix OAI specificati * **2025-12-19** : new community chat on discord * a new discord community channel is available to be notified of changes and support users - * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31** You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] -Or join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url] - ## Status API is stable. @@ -79,9 +76,9 @@ on top of which it has been built. ## Other documentation * [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines](.github/CONTRIBUTING.md) -* [Maintainers documentation](docs/MAINTAINERS.md) -* [Code style](docs/STYLE.md) +* [Contributing guidelines][contributing-doc-site] +* [Maintainers documentation][maintainers-doc-site] +* [Code style][style-doc-site] ## Cutting a new release @@ -112,9 +109,6 @@ Maintainers can cut a new release by either: [godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/analysis [godoc-url]: http://pkg.go.dev/github.com/go-openapi/analysis -[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png -[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM -[slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue [discord-url]: https://discord.gg/FfnFYaC3k5 @@ -126,3 +120,7 @@ Maintainers can cut a new release by either: [goversion-url]: https://github.com/go-openapi/analysis/blob/master/go.mod [top-badge]: https://img.shields.io/github/languages/top/go-openapi/analysis [commits-badge]: https://img.shields.io/github/commits-since/go-openapi/analysis/latest + +[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html +[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html +[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/strfmt/.golangci.yml b/vendor/github.com/go-openapi/strfmt/.golangci.yml index 3c4cd489a..8a3b3bff7 100644 --- a/vendor/github.com/go-openapi/strfmt/.golangci.yml +++ b/vendor/github.com/go-openapi/strfmt/.golangci.yml @@ -2,6 +2,7 @@ version: "2" linters: default: all disable: + - goconst # has become too noisy. Disabled - depguard - funlen - gomoddirectives diff --git a/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md b/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md index b6d62d76e..4aa4fcb54 100644 --- a/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/strfmt/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 40 | 234 | +| 40 | 239 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 88 | | -| @fredbi | 66 | | +| @fredbi | 71 | | | @youyuanwu | 13 | | | @jlambatl | 9 | | | @GlenDC | 5 | | diff --git a/vendor/github.com/go-openapi/strfmt/default.go b/vendor/github.com/go-openapi/strfmt/default.go index 87d3856ad..725cc0e1a 100644 --- a/vendor/github.com/go-openapi/strfmt/default.go +++ b/vendor/github.com/go-openapi/strfmt/default.go @@ -1978,6 +1978,14 @@ func (r *Password) DeepCopy() *Password { } func isRequestURI(rawurl string) bool { + // url.ParseRequestURI assumes the input contains no "#fragment" + // (RFC 3986 §3.5). A URI with a fragment and an empty path, such as + // "https://host#@frag", is therefore misread as userinfo and rejected + // as "invalid userinfo". Strip the fragment first so the absolute + // request URI validates, matching url.Parse's RFC 3986 handling. + if i := strings.IndexByte(rawurl, '#'); i >= 0 { + rawurl = rawurl[:i] + } _, err := url.ParseRequestURI(rawurl) return err == nil } diff --git a/vendor/github.com/pelletier/go-toml/v2/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/marshaler.go index c7a08e3ac..7f6a9408e 100644 --- a/vendor/github.com/pelletier/go-toml/v2/marshaler.go +++ b/vendor/github.com/pelletier/go-toml/v2/marshaler.go @@ -15,6 +15,9 @@ import ( "sync" "time" "unicode/utf8" + + "github.com/pelletier/go-toml/v2/internal/parserbridge" + "github.com/pelletier/go-toml/v2/unstable" ) // Marshal serializes a Go value as a TOML document. @@ -25,6 +28,7 @@ func Marshal(v interface{}) ([]byte, error) { e := encoderStatePool.Get().(*encoderState) e.Encoder = &enc + e.marshalerOn = enc.marshalerInterface e.buf = e.buf[:0] e.keyStack = e.keyStack[:0] e.lastWasHeader = false @@ -52,6 +56,9 @@ type Encoder struct { indentSymbol string indentTables bool marshalJSONNumbers bool + + // toggles the unstable.Marshaler interface + marshalerInterface bool } // NewEncoder returns a new Encoder that writes to w. @@ -110,6 +117,35 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder { return enc } +// EnableMarshalerInterface enables the unstable.Marshaler interface. +// +// With this feature enabled, types implementing the unstable.Marshaler +// interface emit their own raw TOML instead of being encoded structurally. It +// is the encoding counterpart of Decoder.EnableUnmarshalerInterface, and allows +// types such as unstable.RawMessage to round-trip raw TOML bytes. +// +// The bytes returned by MarshalTOML are spliced into the document verbatim. The +// encoder parses them to decide between the valid positions: +// - bytes forming a single value are emitted inline, as in `key = `; +// - bytes forming key-value lines are emitted as the body of a `[key]` table; +// - at the document root, the bytes are emitted as the whole document: the +// encode counterpart of the decoder delivering the whole document to a +// root unstable.Unmarshaler. +// +// An empty result is omitted from the output. Bytes that are not valid TOML +// for their position result in an error, as do bytes forming table content in +// a position where only a value is valid (an array element, an inline table, +// or a table forced inline). MarshalTOML can be called more than once for the +// same value during a single encode, so it must be deterministic. +// +// *Unstable:* This method does not follow the compatibility guarantees of +// semver. It can be changed or removed without a new major version being +// issued. +func (enc *Encoder) EnableMarshalerInterface() *Encoder { + enc.marshalerInterface = true + return enc +} + // Encode writes a TOML representation of v to the stream. // // If v cannot be represented to TOML it returns an error. @@ -186,6 +222,7 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder { func (enc *Encoder) Encode(v interface{}) error { e := encoderStatePool.Get().(*encoderState) e.Encoder = enc + e.marshalerOn = enc.marshalerInterface e.buf = e.buf[:0] e.keyStack = e.keyStack[:0] e.lastWasHeader = false @@ -227,6 +264,15 @@ type encoderState struct { // stringKeyBuf is a reusable buffer to read string map keys without // allocating one per map. stringKeyBuf reflect.Value + + // parser classifies the bytes returned by unstable.Marshaler values as a + // single value or a table body. Only used when marshalerOn is set. + parser unstable.Parser + + // marshalerOn mirrors Encoder.marshalerInterface, copied onto the state so + // the per-value hot path checks a direct field instead of dereferencing the + // embedded *Encoder on every value. + marshalerOn bool } // valueOptions are the encoding options attached to one entry of a table. @@ -236,7 +282,13 @@ type valueOptions struct { omitempty bool omitzero bool commented bool - comment string + // rawShape is the unstable.Marshaler classification of the entry's value, + // resolved at encode time (not from tags). It lives here, in the byte of + // padding the booleans already leave, so that entry does not grow and the + // encoder's default (interface-disabled) path keeps its exact layout and + // performance. It stays shapeUnknown for everything that is not a Marshaler. + rawShape rawShape + comment string } // entry is a deferred key-value of a table being encoded. @@ -246,6 +298,22 @@ type entry struct { options valueOptions } +// rawShape classifies the bytes produced by an unstable.Marshaler. +type rawShape uint8 + +const ( + // shapeUnknown is the default: not an unstable.Marshaler, or the interface + // is disabled. + shapeUnknown rawShape = iota + // shapeEmpty is whitespace-only content: it has no TOML representation and + // is omitted from the output. + shapeEmpty + // shapeValue is a single TOML value, emitted inline as `key = `. + shapeValue + // shapeTable is one or more key-value lines, emitted as a `[key]` body. + shapeTable +) + func (e *encoderState) encodeRoot(v interface{}) error { if v == nil { return errors.New("toml: cannot encode a nil interface") @@ -257,6 +325,10 @@ func (e *encoderState) encodeRoot(v interface{}) error { return errors.New("toml: cannot encode a nil pointer") } + if e.marshalerOn && encPropsForType(rv.Type()).marshaler != 0 { + return e.encodeMarshalerRoot(rv) + } + switch rv.Kind() { case reflect.Map, reflect.Struct: if isValueKind(rv) { @@ -268,6 +340,34 @@ func (e *encoderState) encodeRoot(v interface{}) error { } } +// encodeMarshalerRoot emits the bytes of a root-level unstable.Marshaler as +// the whole document: the encode counterpart of the decoder delivering the +// whole document to a root Unmarshaler. The bytes must form a TOML document +// (key-value lines and table headers); empty output produces an empty +// document. +func (e *encoderState) encodeMarshalerRoot(rv reflect.Value) error { + raw, err := e.marshalerBytes(rv) + if err != nil { + return err + } + trimmed := bytes.TrimSpace(raw) + if len(trimmed) == 0 { + return nil + } + if err := e.validateRawTableBody(rv.Type(), trimmed); err != nil { + // A single TOML value has no meaning at the document root; report it + // as such rather than as a syntax error. + if shape, _ := e.classifyRaw(trimmed); shape == shapeValue { + return fmt.Errorf("toml: cannot encode %s as a document root: MarshalTOML returned a single TOML value, not a document", rv.Type()) + } + return err + } + e.buf = append(e.buf, trimmed...) + e.buf = append(e.buf, '\n') + e.lastWasHeader = false + return nil +} + // resolve unwraps pointers and interfaces until a concrete value is found. // Returns false if it resolves to nil. func resolve(v reflect.Value) (reflect.Value, bool) { @@ -293,10 +393,15 @@ func resolve(v reflect.Value) (reflect.Value, bool) { type typeEncProps struct { // 0: not a TextMarshaler, 1: the type implements it, 2: its pointer does text uint8 + // 0: not an unstable.Marshaler, 1: the type implements it, 2: its pointer + // does. Only consulted when Encoder.marshalerInterface is set. + marshaler uint8 // encoded as a TOML value (as opposed to a table) isValue bool } +var marshalerType = reflect.TypeOf(new(unstable.Marshaler)).Elem() + var typeEncPropsCache sync.Map // reflect.Type -> typeEncProps func encPropsForType(t reflect.Type) typeEncProps { @@ -310,6 +415,12 @@ func encPropsForType(t reflect.Type) typeEncProps { case reflect.PtrTo(t).Implements(textMarshalerType): p.text = 2 } + switch { + case t.Implements(marshalerType): + p.marshaler = 1 + case reflect.PtrTo(t).Implements(marshalerType): + p.marshaler = 2 + } switch t { case timeType, localDateType, localTimeType, localDateTimeType: p.isValue = true @@ -360,6 +471,11 @@ func (e *encoderState) isArrayOfTables(v reflect.Value) bool { if v.Len() == 0 { return false } + // The Marshaler-aware classification lives in a separate method, hoisted out + // of this loop, so the default path keeps its exact original shape. + if e.marshalerOn { + return e.isMarshalerArrayOfTables(v) + } for i := 0; i < v.Len(); i++ { elem, ok := resolve(v.Index(i)) if !ok || isValueKind(elem) { @@ -369,6 +485,147 @@ func (e *encoderState) isArrayOfTables(v reflect.Value) bool { return true } +// isMarshalerArrayOfTables is the EnableMarshalerInterface variant of +// isArrayOfTables: a Marshaler element counts as a table only when its raw +// content is table shaped (key-value lines); one holding a single value makes +// the whole slice a plain array instead. +func (e *encoderState) isMarshalerArrayOfTables(v reflect.Value) bool { + for i := 0; i < v.Len(); i++ { + elem, ok := resolve(v.Index(i)) + if !ok { + return false + } + if encPropsForType(elem.Type()).marshaler != 0 { + raw, err := e.marshalerBytes(elem) + if err != nil { + return false + } + if shape, _ := e.classifyRaw(raw); shape != shapeTable { + return false + } + continue + } + if isValueKind(elem) { + return false + } + } + return true +} + +// marshalerBytes returns the raw TOML produced by v's unstable.Marshaler +// implementation. The caller guarantees v implements the interface +// (encPropsForType(v.Type()).marshaler != 0). +func (e *encoderState) marshalerBytes(v reflect.Value) ([]byte, error) { + t := v.Type() + var m unstable.Marshaler + switch { + case encPropsForType(t).marshaler == 1: + // The type itself implements Marshaler (e.g. a value receiver). + m = v.Interface().(unstable.Marshaler) + case v.CanAddr(): + // Only the pointer implements it, and v is addressable. + m = v.Addr().Interface().(unstable.Marshaler) + default: + // Only the pointer implements it, but v is not addressable: take the + // address of a copy. + tmp := reflect.New(t) + tmp.Elem().Set(v) + m = tmp.Interface().(unstable.Marshaler) + } + b, err := m.MarshalTOML() + if err != nil { + return nil, fmt.Errorf("toml: error calling MarshalTOML for type %s: %w", t, err) + } + return b, nil +} + +// validateRawTableBody checks that trimmed — table-shaped Marshaler output +// about to be spliced verbatim — is syntactically valid TOML, so a Marshaler +// cannot silently corrupt the document. It reuses e.parser, like classifyRaw. +func (e *encoderState) validateRawTableBody(t reflect.Type, trimmed []byte) error { + e.parser.Reset(trimmed) + for e.parser.NextExpression() { + } + if err := e.parser.Error(); err != nil { + return fmt.Errorf("toml: error calling MarshalTOML for type %s: invalid TOML: %w", t, err) + } + return nil +} + +// classifyRaw decides whether b (the output of an unstable.Marshaler) is empty, +// a single TOML value, or a table body. It returns the trimmed bytes that +// should be spliced into the document. It reuses e.parser, so it is not safe +// for concurrent use (encoderState is not shared). +func (e *encoderState) classifyRaw(b []byte) (rawShape, []byte) { + trimmed := bytes.TrimSpace(b) + if len(trimmed) == 0 { + return shapeEmpty, trimmed + } + e.parser.Reset(trimmed) + _, rest, err := parserbridge.ParseValue(&e.parser, trimmed) + if err == nil && len(bytes.TrimSpace(rest)) == 0 { + return shapeValue, trimmed + } + return shapeTable, trimmed +} + +// resolveMarshalerEntries classifies every entry whose value implements +// unstable.Marshaler, recording the shape on the entry so the two table passes +// can route it without re-classifying. Any error from MarshalTOML is surfaced +// eagerly. The marshaled bytes themselves are produced again at emit time by +// marshalerValue; that keeps entry small on the encoder's hot path, and only +// runs when the (opt-in) interface is enabled. +func (e *encoderState) resolveMarshalerEntries(entries []entry) error { + for i := range entries { + ent := &entries[i] + v, ok := resolve(ent.value) + if !ok || encPropsForType(v.Type()).marshaler == 0 { + continue + } + raw, err := e.marshalerBytes(v) + if err != nil { + return err + } + ent.options.rawShape, _ = e.classifyRaw(raw) + } + return nil +} + +// marshalerValue returns the trimmed bytes to splice for an entry already known +// to be an unstable.Marshaler (ent.options.rawShape != shapeUnknown). +func (e *encoderState) marshalerValue(ent *entry) ([]byte, error) { + v, _ := resolve(ent.value) + raw, err := e.marshalerBytes(v) + if err != nil { + return nil, err + } + return bytes.TrimSpace(raw), nil +} + +// appendMarshalerInline emits an unstable.Marshaler value in a value position +// (array element or inline-table member), where only a single TOML value is +// valid. done is false when t is not a Marshaler, so appendValue falls through +// to its normal handling. It is split out of appendValue (type check included) +// to keep that hot path lean. +func (e *encoderState) appendMarshalerInline(b []byte, v reflect.Value, t reflect.Type) (out []byte, done bool, err error) { + if encPropsForType(t).marshaler == 0 { + return b, false, nil + } + raw, err := e.marshalerBytes(v) + if err != nil { + return nil, true, err + } + shape, trimmed := e.classifyRaw(raw) + switch shape { + case shapeValue: + return append(b, trimmed...), true, nil + case shapeEmpty: + return nil, true, fmt.Errorf("toml: cannot encode an empty %s as an inline value", t) + default: + return nil, true, fmt.Errorf("toml: cannot encode %s as an inline value: %q is not a single TOML value", t, trimmed) + } +} + // encodeTable writes the content of a table at the given key path. func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) error { entries, err := e.collectEntries(v) @@ -376,15 +633,51 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) return err } + // Marshaler routing is hoisted behind a single local flag. When the (opt-in) + // interface is off, mOn is false and both passes run the exact baseline + // code, so the default Marshal path keeps its performance. + mOn := e.marshalerOn + if mOn { + // Classify Marshaler entries once, up front, so the passes can route + // them by shape and surface MarshalTOML errors eagerly. + if err := e.resolveMarshalerEntries(entries); err != nil { + return err + } + } + // First pass: emit all key-values; tables are handled by the second // pass. for i := range entries { ent := &entries[i] + if mOn { + switch ent.options.rawShape { + case shapeUnknown: + // Not a Marshaler: handled by the baseline logic below. + case shapeEmpty: + // No TOML representation: omit the key. + continue + case shapeValue: + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { + return err + } + continue + case shapeTable: + // A table body is emitted in the second pass, unless it is + // forced inline (SetTablesInline / inline tag), which has no + // valid inline form and is reported as an error by + // encodeKeyValue. + if e.tablesInline || ent.options.inline { + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { + return err + } + } + continue + } + } if e.entryIsTable(ent) { continue } - err := e.encodeKeyValue(*ent, commented, indent) - if err != nil { + if err := e.encodeKeyValue(*ent, commented, indent); err != nil { return err } } @@ -392,6 +685,25 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) // Second pass: emit the sub-tables, extending the shared key stack. for i := range entries { ent := entries[i] + if mOn { + switch ent.options.rawShape { + case shapeUnknown: + // Not a Marshaler: handled by the baseline logic below. + case shapeValue, shapeEmpty: + // Not a table: already handled (or omitted) in the first pass. + continue + case shapeTable: + // Emit the raw body verbatim under the freshly pushed header. + // (The forced-inline case already errored in the first pass.) + entCommented := commented || ent.options.commented + e.keyStack = append(e.keyStack, ent.key) + if err := e.encodeMarshalerTable(&ent, entCommented, indent); err != nil { + return err + } + e.keyStack = e.keyStack[:len(e.keyStack)-1] + continue + } + } if !e.entryIsTable(&ent) { continue } @@ -423,8 +735,45 @@ func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) return nil } +// encodeMarshalerTable emits a table-shaped unstable.Marshaler entry: the +// header for the key currently on the stack, then the raw body verbatim. +func (e *encoderState) encodeMarshalerTable(ent *entry, commented bool, indent int) error { + raw, err := e.marshalerValue(ent) + if err != nil { + return err + } + // Validate the bytes actually being spliced: MarshalTOML is called again + // for the emit, so this both rejects invalid TOML and guards against an + // implementation that returned different content than during + // classification. + if err := e.validateRawTableBody(ent.value.Type(), raw); err != nil { + return err + } + e.writeTableHeader(ent.options.comment, commented, false, indent) + e.spliceRawTableBody(raw, commented) + return nil +} + +// spliceRawTableBody appends a raw table body verbatim after its header. When +// the table is commented, every physical line is prefixed with the comment +// marker so the body does not leak into the document as live keys. +func (e *encoderState) spliceRawTableBody(raw []byte, commented bool) { + if len(raw) == 0 { + return + } + if commented { + e.buf = append(e.buf, "# "...) + e.buf = append(e.buf, bytes.ReplaceAll(raw, []byte("\n"), []byte("\n# "))...) + } else { + e.buf = append(e.buf, raw...) + } + e.buf = append(e.buf, '\n') + e.lastWasHeader = false +} + // entryIsTable reports whether the entry is emitted as a (sub-)table rather -// than a key-value. +// than a key-value. Marshaler entries are routed by encodeTable before this is +// reached, so it carries no marshaler-specific cost. func (e *encoderState) entryIsTable(ent *entry) bool { return !e.tablesInline && !ent.options.inline && (e.isTableLike(ent.value) || e.isArrayOfTables(ent.value)) } @@ -458,6 +807,22 @@ func (e *encoderState) encodeArrayTable(ent entry, commented bool, indent int) e // The comment is only present before the first element. comment = "" + // A Marshaler element splices its raw table body verbatim. The shape + // was checked by isArrayOfTables, but MarshalTOML is called again for + // the emit, so the spliced bytes are validated here. + if e.marshalerOn && encPropsForType(elem.Type()).marshaler != 0 { + raw, err := e.marshalerBytes(elem) + if err != nil { + return err + } + trimmed := bytes.TrimSpace(raw) + if err := e.validateRawTableBody(elem.Type(), trimmed); err != nil { + return err + } + e.spliceRawTableBody(trimmed, commented) + continue + } + err := e.encodeTable(elem, commented, indent+1) if err != nil { return err @@ -478,10 +843,13 @@ func (e *encoderState) writeTableHeader(comment string, commented bool, array bo e.writeComment(comment, headerIndent) - e.writeIndent(headerIndent) + // The "commented" marker is emitted at column zero, ahead of any table + // indentation, so that the indentation appears inside the comment + // (e.g. `# [a.b]`). This matches the historical v2.3 layout. if commented { e.buf = append(e.buf, "# "...) } + e.writeIndent(headerIndent) e.buf = append(e.buf, '[') if array { e.buf = append(e.buf, '[') @@ -528,10 +896,14 @@ func (e *encoderState) encodeKeyValue(ent entry, commented bool, indent int) err e.writeComment(ent.options.comment, indent) - e.writeIndent(indent) + // The "commented" marker is emitted at column zero, ahead of any table + // indentation, so that the indentation appears inside the comment + // (e.g. `# key = value`). This matches the historical v2.3 layout. + lineStart := len(e.buf) if commented { e.buf = append(e.buf, "# "...) } + e.writeIndent(indent) e.buf = e.appendKey(e.buf, ent.key) e.buf = append(e.buf, " = "...) @@ -545,16 +917,63 @@ func (e *encoderState) encodeKeyValue(ent entry, commented bool, indent int) err valueIndent = 0 } + // A Marshaler value is delegated, keeping this hot function lean for the + // default path (rawShape stays shapeUnknown when the interface is off). It + // shares the commented/newline handling below. var err error - e.buf, err = e.appendValue(e.buf, ent.value, ent.options, valueIndent) + if ent.options.rawShape != shapeUnknown { + e.buf, err = e.appendMarshalerInlineValue(e.buf, &ent) + } else { + e.buf, err = e.appendValue(e.buf, ent.value, ent.options, valueIndent) + } if err != nil { return err } + + // A commented value that renders across multiple lines (a multiline string + // or a multiline array) must have every physical line prefixed with the + // comment marker, not just the first; otherwise the continuation lines are + // emitted as live, syntactically invalid TOML. + if commented { + if bytes.IndexByte(e.buf[lineStart:], '\n') >= 0 { + region := bytes.ReplaceAll( + append([]byte(nil), e.buf[lineStart:]...), + []byte("\n"), []byte("\n# "), + ) + e.buf = append(e.buf[:lineStart], region...) + } + } e.buf = append(e.buf, '\n') e.lastWasHeader = false return nil } +// appendMarshalerInlineValue appends the value part of a `key = ` line for an +// unstable.Marshaler entry, leaving the trailing newline and commented handling +// to encodeKeyValue. Empty entries are filtered out before this point, so the +// value is either a single value (spliced verbatim) or, when forced inline by +// SetTablesInline or an inline tag, table content (an error). +func (e *encoderState) appendMarshalerInlineValue(b []byte, ent *entry) ([]byte, error) { + errNotValue := func() error { + return fmt.Errorf("toml: cannot encode %s as an inline value: not a single TOML value", ent.value.Type()) + } + if ent.options.rawShape != shapeValue { + return nil, errNotValue() + } + raw, err := e.marshalerValue(ent) + if err != nil { + return nil, err + } + // Classify the just-returned bytes rather than trusting the earlier pass: + // MarshalTOML is called again for the emit, and an implementation that + // returns different content must not splice non-value bytes into a + // `key = ` position. + if shape, trimmed := e.classifyRaw(raw); shape == shapeValue { + return append(b, trimmed...), nil + } + return nil, errNotValue() +} + // collectEntries builds the ordered list of the entries of a table, // applying tags and omission rules. func (e *encoderState) collectEntries(v reflect.Value) ([]entry, error) { @@ -966,6 +1385,16 @@ func (e *encoderState) appendValue(b []byte, v reflect.Value, opts valueOptions, } } + // A Marshaler reached through a value position (an array element or inline + // table member) splices its bytes verbatim. Everything (including the type + // check) lives in a separate method so this hot function keeps its default + // layout: when the opt-in interface is off, only the bool test runs here. + if e.marshalerOn { + if b2, done, err := e.appendMarshalerInline(b, v, t); done { + return b2, err + } + } + switch encPropsForType(t).text { case 1: if t.Kind() != reflect.String { diff --git a/vendor/github.com/pelletier/go-toml/v2/toml.abnf b/vendor/github.com/pelletier/go-toml/v2/toml.abnf index 473f3749e..7647c4bed 100644 --- a/vendor/github.com/pelletier/go-toml/v2/toml.abnf +++ b/vendor/github.com/pelletier/go-toml/v2/toml.abnf @@ -36,7 +36,7 @@ newline =/ %x0D.0A ; CRLF comment-start-symbol = %x23 ; # non-ascii = %x80-D7FF / %xE000-10FFFF -non-eol = %x09 / %x20-7F / non-ascii +non-eol = %x09 / %x20-7E / non-ascii comment = comment-start-symbol *non-eol @@ -74,12 +74,14 @@ escape = %x5C ; \ escape-seq-char = %x22 ; " quotation mark U+0022 escape-seq-char =/ %x5C ; \ reverse solidus U+005C escape-seq-char =/ %x62 ; b backspace U+0008 +escape-seq-char =/ %x65 ; e escape U+001B escape-seq-char =/ %x66 ; f form feed U+000C escape-seq-char =/ %x6E ; n line feed U+000A escape-seq-char =/ %x72 ; r carriage return U+000D escape-seq-char =/ %x74 ; t tab U+0009 -escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX -escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX +escape-seq-char =/ %x78 2HEXDIG ; xHH U+00HH +escape-seq-char =/ %x75 4HEXDIG ; uHHHH U+HHHH +escape-seq-char =/ %x55 8HEXDIG ; UHHHHHHHH U+HHHHHHHH ;; Multiline Basic String @@ -174,7 +176,7 @@ time-secfrac = "." 1*DIGIT time-numoffset = ( "+" / "-" ) time-hour ":" time-minute time-offset = "Z" / time-numoffset -partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ] +partial-time = time-hour ":" time-minute [ ":" time-second [ time-secfrac ] ] full-date = date-fullyear "-" date-month "-" date-mday full-time = partial-time time-offset @@ -221,13 +223,14 @@ std-table-close = ws %x5D ; ] Right square bracket ;; Inline Table -inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close +inline-table = inline-table-open [ inline-table-keyvals ] ws-comment-newline inline-table-close -inline-table-open = %x7B ws ; { -inline-table-close = ws %x7D ; } -inline-table-sep = ws %x2C ws ; , Comma +inline-table-open = %x7B ; { +inline-table-close = %x7D ; } +inline-table-sep = %x2C ; , Comma -inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] +inline-table-keyvals = ws-comment-newline keyval ws-comment-newline inline-table-sep inline-table-keyvals +inline-table-keyvals =/ ws-comment-newline keyval ws-comment-newline [ inline-table-sep ] ;; Array Table diff --git a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go index 9817d5b33..d110243f4 100644 --- a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go +++ b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go @@ -512,6 +512,15 @@ func (d *decoder) unmarshal(data []byte, v interface{}) error { } } + // When the root target itself implements the Unmarshaler interface, the + // whole document decodes into it. Open a capture spanning the entire + // document up front: the top-level key-values then flow through the + // existing capture branch and any tables attach to it via resumeCapture, + // so UnmarshalTOML receives the assembled document exactly once. + if d.unmarshalerInterface && hasUnmarshaler(root) { + d.startRootCapture() + } + for d.p.NextExpression() { err := d.handleRootExpression(d.p.Expression(), root) if err != nil { @@ -613,17 +622,18 @@ func (d *decoder) wrapError(data []byte, err error) error { return err } -// wrapSeenError turns an error returned by SeenTracker.CheckExpression into a -// ParserError carrying the position and key of the offending expression, so -// that redefinition and duplicate-key errors are reported as a DecodeError -// with context (see issue #668). +// keyedError turns a bare error raised while processing an expression into a +// ParserError carrying the position and key of that expression, so that it is +// reported as a DecodeError with context. It is used for the errors returned +// by SeenTracker.CheckExpression (redefinitions and duplicate keys, see issue +// #668) and for table placement errors raised by walkTable (see issue #806). // // The highlight spans the expression's key. Unlike Node.Raw, key nodes always // carry a Raw range, so this works for tables and array tables too (whose own // Raw range is not set by the parser). For a duplicate detected inside an // inline table, node is the enclosing key-value expression, so the error // points at that expression's key. -func (d *decoder) wrapSeenError(node *unstable.Node, err error) error { +func (d *decoder) keyedError(node *unstable.Node, err error) error { if err == nil { return nil } @@ -658,7 +668,7 @@ func (d *decoder) wrapSeenError(node *unstable.Node, err error) error { func (d *decoder) handleRootExpression(expr *unstable.Node, root reflect.Value) error { first, err := d.seen.CheckExpression(expr) if err != nil { - return d.wrapSeenError(expr, err) + return d.keyedError(expr, err) } switch expr.Kind { @@ -779,7 +789,7 @@ walk: } // Anything else is replaced by a fresh generic map. if !mapStringInterfaceType.AssignableTo(v.Type()) { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", v.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&pf, fresh) @@ -807,7 +817,7 @@ walk: d.setArrayCount(key, 1) } if cnt > v.Len() { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot reach element %d of array of size %d", cnt-1, v.Len()) + return d.keyedError(expr, fmt.Errorf("cannot reach element %d of array of size %d", cnt-1, v.Len())) } d.segIdx[idx] = cnt - 1 elem := v.Index(cnt - 1) @@ -890,7 +900,7 @@ walk: } default: if !ceIface { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", ce.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", ce.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&w, fresh) @@ -902,7 +912,7 @@ walk: switch et.Kind() { case reflect.Interface: if !mapStringInterfaceType.AssignableTo(et) { - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", et) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et)) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&w, fresh) @@ -924,7 +934,7 @@ walk: pf = slotWriter{kind: 1, slot: tmp} v = tmp default: - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", et) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et)) } } idx++ @@ -936,12 +946,15 @@ walk: d.skipUntilTable = true return nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return err + } pf = slotWriter{kind: 1, slot: fv} v = fv idx++ default: - return unstable.NewParserError(d.p.Raw(expr.Raw), "cannot store a table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind())) } } @@ -997,7 +1010,7 @@ walk: cnt = 0 } if cnt >= v.Len() { - return unstable.NewParserError(d.p.Raw(expr.Raw), "array of size %d is too small to store this array table", v.Len()) + return d.keyedError(expr, fmt.Errorf("array of size %d is too small to store this array table", v.Len())) } v.Index(cnt).Set(reflect.Zero(v.Type().Elem())) d.setArrayCount(akey, cnt+1) @@ -1010,7 +1023,7 @@ walk: pf = slotWriter{kind: 1, slot: elem} v = elem default: - return fmt.Errorf("toml: cannot store an array table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store an array table in a %s", v.Kind())) } } @@ -1037,7 +1050,7 @@ walk: } } if !mapStringInterfaceType.AssignableTo(v.Type()) { - return fmt.Errorf("toml: cannot store a table in a %s", v.Type()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type())) } fresh := reflect.ValueOf(map[string]interface{}{}) d.storeSlot(&pf, fresh) @@ -1063,7 +1076,7 @@ walk: d.tableTargetValid = true return nil default: - return fmt.Errorf("toml: cannot store a table in a %s", v.Kind()) + return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind())) } } } @@ -1153,6 +1166,18 @@ func (d *decoder) startCapture(pathLen int, expr *unstable.Node) { } } +// startRootCapture opens a capture covering the entire document, used when the +// root target itself implements the Unmarshaler interface. It is opened before +// reading any expression: top-level key-values are then accumulated through the +// regular capture branch, and its empty name path matches every table in +// resumeCapture, so the whole document is handed to UnmarshalTOML once. The +// single index slot is -1 because the root is never reached through an array +// table. +func (d *decoder) startRootCapture() { + d.captures = append(d.captures, rawCapture{indexes: []int{-1}}) + d.captureIdx = len(d.captures) - 1 +} + // resolveCapture walks back to the target of a capture and delivers the // accumulated raw bytes to its UnmarshalTOML implementation. func (d *decoder) resolveCapture(v reflect.Value, c *rawCapture, idx int, indexed bool) (reflect.Value, error) { @@ -1207,7 +1232,10 @@ func (d *decoder) resolveCapture(v reflect.Value, c *rawCapture, idx int, indexe if !found { return v, nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return reflect.Value{}, err + } nv, err := d.resolveCapture(fv, c, idx+1, false) if err != nil { return reflect.Value{}, err @@ -1468,9 +1496,11 @@ func (d *decoder) descend(v reflect.Value, path []pathPart, idx int, expr *unsta } return v, nil } - fv := fieldByIndexAlloc(v, f.index) + fv, err := fieldByIndexAlloc(v, f.index) + if err != nil { + return reflect.Value{}, err + } var nv reflect.Value - var err error if idx+1 == len(path) { // Leaf field: assign directly. descend's first action for a // fully-consumed path is exactly this call, so skipping the extra @@ -1805,7 +1835,7 @@ func (d *decoder) assignDateTime(v reflect.Value, value *unstable.Node) (reflect } if v.Type() == timeType { - v.Set(reflect.ValueOf(t)) + setConcrete(v, t) return v, nil } if v.Kind() == reflect.Interface { @@ -1814,6 +1844,16 @@ func (d *decoder) assignDateTime(v reflect.Value, value *unstable.Node) (reflect return reflect.Value{}, d.typeMismatchError("datetime", v.Type(), d.p.Raw(value.Raw)) } +// setConcrete assigns x to v, which must be a settable value of x's concrete +// type. Writing through the address avoids the heap allocation that +// v.Set(reflect.ValueOf(x)) incurs from boxing x into an interface. Settable +// implies addressable: the decoder assigns to struct fields, slice elements, +// and reflect.New-allocated temporaries (map elements are decoded into such +// temporaries), all of which are addressable. +func setConcrete[T any](v reflect.Value, x T) { + *(v.Addr().Interface().(*T)) = x +} + func (d *decoder) assignLocalDateTime(v reflect.Value, value *unstable.Node) (reflect.Value, error) { dt, rest, err := parseLocalDateTime(value.Data) if err != nil { @@ -1825,10 +1865,10 @@ func (d *decoder) assignLocalDateTime(v reflect.Value, value *unstable.Node) (re switch v.Type() { case localDateTimeType: - v.Set(reflect.ValueOf(dt)) + setConcrete(v, dt) return v, nil case timeType: - v.Set(reflect.ValueOf(dt.AsTime(time.Local))) + setConcrete(v, dt.AsTime(time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -1845,10 +1885,10 @@ func (d *decoder) assignLocalDate(v reflect.Value, value *unstable.Node) (reflec switch v.Type() { case localDateType: - v.Set(reflect.ValueOf(date)) + setConcrete(v, date) return v, nil case timeType: - v.Set(reflect.ValueOf(date.AsTime(time.Local))) + setConcrete(v, date.AsTime(time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -1868,10 +1908,10 @@ func (d *decoder) assignLocalTime(v reflect.Value, value *unstable.Node) (reflec switch v.Type() { case localTimeType: - v.Set(reflect.ValueOf(t)) + setConcrete(v, t) return v, nil case timeType: - v.Set(reflect.ValueOf(time.Date(0, 1, 1, t.Hour, t.Minute, t.Second, t.Nanosecond, time.Local))) + setConcrete(v, time.Date(0, 1, 1, t.Hour, t.Minute, t.Second, t.Nanosecond, time.Local)) return v, nil } if v.Kind() == reflect.Interface { @@ -2228,11 +2268,22 @@ func buildPlan(t reflect.Type) *structPlan { byName: map[string]structField{}, byFold: map[string]structField{}, } - addFields(plan, t, nil) + addFields(plan, t, nil, map[reflect.Type]bool{}) return plan } -func addFields(plan *structPlan, t reflect.Type, prefix []int) { +// addFields flattens the fields of t into the plan. visited holds the types +// being flattened on the current branch: a struct type that embeds itself +// (directly or through other types) is not descended into again, mirroring +// buildEncPlan. Without this guard a recursive embedding would recurse +// forever; the repeated fields are unreachable by flattening anyway. +func addFields(plan *structPlan, t reflect.Type, prefix []int, visited map[reflect.Type]bool) { + if visited[t] { + return + } + visited[t] = true + defer delete(visited, t) + var embedded []reflect.StructField for i := 0; i < t.NumField(); i++ { f := t.Field(i) @@ -2312,22 +2363,28 @@ func addFields(plan *structPlan, t reflect.Type, prefix []int) { index = append(index, prefix...) idx := f.Index[0] index = append(index, idx) - addFields(plan, ft, index) + addFields(plan, ft, index, visited) } } // fieldByIndexAlloc returns the field of v at the given index path, // allocating intermediate embedded pointers as needed. -func fieldByIndexAlloc(v reflect.Value, index []int) reflect.Value { +func fieldByIndexAlloc(v reflect.Value, index []int) (reflect.Value, error) { // Fast path for non-embedded fields, which have a single-element index: // no intermediate pointer dereferencing is possible. if len(index) == 1 { - return v.Field(index[0]) + return v.Field(index[0]), nil } for i, x := range index { if i > 0 { for v.Kind() == reflect.Ptr { if v.IsNil() { + if !v.CanSet() { + // A nil embedded pointer of unexported type cannot be + // allocated: reflect forbids setting it. Match + // encoding/json and report it instead of panicking. + return reflect.Value{}, fmt.Errorf("toml: cannot set embedded pointer to unexported struct: %s", v.Type().Elem()) + } v.Set(reflect.New(v.Type().Elem())) } v = v.Elem() @@ -2335,5 +2392,5 @@ func fieldByIndexAlloc(v reflect.Value, index []int) reflect.Value { } v = v.Field(x) } - return v + return v, nil } diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go index 54b19f9dd..f1912f77b 100644 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go @@ -33,7 +33,7 @@ const ( Float // Integer represents an integer value. Integer - // LocalDate represents a a local date value. + // LocalDate represents a local date value. LocalDate // LocalTime represents a local time value. LocalTime diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go new file mode 100644 index 000000000..40c2e9780 --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go @@ -0,0 +1,29 @@ +package unstable + +// Marshaler is implemented by types that can marshal themselves into a raw +// TOML description. The returned bytes are spliced verbatim into the encoded +// document, so they must be valid TOML for the position they end up in: +// +// - A single value (string, integer, array, inline table, …) is emitted +// inline, as in `key = `. +// - One or more key-value lines (optionally with relative sub-table headers) +// is emitted as the body of a `[key]` table. +// - At the document root, the bytes are emitted as the whole document. +// +// The encoder decides between those forms by parsing the returned bytes, and +// reports an error when they are not valid TOML for their position; see +// Encoder.EnableMarshalerInterface in the root toml package. MarshalTOML can +// be called more than once for the same value during a single encode, so it +// must be deterministic. +// +// Marshaler is the encoding counterpart of Unmarshaler. +type Marshaler interface { + MarshalTOML() ([]byte, error) +} + +// MarshalTOML implements Marshaler. It returns the raw TOML bytes verbatim, +// mirroring json.RawMessage.MarshalJSON. The value receiver means both +// RawMessage and *RawMessage satisfy Marshaler. +func (m RawMessage) MarshalTOML() ([]byte, error) { + return []byte(m), nil +} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go index 91e226998..cf72bb744 100644 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go @@ -55,8 +55,21 @@ type Parser struct { left []byte nodes []Node err error + + // nesting is the current depth of nested arrays and inline tables being + // parsed. It guards parseVal/parseValArray/parseInlineTable against + // unbounded mutual recursion, which would otherwise let a deeply nested + // document overflow the goroutine stack (an unrecoverable fatal error). + nesting int } +// maxValueNesting is the maximum depth of nested arrays and inline tables the +// parser accepts. Beyond it, parsing fails with a ParserError instead of +// risking a stack overflow. Real-world TOML documents nest only a handful of +// levels deep, so this bound is generous; it matches the limit used by the +// standard library's encoding/json. +const maxValueNesting = 10000 + // Data returns the slice provided to the last call to Reset. func (p *Parser) Data() []byte { return p.data @@ -92,6 +105,7 @@ func (p *Parser) Reset(b []byte) { p.left = b p.nodes = p.nodes[:0] p.err = nil + p.nesting = 0 } // Error returns any error that has occurred during parsing. @@ -513,10 +527,24 @@ func (p *Parser) parseVal(b []byte) (int32, []byte, error) { return p.parseKeyword(b, "inf", Float) case c == 'n': return p.parseKeyword(b, "nan", Float) - case c == '[': - return p.parseValArray(b) - case c == '{': - return p.parseInlineTable(b) + case c == '[' || c == '{': + // Arrays and inline tables recurse back into parseVal for each of + // their elements. Bound that recursion so a document with millions of + // nested brackets or braces cannot overflow the goroutine stack. + if p.nesting >= maxValueNesting { + return 0, nil, NewParserError(b[:1], "arrays and inline tables are nested more than the maximum of %d levels deep", maxValueNesting) + } + p.nesting++ + var h int32 + var rest []byte + var err error + if c == '[' { + h, rest, err = p.parseValArray(b) + } else { + h, rest, err = p.parseInlineTable(b) + } + p.nesting-- + return h, rest, err case c == '+' || c == '-': return p.parseIntOrFloat(b) case c >= '0' && c <= '9': diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go index e417040a6..c84c90ccf 100644 --- a/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go @@ -7,14 +7,20 @@ package unstable // For tables (including split tables defined in multiple places), the data // contains the raw key-value bytes from the original document with adjusted // table headers to be relative to the unmarshaling target. +// +// When the decoding target itself implements this interface, it receives the +// whole document — every top-level key-value as well as every table and array +// table — assembled into a single valid TOML document and delivered once. type Unmarshaler interface { UnmarshalTOML(data []byte) error } -// RawMessage is a raw encoded TOML value. It implements Unmarshaler and can -// be used to delay TOML decoding or capture raw content. +// RawMessage is a raw encoded TOML value. It implements both Unmarshaler and +// Marshaler and can be used to delay TOML decoding or capture raw content, +// similar to json.RawMessage. // -// Example usage: +// Decoding (requires Decoder.EnableUnmarshalerInterface) captures the raw TOML +// bytes for the target without decoding them: // // type Config struct { // Plugin RawMessage `toml:"plugin"` @@ -23,6 +29,11 @@ type Unmarshaler interface { // var cfg Config // toml.NewDecoder(r).EnableUnmarshalerInterface().Decode(&cfg) // // cfg.Plugin now contains the raw TOML bytes for [plugin] +// +// Encoding (requires Encoder.EnableMarshalerInterface) splices the stored bytes +// back into the document verbatim: +// +// toml.NewEncoder(w).EnableMarshalerInterface().Encode(cfg) type RawMessage []byte // UnmarshalTOML implements Unmarshaler. diff --git a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go index bd6ffe28d..2fe74b772 100644 --- a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("1.70.0") + version := semver.MustParse("1.70.1") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := semver.MustParse("1.70.0") + version := semver.MustParse("1.70.1") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json index 7c59d4613..c5ca70cb6 100644 --- a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "aws-native", - "version": "1.70.0" + "version": "1.70.1" } diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go index a06f62143..c005a8234 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go @@ -742,6 +742,13 @@ func NewImage(ctx *pulumi.Context, if args.Network == nil { args.Network = NetworkMode("default") } + if args.Secrets != nil { + args.Secrets = pulumi.ToSecret(args.Secrets).(pulumi.StringMapInput) + } + secrets := pulumi.AdditionalSecretOutputs([]string{ + "secrets", + }) + opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Image err := ctx.RegisterResource("docker-build:index:Image", name, args, &resource, opts...) diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go index 5bf858ddf..2437e7285 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("0.0.19") + version := semver.MustParse("0.0.20") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := semver.MustParse("0.0.19") + version := semver.MustParse("0.0.20") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json index 3049ff9dc..eee8cdefd 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "docker-build", - "version": "0.0.19" + "version": "0.0.20" } diff --git a/vendor/modules.txt b/vendor/modules.txt index e619f9117..aa9e2639f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -174,7 +174,7 @@ github.com/IBM-Cloud/power-go-client/power/client/storage_types github.com/IBM-Cloud/power-go-client/power/client/swagger_spec github.com/IBM-Cloud/power-go-client/power/client/workspaces github.com/IBM-Cloud/power-go-client/power/models -# github.com/IBM/go-sdk-core/v5 v5.22.0 +# github.com/IBM/go-sdk-core/v5 v5.22.1 ## explicit; go 1.25.0 github.com/IBM/go-sdk-core/v5/core # github.com/IBM/platform-services-go-sdk v0.99.2 @@ -234,7 +234,7 @@ github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter -# github.com/aws/aws-sdk-go-v2 v1.42.0 +# github.com/aws/aws-sdk-go-v2 v1.42.1 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn @@ -261,15 +261,15 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 +# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.32.25 +# github.com/aws/aws-sdk-go-v2/config v1.32.28 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/config/internal/ini -# github.com/aws/aws-sdk-go-v2/credentials v1.19.24 +# github.com/aws/aws-sdk-go-v2/credentials v1.19.27 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -279,17 +279,17 @@ github.com/aws/aws-sdk-go-v2/credentials/logincreds github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 +# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto @@ -311,16 +311,16 @@ github.com/aws/aws-sdk-go-v2/service/ecs/types github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints github.com/aws/aws-sdk-go-v2/service/iam/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 +# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/checksum -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 +# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn @@ -337,27 +337,27 @@ github.com/aws/aws-sdk-go-v2/service/s3/internal/arn github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints github.com/aws/aws-sdk-go-v2/service/s3/types -# github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 +# github.com/aws/aws-sdk-go-v2/service/signin v1.3.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/signin github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints github.com/aws/aws-sdk-go-v2/service/signin/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 +# github.com/aws/aws-sdk-go-v2/service/sso v1.32.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 +# github.com/aws/aws-sdk-go-v2/service/sts v1.44.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.27.2 +# github.com/aws/smithy-go v1.27.3 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth @@ -581,7 +581,7 @@ github.com/go-logr/logr/funcr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr -# github.com/go-openapi/analysis v0.25.2 +# github.com/go-openapi/analysis v0.25.3 ## explicit; go 1.25.0 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal/debug @@ -623,7 +623,7 @@ github.com/go-openapi/runtime/server-middleware/negotiate/header # github.com/go-openapi/spec v0.22.6 ## explicit; go 1.25.0 github.com/go-openapi/spec -# github.com/go-openapi/strfmt v0.26.3 +# github.com/go-openapi/strfmt v0.26.4 ## explicit; go 1.25.0 github.com/go-openapi/strfmt github.com/go-openapi/strfmt/internal/bsonlite @@ -831,7 +831,7 @@ github.com/opentracing/opentracing-go/log # github.com/patrickmn/go-cache v2.1.0+incompatible ## explicit github.com/patrickmn/go-cache -# github.com/pelletier/go-toml/v2 v2.4.2 +# github.com/pelletier/go-toml/v2 v2.4.3 ## explicit; go 1.21.0 github.com/pelletier/go-toml/v2 github.com/pelletier/go-toml/v2/internal/parserbridge @@ -875,7 +875,7 @@ github.com/pulumi/esc/internal/util github.com/pulumi/esc/schema github.com/pulumi/esc/syntax github.com/pulumi/esc/syntax/encoding -# github.com/pulumi/pulumi-aws-native/sdk v1.70.0 +# github.com/pulumi/pulumi-aws-native/sdk v1.70.1 ## explicit; go 1.25.6 github.com/pulumi/pulumi-aws-native/sdk/go/aws github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal @@ -926,7 +926,7 @@ github.com/pulumi/pulumi-azure-native-sdk/v3/utilities ## explicit; go 1.24.7 github.com/pulumi/pulumi-command/sdk/go/command/internal github.com/pulumi/pulumi-command/sdk/go/command/remote -# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 +# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.20 ## explicit; go 1.25.8 github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal @@ -1622,13 +1622,13 @@ sigs.k8s.io/json/internal/golang/encoding/json ## explicit; go 1.18 sigs.k8s.io/randfill sigs.k8s.io/randfill/bytesource -# sigs.k8s.io/structured-merge-diff/v6 v6.4.0 +# sigs.k8s.io/structured-merge-diff/v6 v6.4.1 ## explicit; go 1.23 sigs.k8s.io/structured-merge-diff/v6/value # sigs.k8s.io/yaml v1.6.0 ## explicit; go 1.22 sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 -# github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 -# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 -# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 +# github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.1 +# github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.8 +# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.5 diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go index 75b7085c3..f4f4c2b44 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go @@ -39,14 +39,28 @@ type UnstructuredConverter interface { ToUnstructured() interface{} } +// UnstructuredConverterWithError is implemented instead of UnstructuredConverter by types for which +// some, but not all, values can be converted directly to unstructured. If a type implements both +// UnstructuredConverter and UnstructuredConverterWithError, its UnstructuredConverterWithError +// implementation takes precedence during conversion. +type UnstructuredConverterWithError interface { + json.Marshaler // require that json.Marshaler is implemented + + // ToUnstructured returns the unstructured representation, or a non-nil error if the value + // cannot be converted to unstructured. + ToUnstructuredWithError() (any, error) +} + // TypeReflectCacheEntry keeps data gathered using reflection about how a type is converted to/from unstructured. type TypeReflectCacheEntry struct { - isJsonMarshaler bool - ptrIsJsonMarshaler bool - isJsonUnmarshaler bool - ptrIsJsonUnmarshaler bool - isStringConvertable bool - ptrIsStringConvertable bool + isJsonMarshaler bool + ptrIsJsonMarshaler bool + isJsonUnmarshaler bool + ptrIsJsonUnmarshaler bool + isUnstructuredConverter bool + ptrIsUnstructuredConverter bool + isUnstructuredConverterWithError bool + ptrIsUnstructuredConverterWithError bool structFields map[string]*FieldCacheEntry orderedStructFields []*FieldCacheEntry @@ -93,9 +107,10 @@ func (f *FieldCacheEntry) GetFrom(structVal reflect.Value) reflect.Value { return structVal } -var marshalerType = reflect.TypeOf(new(json.Marshaler)).Elem() -var unmarshalerType = reflect.TypeOf(new(json.Unmarshaler)).Elem() -var unstructuredConvertableType = reflect.TypeOf(new(UnstructuredConverter)).Elem() +var marshalerType = reflect.TypeFor[json.Marshaler]() +var unmarshalerType = reflect.TypeFor[json.Unmarshaler]() +var unstructuredConverterType = reflect.TypeFor[UnstructuredConverter]() +var unstructuredConverterWithErrorType = reflect.TypeFor[UnstructuredConverterWithError]() var defaultReflectCache = newReflectCache() // TypeReflectEntryOf returns the TypeReflectCacheEntry of the provided reflect.Type. @@ -122,11 +137,13 @@ func typeReflectEntryOf(cm reflectCacheMap, t reflect.Type, updates reflectCache return record } typeEntry := &TypeReflectCacheEntry{ - isJsonMarshaler: t.Implements(marshalerType), - ptrIsJsonMarshaler: reflect.PtrTo(t).Implements(marshalerType), - isJsonUnmarshaler: reflect.PtrTo(t).Implements(unmarshalerType), - isStringConvertable: t.Implements(unstructuredConvertableType), - ptrIsStringConvertable: reflect.PtrTo(t).Implements(unstructuredConvertableType), + isJsonMarshaler: t.Implements(marshalerType), + ptrIsJsonMarshaler: reflect.PointerTo(t).Implements(marshalerType), + isJsonUnmarshaler: reflect.PointerTo(t).Implements(unmarshalerType), + isUnstructuredConverter: t.Implements(unstructuredConverterType), + ptrIsUnstructuredConverter: reflect.PointerTo(t).Implements(unstructuredConverterType), + isUnstructuredConverterWithError: t.Implements(unstructuredConverterWithErrorType), + ptrIsUnstructuredConverterWithError: reflect.PointerTo(t).Implements(unstructuredConverterWithErrorType), } if t.Kind() == reflect.Struct { fieldEntries := map[string]*FieldCacheEntry{} @@ -190,7 +207,7 @@ func (e TypeReflectCacheEntry) OrderedFields() []*FieldCacheEntry { // CanConvertToUnstructured returns true if this TypeReflectCacheEntry can convert values of its type to unstructured. func (e TypeReflectCacheEntry) CanConvertToUnstructured() bool { - return e.isJsonMarshaler || e.ptrIsJsonMarshaler || e.isStringConvertable || e.ptrIsStringConvertable + return e.isJsonMarshaler || e.ptrIsJsonMarshaler || e.isUnstructuredConverter || e.ptrIsUnstructuredConverter || e.isUnstructuredConverterWithError || e.ptrIsUnstructuredConverterWithError } // ToUnstructured converts the provided value to unstructured and returns it. @@ -206,7 +223,7 @@ func (e TypeReflectCacheEntry) ToUnstructured(sv reflect.Value) (interface{}, er // Check if the object has a custom string converter and use it if available, since it is much more efficient // than round tripping through json. if converter, ok := e.getUnstructuredConverter(sv); ok { - return converter.ToUnstructured(), nil + return converter.ToUnstructuredWithError() } // Check if the object has a custom JSON marshaller/unmarshaller. if marshaler, ok := e.getJsonMarshaler(sv); ok { @@ -318,16 +335,26 @@ func (e TypeReflectCacheEntry) getJsonUnmarshaler(v reflect.Value) (json.Unmarsh return v.Addr().Interface().(json.Unmarshaler), true } -func (e TypeReflectCacheEntry) getUnstructuredConverter(v reflect.Value) (UnstructuredConverter, bool) { - if e.isStringConvertable { - return v.Interface().(UnstructuredConverter), true - } - if e.ptrIsStringConvertable { +type unstructuredConverterWithNilError struct { + UnstructuredConverter +} + +func (c unstructuredConverterWithNilError) ToUnstructuredWithError() (any, error) { + return c.UnstructuredConverter.ToUnstructured(), nil +} + +func (e TypeReflectCacheEntry) getUnstructuredConverter(v reflect.Value) (UnstructuredConverterWithError, bool) { + switch { + case e.isUnstructuredConverterWithError: + return v.Interface().(UnstructuredConverterWithError), true + case e.ptrIsUnstructuredConverterWithError && v.CanAddr(): // Check pointer receivers if v is not a pointer - if v.CanAddr() { - v = v.Addr() - return v.Interface().(UnstructuredConverter), true - } + return v.Addr().Interface().(UnstructuredConverterWithError), true + case e.isUnstructuredConverter: + return unstructuredConverterWithNilError{v.Interface().(UnstructuredConverter)}, true + case e.ptrIsUnstructuredConverter && v.CanAddr(): + // Check pointer receivers if v is not a pointer + return unstructuredConverterWithNilError{v.Addr().Interface().(UnstructuredConverter)}, true } return nil, false } diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go index 140b99038..167848ebe 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go @@ -118,6 +118,11 @@ func readJSONIter(iter *jsoniter.Iterator) (Value, error) { if iter.Error != nil && iter.Error != io.EOF { return nil, iter.Error } + if iter.WhatIsNext(); iter.Error == nil { + // Piggy back on scanner aware error reporting here. + iter.ReportError("managedFields parsing", "unexpected trailing data after JSON object") + return nil, iter.Error + } return NewValueInterface(v), nil }