From fd2597410992fb044a3d8861ac38321bad5f9752 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Wed, 6 Sep 2023 20:46:05 +0000 Subject: [PATCH] lint and update protbuf and yaml --- cli/Makefile | 4 +- cli/bpbuild/build.go | 8 +- cli/bpbuild/cmd.go | 1 - cli/bpcatalog/cmd.go | 1 - cli/bpcatalog/gh.go | 2 +- cli/bpcatalog/render_test.go | 3 +- cli/bpcatalog/tf.go | 4 +- cli/bpcatalog/tf_test.go | 2 +- cli/bpmetadata/markdown_test.go | 16 +-- cli/bpmetadata/path.go | 6 +- cli/bpmetadata/path_test.go | 18 +-- cli/bpmetadata/repo.go | 2 +- .../schema/gcp-blueprint-metadata.json | 30 ++--- cli/bpmetadata/tfconfig.go | 2 +- cli/bpmetadata/tfconfig_test.go | 1 - cli/bpmetadata/validate.go | 6 +- cli/bptest/cmd.go | 4 +- cli/bptest/convert.go | 28 ++--- cli/bptest/init.go | 10 +- cli/bptest/list.go | 1 - cli/bptest/list_test.go | 2 +- cli/bptest/run.go | 7 +- cli/bptest/run_test.go | 1 - cli/bptest/stages_test.go | 1 - .../{intergration => integration}/.gitkeep | 0 .../bar/.gitkeep | 0 .../bar/bar_test.go | 0 .../discover_test.go | 0 .../foo/.gitkeep | 0 .../foo/foo_test.go | 0 .../quuz/quuz_test.go | 0 cli/cmd/version_test.go | 1 - cli/go.mod | 16 ++- cli/go.sum | 112 ++---------------- cli/launchpad/folder_test.go | 3 +- cli/launchpad/root.go | 2 +- cli/launchpad/runtime_test.go | 3 +- cli/report/cmd.go | 1 - cli/scorecard/cmd.go | 1 - cli/scorecard/proto.go | 27 ++--- cli/scorecard/score.go | 1 - cli/scorecard/violations_test.go | 1 - cli/util/file.go | 10 +- cli/util/file_test.go | 2 +- 44 files changed, 111 insertions(+), 229 deletions(-) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/.gitkeep (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/bar/.gitkeep (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/bar/bar_test.go (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/discover_test.go (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/foo/.gitkeep (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/foo/foo_test.go (100%) rename cli/bptest/testdata/with-discovery/test/{intergration => integration}/quuz/quuz_test.go (100%) diff --git a/cli/Makefile b/cli/Makefile index 44c741ed5d1..d7a8da2c33b 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -1,7 +1,7 @@ SHELL := /bin/bash # Changing this value will trigger a new release -VERSION=v1.2.4 +VERSION=v1.2.5 BINARY=bin/cft GITHUB_REPO=github.com/GoogleCloudPlatform/cloud-foundation-toolkit PLATFORMS := linux windows darwin @@ -12,7 +12,7 @@ INT_TEST_DIR=./bpmetadata/int-test SCHEMA_DIR=./bpmetadata/schema SRC_PROTO_DIR=./bpmetadata/proto PROTOC_DIR=./bpmetadata -DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.15 +DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.14 DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools REGISTRY_URL := gcr.io/cloud-foundation-cicd diff --git a/cli/bpbuild/build.go b/cli/bpbuild/build.go index 1eacf702cc3..1e6b7ae22d5 100644 --- a/cli/bpbuild/build.go +++ b/cli/bpbuild/build.go @@ -7,7 +7,7 @@ import ( "time" cloudbuild "google.golang.org/api/cloudbuild/v1" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) const ( @@ -22,12 +22,12 @@ func getCBBuildsWithFilter(projectID string, filter string, cFilters []clientBui ctx := context.Background() cloudbuildService, err := cloudbuild.NewService(ctx) if err != nil { - return nil, fmt.Errorf("error creating cloudbuild service: %v", err) + return nil, fmt.Errorf("error creating cloudbuild service: %w", err) } c, err := cloudbuildService.Projects.Builds.List(projectID).Filter(filter).Do() if err != nil { - return nil, fmt.Errorf("error listing builds with filter %s in project %s: %v", filter, projectID, err) + return nil, fmt.Errorf("error listing builds with filter %s in project %s: %w", filter, projectID, err) } cbBuilds := []*cloudbuild.Build{} @@ -56,7 +56,7 @@ func getCBBuildsWithFilter(projectID string, filter string, cFilters []clientBui for { c, err = cloudbuildService.Projects.Builds.List(projectID).Filter(filter).PageToken(c.NextPageToken).Do() if err != nil { - return nil, fmt.Errorf("error retriving next page with token %s: %v", c.NextPageToken, err) + return nil, fmt.Errorf("error retrieving next page with token %s: %w", c.NextPageToken, err) } appendClientFilteredBuilds(c.Builds) if c.NextPageToken == "" { diff --git a/cli/bpbuild/cmd.go b/cli/bpbuild/cmd.go index 58a23293a29..0d241daa9ed 100644 --- a/cli/bpbuild/cmd.go +++ b/cli/bpbuild/cmd.go @@ -34,7 +34,6 @@ func init() { avgTimeCmd.Flags().StringVar(&avgTimeFlags.lookUpEnd, "end-time", "", "Time to stop computing build step avg in form MM-DD-YYYY. Defaults to current date.") avgTimeCmd.Flags().StringVar(&avgTimeFlags.projectId, "project-id", "cloud-foundation-cicd", "Project ID where builds are executed.") avgTimeCmd.Flags().StringVar(&avgTimeFlags.repoName, "repo", "", "Name of repo that triggered the builds. Defaults to extracting from git config.") - } var Cmd = &cobra.Command{ diff --git a/cli/bpcatalog/cmd.go b/cli/bpcatalog/cmd.go index 539605b6bd3..5fac40bb326 100644 --- a/cli/bpcatalog/cmd.go +++ b/cli/bpcatalog/cmd.go @@ -36,7 +36,6 @@ func init() { listCmd.Flags().Var(&catalogListFlags.format, "format", fmt.Sprintf("Format to display catalog. Defaults to table. Options are %+v.", renderFormats)) listCmd.Flags().Var(&catalogListFlags.sort, "sort", fmt.Sprintf("Sort results. Defaults to created date. Options are %+v.", sortOptions)) - } var Cmd = &cobra.Command{ diff --git a/cli/bpcatalog/gh.go b/cli/bpcatalog/gh.go index ce4cc44f9cf..9b95a5551a2 100644 --- a/cli/bpcatalog/gh.go +++ b/cli/bpcatalog/gh.go @@ -7,7 +7,7 @@ import ( "os" "sort" - "github.com/google/go-github/v53/github" + "github.com/google/go-github/v55/github" "golang.org/x/oauth2" ) diff --git a/cli/bpcatalog/render_test.go b/cli/bpcatalog/render_test.go index e12b0105f39..c26d59f9d47 100644 --- a/cli/bpcatalog/render_test.go +++ b/cli/bpcatalog/render_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/google/go-github/v53/github" + "github.com/google/go-github/v55/github" "github.com/stretchr/testify/assert" ) @@ -305,7 +305,6 @@ func TestRenderDocHTML(t *testing.T) { updateExpected(t, expectedPath, got) expected := readFile(t, expectedPath) assert.Equal(t, expected, got) - }) } } diff --git a/cli/bpcatalog/tf.go b/cli/bpcatalog/tf.go index 01d1d5b8af3..5b828648605 100644 --- a/cli/bpcatalog/tf.go +++ b/cli/bpcatalog/tf.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/google/go-github/v53/github" + "github.com/google/go-github/v55/github" ) // sortOption defines the set of sort options for catalog. @@ -55,7 +55,7 @@ var ( func fetchSortedTFRepos(gh *ghService, sortOpt sortOption) (repos, error) { repos, err := gh.fetchRepos() if err != nil { - return nil, fmt.Errorf("error fetching repos: %v", err) + return nil, fmt.Errorf("error fetching repos: %w", err) } repos = repos.filter(func(r *github.Repository) bool { if r.GetArchived() { diff --git a/cli/bpcatalog/tf_test.go b/cli/bpcatalog/tf_test.go index 488d68804df..e5dd5d62f1a 100644 --- a/cli/bpcatalog/tf_test.go +++ b/cli/bpcatalog/tf_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/google/go-github/v53/github" + "github.com/google/go-github/v55/github" "github.com/migueleliasweb/go-github-mock/src/mock" "github.com/stretchr/testify/assert" ) diff --git a/cli/bpmetadata/markdown_test.go b/cli/bpmetadata/markdown_test.go index 1765f407c98..b76426449f9 100644 --- a/cli/bpmetadata/markdown_test.go +++ b/cli/bpmetadata/markdown_test.go @@ -100,10 +100,10 @@ func TestProcessMarkdownContent(t *testing.T) { getContent: true, want: &mdContent{ listItems: []mdListItem{ - mdListItem{ + { text: "User requests are sent to the front end, which is deployed on two Cloud Run services as containers to support high scalability applications.", }, - mdListItem{ + { text: "The request then lands on the middle tier, which is the API layer that provides access to the backend. This is also deployed on Cloud Run for scalability and ease of deployment in multiple languages. This middleware is a Golang based API.", }, }, @@ -127,19 +127,19 @@ func TestProcessMarkdownContent(t *testing.T) { getContent: true, want: &mdContent{ listItems: []mdListItem{ - mdListItem{ + { text: "document-01", url: "http://google.com/doc-01", }, - mdListItem{ + { text: "document-02", url: "http://google.com/doc-02", }, - mdListItem{ + { text: "document-03", url: "http://google.com/doc-03", }, - mdListItem{ + { text: "document-04", url: "http://google.com/doc-04", }, @@ -155,10 +155,10 @@ func TestProcessMarkdownContent(t *testing.T) { getContent: true, want: &mdContent{ listItems: []mdListItem{ - mdListItem{ + { text: "text-document-01", }, - mdListItem{ + { text: "text-document-02", }, }, diff --git a/cli/bpmetadata/path.go b/cli/bpmetadata/path.go index a5b8b297ecb..4556f0a8611 100644 --- a/cli/bpmetadata/path.go +++ b/cli/bpmetadata/path.go @@ -23,7 +23,7 @@ var ( func fileExists(path string) (bool, error) { info, err := os.Stat(path) if err != nil { - return false, fmt.Errorf("unable to read file at the provided path: %v", err) + return false, fmt.Errorf("unable to read file at the provided path: %w", err) } if info.IsDir() { @@ -48,7 +48,7 @@ func getDirPaths(configPath string, re *regexp.Regexp) ([]*BlueprintMiscContent, paths := []*BlueprintMiscContent{} err := filepath.Walk(configPath, func(path string, info fs.FileInfo, err error) error { if err != nil { - return fmt.Errorf("error accessing examples in the path %q: %v", configPath, err) + return fmt.Errorf("error accessing examples in the path %q: %w", configPath, err) } // skip if this is a .terraform dir @@ -74,7 +74,7 @@ func getDirPaths(configPath string, re *regexp.Regexp) ([]*BlueprintMiscContent, }) if err != nil { - return nil, fmt.Errorf("error accessing examples in the path %q: %v", configPath, err) + return nil, fmt.Errorf("error accessing examples in the path %q: %w", configPath, err) } // Sort by configPath name before returning diff --git a/cli/bpmetadata/path_test.go b/cli/bpmetadata/path_test.go index 993010f5dbf..7651c49dc75 100644 --- a/cli/bpmetadata/path_test.go +++ b/cli/bpmetadata/path_test.go @@ -65,19 +65,19 @@ func TestDirContent(t *testing.T) { path: "content/examples", regex: regexExamples, want: []*BlueprintMiscContent{ - &BlueprintMiscContent{ + { Name: "terraform", Location: "examples/acm/acm-terraform-blog-part1/terraform", }, - &BlueprintMiscContent{ + { Name: "acm-terraform-blog-part2", Location: "examples/acm/acm-terraform-blog-part2", }, - &BlueprintMiscContent{ + { Name: "simple_regional", Location: "examples/simple_regional", }, - &BlueprintMiscContent{ + { Name: "simple_regional_beta", Location: "examples/simple_regional_beta", }, @@ -89,15 +89,15 @@ func TestDirContent(t *testing.T) { path: "content/modules", regex: regexModules, want: []*BlueprintMiscContent{ - &BlueprintMiscContent{ + { Name: "beta-public-cluster", Location: "modules/beta-public-cluster", }, - &BlueprintMiscContent{ + { Name: "binary-authorization", Location: "modules/binary-authorization", }, - &BlueprintMiscContent{ + { Name: "private-cluster", Location: "modules/private-cluster", }, @@ -115,11 +115,11 @@ func TestDirContent(t *testing.T) { path: "content/examples-some-without-tf/examples", regex: regexExamples, want: []*BlueprintMiscContent{ - &BlueprintMiscContent{ + { Name: "terraform", Location: "examples/acm/acm-terraform-blog-part1/terraform", }, - &BlueprintMiscContent{ + { Name: "simple_regional", Location: "examples/simple_regional", }, diff --git a/cli/bpmetadata/repo.go b/cli/bpmetadata/repo.go index 406bc61d751..7c311abb58b 100644 --- a/cli/bpmetadata/repo.go +++ b/cli/bpmetadata/repo.go @@ -34,7 +34,7 @@ func getRepoDetailsByPath(bpPath string, r *repoDetail, readme []byte) { // if it's still in memory. if strings.Contains(bpPath, nestedBpPath) && r.Source != nil { // try to parse the module name from MD which will get - // overriden with "["repoName-submoduleName" if repoName is available + // overridden with "["repoName-submoduleName" if repoName is available r.ModuleName = parseRepoNameFromMd(readme) if r.RepoName != "" { r.ModuleName = r.RepoName + "-" + getBpSubmoduleNameInKebabCase(bpPath) diff --git a/cli/bpmetadata/schema/gcp-blueprint-metadata.json b/cli/bpmetadata/schema/gcp-blueprint-metadata.json index d93b3be2e39..9a74aeb9114 100644 --- a/cli/bpmetadata/schema/gcp-blueprint-metadata.json +++ b/cli/bpmetadata/schema/gcp-blueprint-metadata.json @@ -381,10 +381,8 @@ ] }, "quotaType": { - "patternProperties": { - ".*": { - "type": "string" - } + "additionalProperties": { + "type": "string" }, "type": "object" } @@ -543,10 +541,8 @@ "BlueprintUIInput": { "properties": { "variables": { - "patternProperties": { - ".*": { - "$ref": "#/$defs/DisplayVariable" - } + "additionalProperties": { + "$ref": "#/$defs/DisplayVariable" }, "type": "object" }, @@ -572,10 +568,8 @@ "type": "array" }, "outputs": { - "patternProperties": { - ".*": { - "$ref": "#/$defs/DisplayOutput" - } + "additionalProperties": { + "$ref": "#/$defs/DisplayOutput" }, "type": "object" } @@ -998,18 +992,14 @@ "type": "string" }, "labels": { - "patternProperties": { - ".*": { - "type": "string" - } + "additionalProperties": { + "type": "string" }, "type": "object" }, "annotations": { - "patternProperties": { - ".*": { - "type": "string" - } + "additionalProperties": { + "type": "string" }, "type": "object" } diff --git a/cli/bpmetadata/tfconfig.go b/cli/bpmetadata/tfconfig.go index 41c810c88bc..b22bd1a1fe5 100644 --- a/cli/bpmetadata/tfconfig.go +++ b/cli/bpmetadata/tfconfig.go @@ -91,7 +91,7 @@ func getBlueprintVersion(configPath string) (*blueprintVersion, error) { //parse out the blueprint version from the config modName, err := parseBlueprintVersion(versionsFile, diags) if err != nil { - return nil, fmt.Errorf("error parsing blueprint version: %v", err) + return nil, fmt.Errorf("error parsing blueprint version: %w", err) } //parse out the required version from the config diff --git a/cli/bpmetadata/tfconfig_test.go b/cli/bpmetadata/tfconfig_test.go index 6abf9c6e556..7422969273c 100644 --- a/cli/bpmetadata/tfconfig_test.go +++ b/cli/bpmetadata/tfconfig_test.go @@ -174,7 +174,6 @@ func TestTFVersions(t *testing.T) { t.Errorf("getBlueprintVersion() = %v, want %v", got.moduleVersion, tt.wantModuleVersion) return } - } else { if tt.wantModuleVersion != "" && tt.wantRequiredVersion != "" { t.Errorf("getBlueprintVersion() = returned nil when we want core: %v and bpVersion: %v", tt.wantRequiredVersion, tt.wantModuleVersion) diff --git a/cli/bpmetadata/validate.go b/cli/bpmetadata/validate.go index 48f1b42e277..893d9ab8e82 100644 --- a/cli/bpmetadata/validate.go +++ b/cli/bpmetadata/validate.go @@ -54,7 +54,7 @@ func validateMetadataYaml(m string, schema gojsonschema.JSONLoader) error { // prepare metadata for validation by converting it from YAML to JSON mBytes, err := convertYamlToJson(m) if err != nil { - return fmt.Errorf("yaml to json conversion failed for metadata at path %s. error: %s", m, err) + return fmt.Errorf("yaml to json conversion failed for metadata at path %s. error: %w", m, err) } // load metadata from the path @@ -63,7 +63,7 @@ func validateMetadataYaml(m string, schema gojsonschema.JSONLoader) error { // validate metadata against the schema result, err := gojsonschema.Validate(schema, yamlLoader) if err != nil { - return fmt.Errorf("metadata validation failed for %s. error: %s", m, err) + return fmt.Errorf("metadata validation failed for %s. error: %w", m, err) } if !result.Valid() { @@ -84,7 +84,7 @@ func convertYamlToJson(m string) ([]byte, error) { // read metadata for validation b, err := os.ReadFile(m) if err != nil { - return nil, fmt.Errorf("unable to read metadata at path %s. error: %s", m, err) + return nil, fmt.Errorf("unable to read metadata at path %s. error: %w", m, err) } if len(b) == 0 { diff --git a/cli/bptest/cmd.go b/cli/bptest/cmd.go index db78079f7aa..8c3f0f856be 100644 --- a/cli/bptest/cmd.go +++ b/cli/bptest/cmd.go @@ -38,7 +38,7 @@ var Cmd = &cobra.Command{ var listCmd = &cobra.Command{ Use: "list", Short: "list tests", - Long: "Lists both auto discovered and explicit intergration tests", + Long: "Lists both auto discovered and explicit integration tests", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { @@ -80,7 +80,7 @@ var runCmd = &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { intTestDir, err := getIntTestDir(flags.testDir) if err != nil { - return fmt.Errorf("error discovering test dir: %v", err) + return fmt.Errorf("error discovering test dir: %w", err) } testStage, err := validateAndGetStage(flags.testStage) if err != nil { diff --git a/cli/bptest/convert.go b/cli/bptest/convert.go index 0426654b512..5854fac827e 100644 --- a/cli/bptest/convert.go +++ b/cli/bptest/convert.go @@ -55,42 +55,42 @@ func convertKitchenTests() error { } err = writeFile(path.Join(intTestPath, goModFilename), fmt.Sprintf(goMod, path.Base(cwd))) if err != nil { - return fmt.Errorf("error writing go mod file: %v", err) + return fmt.Errorf("error writing go mod file: %w", err) } // write discover test discoverTest, err := getTmplFileContents(discoverTestFilename) if err != nil { return err } - err = writeFile(path.Join(intTestPath, discoverTestFilename), string(discoverTest)) + err = writeFile(path.Join(intTestPath, discoverTestFilename), discoverTest) if err != nil { - return fmt.Errorf("error writing discover_test.go: %v", err) + return fmt.Errorf("error writing discover_test.go: %w", err) } testDirs, err := getCurrentTestDirs() if err != nil { - return fmt.Errorf("error getting current test dirs: %v", err) + return fmt.Errorf("error getting current test dirs: %w", err) } for _, dir := range testDirs { err = convertTest(path.Join(intTestPath, dir)) if err != nil { - return fmt.Errorf("error converting %s: %v", dir, err) + return fmt.Errorf("error converting %s: %w", dir, err) } } // remove kitchen err = os.Remove(".kitchen.yml") if err != nil { - return fmt.Errorf("error removing .kitchen.yml: %v", err) + return fmt.Errorf("error removing .kitchen.yml: %w", err) } // convert build file // We use build to identify commands to update and update the commands in the buildFile. // This minimizes unnecessary diffs in build yaml due to round tripping. build, buildFile, err := getBuildFromFile(intTestBuildFilePath) if err != nil { - return fmt.Errorf("error unmarshalling %s: %v", intTestBuildFilePath, err) + return fmt.Errorf("error unmarshalling %s: %w", intTestBuildFilePath, err) } newBuildFile, err := transformBuild(build, buildFile) if err != nil { - return fmt.Errorf("error transforming buildfile: %v", err) + return fmt.Errorf("error transforming buildfile: %w", err) } return writeFile(intTestBuildFilePath, newBuildFile) } @@ -115,12 +115,12 @@ func convertTest(dir string) error { // read inspec.yaml f, err := os.ReadFile(path.Join(dir, inspecInputsFile)) if err != nil { - return fmt.Errorf("error reading inspec file: %s", err) + return fmt.Errorf("error reading inspec file: %w", err) } var inspec inspecInputs err = yaml.Unmarshal(f, &inspec) if err != nil { - return fmt.Errorf("error unmarshalling inspec file: %s", err) + return fmt.Errorf("error unmarshalling inspec file: %w", err) } // get inspec input attributes var inputs []string @@ -131,17 +131,17 @@ func convertTest(dir string) error { testName := path.Base(dir) bpTest, err := getBPTestFromTmpl(testName, inputs) if err != nil { - return fmt.Errorf("error creating blueprint test: %s", err) + return fmt.Errorf("error creating blueprint test: %w", err) } // remove old test err = os.RemoveAll(dir) if err != nil { - return fmt.Errorf("error removing old test dir: %s", err) + return fmt.Errorf("error removing old test dir: %w", err) } // write bpt err = os.MkdirAll(dir, os.ModePerm) if err != nil { - return fmt.Errorf("error creating test dir: %s", err) + return fmt.Errorf("error creating test dir: %w", err) } return writeFile(path.Join(dir, fmt.Sprintf("%s_test.go", strcase.ToSnake(testName))), bpTest) } @@ -151,7 +151,7 @@ func getTmplFileContents(f string) (string, error) { tmplF := path.Join("templates", fmt.Sprintf("%s%s", f, tmplSuffix)) contents, err := templateFiles.ReadFile(tmplF) if err != nil { - return "", fmt.Errorf("error reading %s : %v", tmplF, err) + return "", fmt.Errorf("error reading %s : %w", tmplF, err) } return string(contents), nil } diff --git a/cli/bptest/init.go b/cli/bptest/init.go index c597edf79d0..f522db4a949 100644 --- a/cli/bptest/init.go +++ b/cli/bptest/init.go @@ -39,20 +39,20 @@ func initTest(name string) error { } err = writeFile(goModpath, fmt.Sprintf(goMod, path.Base(cwd))) if err != nil { - return fmt.Errorf("error writing go mod file: %v", err) + return fmt.Errorf("error writing go mod file: %w", err) } } // discover test configs testCfg, err := discovery.GetConfigDirFromTestDir(testDir) if err != nil { - return fmt.Errorf("unable to discover test configs for %s: %v", testDir, err) + return fmt.Errorf("unable to discover test configs for %s: %w", testDir, err) } // Parse config to expose outputs within test mod, diags := tfconfig.LoadModule(testCfg) if diags.HasErrors() { - return fmt.Errorf("error parsing outputs: %v", diags) + return fmt.Errorf("error parsing outputs: %w", diags) } outputs := make([]string, 0, len(mod.Outputs)) for _, op := range mod.Outputs { @@ -63,11 +63,11 @@ func initTest(name string) error { // render and write test testFile, err := getBPTestFromTmpl(name, outputs) if err != nil { - return fmt.Errorf("error creating blueprint test: %v", err) + return fmt.Errorf("error creating blueprint test: %w", err) } err = os.MkdirAll(testDir, os.ModePerm) if err != nil { - return fmt.Errorf("error creating test dir: %v", err) + return fmt.Errorf("error creating test dir: %w", err) } return writeFile(path.Join(testDir, fmt.Sprintf("%s_test.go", strcase.ToSnake(name))), testFile) } diff --git a/cli/bptest/list.go b/cli/bptest/list.go index 112b6cabb72..11c6d90773e 100644 --- a/cli/bptest/list.go +++ b/cli/bptest/list.go @@ -116,7 +116,6 @@ func getExplicitTests(intTestDir string) ([]bpTest, error) { for _, fnName := range testFns { eTests = append(eTests, bpTest{name: fnName, location: testFile, config: testCfg, bptestCfg: bptestCfg}) } - } sort.SliceStable(eTests, func(i, j int) bool { return eTests[i].name < eTests[j].name }) return eTests, nil diff --git a/cli/bptest/list_test.go b/cli/bptest/list_test.go index 59ed336a7cb..f12c8602bf5 100644 --- a/cli/bptest/list_test.go +++ b/cli/bptest/list_test.go @@ -11,7 +11,7 @@ import ( const ( testDirWithDiscovery = "testdata/with-discovery" - intTestDir = "test/intergration" + intTestDir = "test/integration" ) func TestGetDiscoveredTests(t *testing.T) { diff --git a/cli/bptest/run.go b/cli/bptest/run.go index 99ba709edb4..e1597e5d02a 100644 --- a/cli/bptest/run.go +++ b/cli/bptest/run.go @@ -22,7 +22,7 @@ const ( // The tfplan.json files that are being used as input for the terraform validation tests // through the gcloud beta terraform vet are higher than the buffer default value (64*1024), - // after some tests we had evidences that the value were arround from 3MB to 5MB, so + // after some tests we had evidences that the value were around from 3MB to 5MB, so // we choosed a value that is at least 2x higher than the original one to avoid errors. // maxScanTokenSize is the maximum size used to buffer a token // startBufSize is the initial of the buffer token @@ -87,20 +87,19 @@ func streamExec(cmd *exec.Cmd) error { fmt.Println(scanner.Text()) } if err := scanner.Err(); err != nil { - Log.Error(fmt.Sprintf("error reading output: %v", err)) + Log.Error(fmt.Sprintf("error reading output: %s", err)) } }() // run command if err := cmd.Run(); err != nil { - return fmt.Errorf("error running command: %v", err) + return fmt.Errorf("error running command: %w", err) } return nil } // getTestCmd returns a prepared cmd for running the specified tests(s) func getTestCmd(intTestDir string, testStage string, testName string, relTestPkg string) (*exec.Cmd, error) { - // pass all current env vars to test command env := os.Environ() // set test stage env var if specified diff --git a/cli/bptest/run_test.go b/cli/bptest/run_test.go index e74a8e16810..862eb53f956 100644 --- a/cli/bptest/run_test.go +++ b/cli/bptest/run_test.go @@ -62,7 +62,6 @@ func TestIsValidTestName(t *testing.T) { } func TestGetTestCmd(t *testing.T) { - tests := []struct { name string intTestDir string diff --git a/cli/bptest/stages_test.go b/cli/bptest/stages_test.go index ab55b8871c1..33197cd1103 100644 --- a/cli/bptest/stages_test.go +++ b/cli/bptest/stages_test.go @@ -7,7 +7,6 @@ import ( ) func TestValidateAndGetStage(t *testing.T) { - tests := []struct { name string stage string diff --git a/cli/bptest/testdata/with-discovery/test/intergration/.gitkeep b/cli/bptest/testdata/with-discovery/test/integration/.gitkeep similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/.gitkeep rename to cli/bptest/testdata/with-discovery/test/integration/.gitkeep diff --git a/cli/bptest/testdata/with-discovery/test/intergration/bar/.gitkeep b/cli/bptest/testdata/with-discovery/test/integration/bar/.gitkeep similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/bar/.gitkeep rename to cli/bptest/testdata/with-discovery/test/integration/bar/.gitkeep diff --git a/cli/bptest/testdata/with-discovery/test/intergration/bar/bar_test.go b/cli/bptest/testdata/with-discovery/test/integration/bar/bar_test.go similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/bar/bar_test.go rename to cli/bptest/testdata/with-discovery/test/integration/bar/bar_test.go diff --git a/cli/bptest/testdata/with-discovery/test/intergration/discover_test.go b/cli/bptest/testdata/with-discovery/test/integration/discover_test.go similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/discover_test.go rename to cli/bptest/testdata/with-discovery/test/integration/discover_test.go diff --git a/cli/bptest/testdata/with-discovery/test/intergration/foo/.gitkeep b/cli/bptest/testdata/with-discovery/test/integration/foo/.gitkeep similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/foo/.gitkeep rename to cli/bptest/testdata/with-discovery/test/integration/foo/.gitkeep diff --git a/cli/bptest/testdata/with-discovery/test/intergration/foo/foo_test.go b/cli/bptest/testdata/with-discovery/test/integration/foo/foo_test.go similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/foo/foo_test.go rename to cli/bptest/testdata/with-discovery/test/integration/foo/foo_test.go diff --git a/cli/bptest/testdata/with-discovery/test/intergration/quuz/quuz_test.go b/cli/bptest/testdata/with-discovery/test/integration/quuz/quuz_test.go similarity index 100% rename from cli/bptest/testdata/with-discovery/test/intergration/quuz/quuz_test.go rename to cli/bptest/testdata/with-discovery/test/integration/quuz/quuz_test.go diff --git a/cli/cmd/version_test.go b/cli/cmd/version_test.go index 2d584afc63b..b509c448fe7 100644 --- a/cli/cmd/version_test.go +++ b/cli/cmd/version_test.go @@ -22,7 +22,6 @@ func TestVersionCommand(t *testing.T) { } func TestVersionCommandHelp(t *testing.T) { - output, err := ExecuteCommand(rootCmd, "version", "-h") if !strings.HasPrefix(output, versionCmd.Long) { t.Errorf("Unexpected output: %v", output) diff --git a/cli/go.mod b/cli/go.mod index e01805e3c37..5a21f813a06 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -15,19 +15,18 @@ require ( github.com/golang/protobuf v1.5.3 github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 github.com/google/go-cmp v0.5.9 - github.com/google/go-github/v53 v53.0.0 - github.com/google/go-github/v54 v54.0.0 + github.com/google/go-github/v55 v55.0.0 github.com/hashicorp/hcl/v2 v2.18.0 github.com/hashicorp/terraform-config-inspect v0.0.0-20230825013512-b800820f61b8 github.com/iancoleman/strcase v0.3.0 - github.com/inconshreveable/log15 v0.0.0-20201112154412-8562bdadbbac - github.com/invopop/jsonschema v0.7.0 + github.com/inconshreveable/log15 v2.16.0+incompatible + github.com/invopop/jsonschema v0.8.0 github.com/jedib0t/go-pretty v4.3.0+incompatible github.com/jedib0t/go-pretty/v6 v6.4.7 github.com/manifoldco/promptui v0.9.0 github.com/migueleliasweb/go-github-mock v0.0.19 github.com/mitchellh/go-testing-interface v1.14.2-0.20210821155943-2d9075ca8770 - github.com/open-policy-agent/opa v0.55.0 + github.com/open-policy-agent/opa v0.56.0 github.com/otiai10/copy v1.12.0 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.7.0 @@ -35,11 +34,10 @@ require ( github.com/stretchr/testify v1.8.4 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 - golang.org/x/oauth2 v0.11.0 + golang.org/x/oauth2 v0.12.0 golang.org/x/text v0.13.0 google.golang.org/api v0.138.0 google.golang.org/protobuf v1.31.0 - gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 sigs.k8s.io/yaml v1.3.0 ) @@ -77,7 +75,6 @@ require ( github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gammazero/deque v0.2.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.4.1 // indirect @@ -100,9 +97,9 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/cel-go v0.12.6 // indirect github.com/google/gnostic v0.6.9 // indirect + github.com/google/go-github/v53 v53.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda // indirect github.com/google/s2a-go v0.1.5 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect @@ -190,6 +187,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/api v0.27.2 // indirect k8s.io/apiextensions-apiserver v0.27.2 // indirect k8s.io/apimachinery v0.27.2 // indirect diff --git a/cli/go.sum b/cli/go.sum index 26732f1bdb3..f5b7957a22c 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -17,12 +17,8 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go/accesscontextmanager v1.8.0 h1:cCPSztLzUx8OHoyRMcUOy4R/vGLYDk/7gZ5V5J/bbP0= -cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= cloud.google.com/go/accesscontextmanager v1.8.1 h1:WIAt9lW9AXtqw/bnvrEUaE8VG/7bAAeMzRCBGMkc4+w= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= cloud.google.com/go/asset v1.14.1 h1:vlHdznX70eYW4V1y1PxocvF6tEwxJTTarwIGwOhFF3U= @@ -33,8 +29,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.3 h1:DcTwsFgGev/wV5+q8o2fzgcHOaac+DKGC91ZlvpsQds= -cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= @@ -42,20 +36,12 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/longrunning v0.5.0 h1:DK8BH0+hS+DIvc9a2TPnteUievsTCH4ORMAASSb7JcQ= -cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= -cloud.google.com/go/orgpolicy v1.11.0 h1:1B0K72FucdwRWLRIuG9ExgPj/fkJyRAmvrpoI4vFUMM= -cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= cloud.google.com/go/orgpolicy v1.11.1 h1:I/7dHICQkNwym9erHqmlb50LRU588NPCvkfIY0Bx9jI= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= -cloud.google.com/go/osconfig v1.12.0 h1:+ENCeRbwYODEPhaFt7yBELUln129bX25JZSf8fpkgEI= -cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= cloud.google.com/go/osconfig v1.12.1 h1:dgyEHdfqML6cUW6/MkihNdTVc0INQst0qSE8Ou1ub9c= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -68,8 +54,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= cloud.google.com/go/storage v1.32.0 h1:5w6DxEGOnktmJHarxAOUywxVW9lbNWIzlzzUltG/3+o= cloud.google.com/go/storage v1.32.0/go.mod h1:Hhh/dogNRGca7IWv1RC2YqEn0c0G77ctA/OxflYkiD8= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= @@ -77,15 +61,10 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.7.0 h1:iRROly3NUxu/eskGvxk0TFm//GNdBJ3rnLqw/As8XbA= -github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.7.0/go.mod h1:8S915KxCJh7it4gn/J9o11FWD+F8IGhCGPITgFapzg8= github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.8.0 h1:qir5eatHmGiaQ7CobiEjdzNWeSZ9ytQixsDKdr0gvuA= github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.8.0/go.mod h1:KQlrvFQnkJHfAzJWKSC+JTGrXIBLI4UH8gLSh1EfoXM= -github.com/GoogleCloudPlatform/config-validator v0.0.0-20230815185018-1130fc57a588 h1:2OdoAD/+vVxfjcMy/Mm+B/n3kPO94VbzZ6xhf51OlbA= -github.com/GoogleCloudPlatform/config-validator v0.0.0-20230815185018-1130fc57a588/go.mod h1:B8Uh4ssEtdnp1Pnoj5ZlneoPGiTR6hkqowZ88DCc+CY= github.com/GoogleCloudPlatform/config-validator v0.0.0-20230824155412-0da46e6a67ad h1:JosY9Jj9NbPZIPxhMt2YAooduf+6OMT5XlStRJ2epaE= github.com/GoogleCloudPlatform/config-validator v0.0.0-20230824155412-0da46e6a67ad/go.mod h1:pW/8BBAWENpV8WiQELmsRySkvdTgE/+H4jBQxC/Fous= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -93,8 +72,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 h1:ZK3C5DtzV2nVAQTx5S5jQvMeDqWtD1By5mOoyY/xJek= -github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE= github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -109,7 +86,6 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= @@ -130,8 +106,6 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -199,7 +173,6 @@ github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA github.com/gammazero/deque v0.2.0/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= @@ -209,8 +182,6 @@ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmS github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= -github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= github.com/go-git/go-git/v5 v5.8.1/go.mod h1:FHFuoD6yGz5OSKEBK+aWN9Oah0q54Jxl0abmj6GnqAo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -329,8 +300,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/gomarkdown/markdown v0.0.0-20230322041520-c84983bdbf2a h1:AWZzzFrqyjYlRloN6edwTLTUbKxf5flLXNuTBDm3Ews= -github.com/gomarkdown/markdown v0.0.0-20230322041520-c84983bdbf2a/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -355,11 +324,11 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v53 v53.0.0 h1:T1RyHbSnpHYnoF0ZYKiIPSgPtuJ8G6vgc0MKodXsQDQ= github.com/google/go-github/v53 v53.0.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI= github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= -github.com/google/go-github/v54 v54.0.0/go.mod h1:Sw1LXWHhXRZtzJ9LI5fyJg9wbQzYvFhW8W5P2yaAQ7s= +github.com/google/go-github/v55 v55.0.0 h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg= +github.com/google/go-github/v55 v55.0.0/go.mod h1:JLahOTA1DnXzhxEymmFF5PP2tSS9JVNj68mSZNDwskA= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -381,10 +350,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda h1:KdHPvlgeNEDs8rae032MqFG8LVwcSEivcCjNdVOXRmg= -github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.5 h1:8IYp3w9nysqv3JH+NJgXJzGbDHzLOTj43BmSkp+O7qg= github.com/google/s2a-go v0.1.5/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -395,8 +361,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvki github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -417,38 +381,29 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= -github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= -github.com/hashicorp/terraform-config-inspect v0.0.0-20230614215431-f32df32a01cd h1:1uPcotqoL4TjcGKlgIe7OFSRplf7BMVtUjekwmCrvuM= -github.com/hashicorp/terraform-config-inspect v0.0.0-20230614215431-f32df32a01cd/go.mod h1:l8HcFPm9cQh6Q0KSWoYPiePqMvRFenybP1CH2MjKdlg= github.com/hashicorp/terraform-config-inspect v0.0.0-20230825013512-b800820f61b8 h1:SzE5lAYh9XXR3b1q3p3uBNqEY+syiiLZiFCIvr/JTsg= github.com/hashicorp/terraform-config-inspect v0.0.0-20230825013512-b800820f61b8/go.mod h1:l8HcFPm9cQh6Q0KSWoYPiePqMvRFenybP1CH2MjKdlg= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/log15 v0.0.0-20201112154412-8562bdadbbac h1:n1DqxAo4oWPMvH1+v+DLYlMCecgumhhgnxAPdqDIFHI= -github.com/inconshreveable/log15 v0.0.0-20201112154412-8562bdadbbac/go.mod h1:cOaXtrgN4ScfRrD9Bre7U1thNq5RtJ8ZoP4iXVGRj6o= +github.com/inconshreveable/log15 v2.16.0+incompatible h1:6nvMKxtGcpgm7q0KiGs+Vc+xDvUXaBqsPKHWKsinccw= +github.com/inconshreveable/log15 v2.16.0+incompatible/go.mod h1:cOaXtrgN4ScfRrD9Bre7U1thNq5RtJ8ZoP4iXVGRj6o= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So= -github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= +github.com/invopop/jsonschema v0.8.0 h1:9Vblm5uNqURXUSaX0QUYcI/Hcu5rrvOz5MbpWgw0VkM= +github.com/invopop/jsonschema v0.8.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty v4.3.0+incompatible h1:CGs8AVhEKg/n9YbUenWmNStRW2PHJzaeDodcfvRAbIo= github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= -github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw= -github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jedib0t/go-pretty/v6 v6.4.7 h1:lwiTJr1DEkAgzljsUsORmWsVn5MQjt1BPJdPCtJ6KXE= github.com/jedib0t/go-pretty/v6 v6.4.7/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -530,10 +485,8 @@ github.com/open-policy-agent/frameworks/constraint v0.0.0-20230712214810-96753a2 github.com/open-policy-agent/frameworks/constraint v0.0.0-20230712214810-96753a21c26f/go.mod h1:54/KzLMvA5ndBVpm7B1OjLeV0cUtTLTz2bZ2OtydLpU= github.com/open-policy-agent/gatekeeper/v3 v3.13.0 h1:UUfIo/ZjLa0D6BBQlnSjlZetcAYbp54fZVVCLug4sY0= github.com/open-policy-agent/gatekeeper/v3 v3.13.0/go.mod h1:umWn30oYZ4CGW0kOD7aeIfPwbhCQ9DibK2LTUrRW+bk= -github.com/open-policy-agent/opa v0.54.0 h1:mGEsK+R5ZTMV8fzzbNzmYDGbTmY30wmRCIHmtm2VqWs= -github.com/open-policy-agent/opa v0.54.0/go.mod h1:d8I8jWygKGi4+T4H07qrbeCdH1ITLsEfT0M+bsvxWw0= -github.com/open-policy-agent/opa v0.55.0 h1:s7Vm4ph6zDqqP/KzvUSw9fsKVsm9lhbTZhYGxxTK7mo= -github.com/open-policy-agent/opa v0.55.0/go.mod h1:2Vh8fj/bXCqSwGMbBiHGrw+O8yrho6T/fdaHt5ROmaQ= +github.com/open-policy-agent/opa v0.56.0 h1:FUSb6MyckjuffOMshEG8P+HGnckxkJ8ENZJHEzAddhk= +github.com/open-policy-agent/opa v0.56.0/go.mod h1:un01L10fkolr00KJMDSqGb2FXCjVyVQOybLtHOfSEfY= github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= @@ -577,8 +530,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE= -github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -665,36 +616,20 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0 h1:yt2NKzK7Vyo6h0+X8BA4FpreZQTlVEIarnsBP/H5mzs= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0/go.mod h1:+ARmXlUlc51J7sZeCBkBJNdHGySrdOzgzxp6VWRWM1U= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0/go.mod h1:XiYsayHc36K3EByOO6nbAXnAWbrUxdjUROCEeeROOH8= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 h1:TKf2uAs2ueguzLaxOCBXNpHxfO/aC7PAdDsSH0IbeRQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -720,8 +655,6 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -734,8 +667,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -806,8 +737,6 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -821,10 +750,8 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.9.0 h1:BPpt2kU7oMRq3kCHAA1tbSEshXRw1LpG2ztgDwrzuAs= -golang.org/x/oauth2 v0.9.0/go.mod h1:qYgFZaFiu6Wg24azG8bdV52QJXJGbZzIIsRCdVKzbLw= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -898,8 +825,6 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -909,8 +834,6 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -927,8 +850,6 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -991,7 +912,6 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1020,8 +940,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.129.0 h1:2XbdjjNfFPXQyufzQVwPf1RRnHH8Den2pfNE2jw7L8w= -google.golang.org/api v0.129.0/go.mod h1:dFjiXlanKwWE3612X97llhsoI36FAoIiRj3aTl5b/zE= google.golang.org/api v0.138.0 h1:K/tVp05MxNVbHShRw9m7e9VJGdagNeTdMzqPH7AUqr0= google.golang.org/api v0.138.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1071,16 +989,10 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 h1:nIgk/EEq3/YlnmVVXVnm14rC2oxgs1o0ong4sD/rd44= google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1104,8 +1016,6 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1172,8 +1082,6 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= -k8s.io/kubectl v0.26.4 h1:A0Oa0u/po4KxXnXsNCOwLojAe9cQR3TJNJabEIf7U1w= -k8s.io/kubectl v0.26.4/go.mod h1:cWtp/+I4p+h5En3s2zO1zCry9v3/6h37EQ2tF3jNRnM= k8s.io/kubectl v0.27.2 h1:sSBM2j94MHBFRWfHIWtEXWCicViQzZsb177rNsKBhZg= k8s.io/kubectl v0.27.2/go.mod h1:GCOODtxPcrjh+EC611MqREkU8RjYBh10ldQCQ6zpFKw= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= diff --git a/cli/launchpad/folder_test.go b/cli/launchpad/folder_test.go index acc848093e2..a203ebc7307 100644 --- a/cli/launchpad/folder_test.go +++ b/cli/launchpad/folder_test.go @@ -1,8 +1,9 @@ package launchpad import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) // newTestFolder generates a fully formed folder for testing usage. diff --git a/cli/launchpad/root.go b/cli/launchpad/root.go index f385dc2c528..23cf6b1d4f6 100644 --- a/cli/launchpad/root.go +++ b/cli/launchpad/root.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/pkg/errors" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" ) // NewGenerate takes file patterns as input YAMLs and output Infrastructure as diff --git a/cli/launchpad/runtime_test.go b/cli/launchpad/runtime_test.go index 465e3178b33..cabfc63ee96 100644 --- a/cli/launchpad/runtime_test.go +++ b/cli/launchpad/runtime_test.go @@ -2,8 +2,9 @@ package launchpad import ( "testing" + + "github.com/stretchr/testify/assert" ) -import "github.com/stretchr/testify/assert" type dummyResource struct { headerYAML diff --git a/cli/report/cmd.go b/cli/report/cmd.go index 23ef8f64e15..e2875886d1c 100644 --- a/cli/report/cmd.go +++ b/cli/report/cmd.go @@ -62,7 +62,6 @@ func init() { if err != nil { panic(err) } - } // Cmd represents the base report command diff --git a/cli/scorecard/cmd.go b/cli/scorecard/cmd.go index 2849fe494ff..0e00d1ed1b0 100644 --- a/cli/scorecard/cmd.go +++ b/cli/scorecard/cmd.go @@ -51,7 +51,6 @@ func init() { Cmd.Flags().StringVar(&flags.targetProjectID, "target-project", "", "Project ID to analyze (Works with --bucket and --refresh; conflicts with --target-folder or --target--organization)") Cmd.Flags().StringVar(&flags.targetFolderID, "target-folder", "", "Folder ID to analyze (Works with --bucket and --refresh; conflicts with --target-project or --target--organization)") Cmd.Flags().StringVar(&flags.targetOrgID, "target-organization", "", "Organization ID to analyze (Works with --bucket and --refresh; conflicts with --target-project or --target--folder)") - } // Cmd represents the base scorecard command diff --git a/cli/scorecard/proto.go b/cli/scorecard/proto.go index 55e0246a555..287443f9980 100644 --- a/cli/scorecard/proto.go +++ b/cli/scorecard/proto.go @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2019-2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,18 +17,17 @@ package scorecard import ( "encoding/json" "strconv" - "strings" - "github.com/golang/protobuf/jsonpb" //nolint //https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/1571 - "github.com/golang/protobuf/proto" //nolint //https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/1571 "github.com/pkg/errors" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" ) func unMarshallAsset(from []byte, to proto.Message) error { // CAI export returns org_policy [1] with update_time if Timestamp format in Seconds and Nanos - // but in jsonpb, Timestamp is expected to be a string in the RFC 3339 format [2]. + // but in protojson, Timestamp is expected to be a string in the RFC 3339 format [2]. // i.e. "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - // Hence doing a workaround to remove the field so that jsonpb.Unmarshaler can handle org policy. + // Hence doing a workaround to remove the field so that protojson.Unmarshaler can handle org policy. // [1] https://github.com/googleapis/googleapis/blob/master/google/cloud/orgpolicy/v1/orgpolicy.proto // [2] https://godoc.org/google.golang.org/protobuf/types/known/timestamppb#Timestamp @@ -67,8 +66,8 @@ func protoViaJSON(from interface{}, to proto.Message) error { if err != nil { return errors.Wrap(err, "marshaling to json") } - umar := &jsonpb.Unmarshaler{AllowUnknownFields: true} - if err := umar.Unmarshal(strings.NewReader(string(jsn)), to); err != nil { + umar := &protojson.UnmarshalOptions{DiscardUnknown: true} + if err := umar.Unmarshal(jsn, to); err != nil { return errors.Wrap(err, "unmarshaling to proto") } @@ -78,14 +77,13 @@ func protoViaJSON(from interface{}, to proto.Message) error { // interfaceViaJSON uses JSON as an intermediary serialization to convert a protobuf message // into an interface value func interfaceViaJSON(from proto.Message) (interface{}, error) { - marshaler := &jsonpb.Marshaler{} - jsn, err := marshaler.MarshalToString(from) + jsn, err := protojson.Marshal(from) if err != nil { return nil, errors.Wrap(err, "marshaling to json") } var to interface{} - if err := json.Unmarshal([]byte(jsn), &to); err != nil { + if err := json.Unmarshal(jsn, &to); err != nil { return nil, errors.Wrap(err, "unmarshaling to interface") } @@ -95,15 +93,14 @@ func interfaceViaJSON(from proto.Message) (interface{}, error) { // stringViaJSON uses JSON as an intermediary serialization to convert a protobuf message // into an string value func stringViaJSON(from proto.Message) (string, error) { - marshaler := &jsonpb.Marshaler{} - jsn, err := marshaler.MarshalToString(from) + jsn, err := protojson.Marshal(from) if err != nil { return "", errors.Wrap(err, "marshaling to json") } - str, err := strconv.Unquote(jsn) + str, err := strconv.Unquote(string(jsn)) if err != nil { // return original json string if it's not a quoted string - return jsn, nil + return string(jsn), nil } return str, nil } diff --git a/cli/scorecard/score.go b/cli/scorecard/score.go index 42386094aab..9a50b0b350e 100644 --- a/cli/scorecard/score.go +++ b/cli/scorecard/score.go @@ -325,7 +325,6 @@ func (inventory *InventoryConfig) Score(config *ScoringConfig, outputPath string if err != nil { return err } - } else { fmt.Println("No issues found found! You have a perfect score.") } diff --git a/cli/scorecard/violations_test.go b/cli/scorecard/violations_test.go index cbd17b21d97..89f4f06e435 100644 --- a/cli/scorecard/violations_test.go +++ b/cli/scorecard/violations_test.go @@ -78,7 +78,6 @@ func TestGetAssetFromJSON(t *testing.T) { if tc.isIamPolicy && pbAsset.IamPolicy == nil { t.Errorf("wanted IAM Policy bindings, got %s", pbAsset) } - }) } } diff --git a/cli/util/file.go b/cli/util/file.go index 33163876ec7..26b6ae3b6ec 100644 --- a/cli/util/file.go +++ b/cli/util/file.go @@ -28,7 +28,7 @@ func WalkTerraformDirs(topLevelPath string) ([]string, error) { var tfDirs []string err := filepath.Walk(topLevelPath, func(path string, info fs.FileInfo, err error) error { if err != nil { - return fmt.Errorf("failure in accessing the path %q: %v\n", path, err) + return fmt.Errorf("failure in accessing the path %q: %w\n", path, err) } if info.IsDir() && (strings.HasPrefix(info.Name(), tfInternalDirPrefix) || skipDiscoverDirs[info.Name()]) { return filepath.SkipDir @@ -42,7 +42,7 @@ func WalkTerraformDirs(topLevelPath string) ([]string, error) { return nil }) if err != nil { - return nil, fmt.Errorf("error walking the path %q: %v\n", topLevelPath, err) + return nil, fmt.Errorf("error walking the path %q: %w\n", topLevelPath, err) } return tfDirs, nil @@ -51,7 +51,7 @@ func WalkTerraformDirs(topLevelPath string) ([]string, error) { func FindFilesWithPattern(dir string, pattern string, skipPaths []string) ([]string, error) { f, err := os.Stat(dir) if err != nil { - return nil, fmt.Errorf("no such dir: %v", err) + return nil, fmt.Errorf("no such dir: %w", err) } if !f.IsDir() { return nil, fmt.Errorf("expected dir %s: got file", dir) @@ -59,7 +59,7 @@ func FindFilesWithPattern(dir string, pattern string, skipPaths []string) ([]str re, err := regexp.Compile(pattern) if err != nil { - return nil, fmt.Errorf("invalid regex: %v", err) + return nil, fmt.Errorf("invalid regex: %w", err) } filePaths := []string{} @@ -102,5 +102,5 @@ func Exists(path string) (bool, error) { if errors.Is(err, os.ErrNotExist) { return false, nil } - return false, fmt.Errorf("error checking if %s exists: %v", path, err) + return false, fmt.Errorf("error checking if %s exists: %w", path, err) } diff --git a/cli/util/file_test.go b/cli/util/file_test.go index 70c55912b36..f170246e99b 100644 --- a/cli/util/file_test.go +++ b/cli/util/file_test.go @@ -19,7 +19,7 @@ func TestTFDirectories(t *testing.T) { wantErr bool }{ { - name: "multiple directores", + name: "multiple directories", path: "content/examples", want: []string{ "../testdata/bpmetadata/content/examples/acm/acm-terraform-blog-part1/terraform",