From b4ee0fc5d67fe3315e88030d55a8aeae7e3e97d6 Mon Sep 17 00:00:00 2001 From: Vishnu Jayadevan <68588475+vishnu-deepsource@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:12:29 +0530 Subject: [PATCH] feat: start refactoring the report command (#238) --- .deepsource.toml | 6 +- command/report/dsn.go | 27 ++++ command/report/dsn_test.go | 70 +++++++++ command/report/report.go | 139 +++++++----------- .../report_graphql_request_body.json | 2 +- command/report/tests/report_workflow_test.go | 4 + go.mod | 12 +- go.sum | 18 ++- 8 files changed, 171 insertions(+), 107 deletions(-) create mode 100644 command/report/dsn.go create mode 100644 command/report/dsn_test.go diff --git a/.deepsource.toml b/.deepsource.toml index 2a7c7b6e..bf4cd148 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -13,8 +13,4 @@ enabled = true [[analyzers]] name = "test-coverage" -enabled = true - -[[transformers]] -name = "gofumpt" -enabled = true +enabled = true \ No newline at end of file diff --git a/command/report/dsn.go b/command/report/dsn.go new file mode 100644 index 00000000..dfebcfc0 --- /dev/null +++ b/command/report/dsn.go @@ -0,0 +1,27 @@ +package report + +import ( + "errors" + "regexp" +) + +var ErrInvalidDSN = errors.New("DeepSource | Error | Invalid DSN. Cross verify DEEPSOURCE_DSN value against the settings page of the repository") + +type DSN struct { + Protocol string + Host string + Token string +} + +func NewDSN(raw string) (*DSN, error) { + dsnPattern := regexp.MustCompile(`^(https?)://([^:@]+)@([^:/]+(?:\:\d+)?)`) + matches := dsnPattern.FindStringSubmatch(raw) + if len(matches) != 4 { + return nil, ErrInvalidDSN + } + return &DSN{ + Protocol: matches[1], + Token: matches[2], + Host: matches[3], + }, nil +} diff --git a/command/report/dsn_test.go b/command/report/dsn_test.go new file mode 100644 index 00000000..393fdbb3 --- /dev/null +++ b/command/report/dsn_test.go @@ -0,0 +1,70 @@ +package report + +import ( + "reflect" + "testing" +) + +func TestNewDSN(t *testing.T) { + type args struct { + raw string + } + tests := []struct { + name string + args args + want *DSN + wantErr error + }{ + { + name: "valid DSN", + args: args{ + raw: "https://e1099ed7240c4045b5ab3fedebc7b5d7@app.deepsource.com", + }, + want: &DSN{ + Token: "e1099ed7240c4045b5ab3fedebc7b5d7", + Host: "app.deepsource.com", + Protocol: "https", + }, + wantErr: nil, + }, + { + name: "valid DSN with port", + args: args{ + raw: "http://f59a44307@localhost:8081", + }, + want: &DSN{ + Token: "f59a44307", + Host: "localhost:8081", + Protocol: "http", + }, + }, + { + name: "invalid DSN no http", + args: args{ + raw: "no http", + }, + want: nil, + wantErr: ErrInvalidDSN, + }, + { + name: "invalid DSN", + args: args{ + raw: "https://e1099ed7240c4045b5ab3fedebc7b5d7", + }, + want: nil, + wantErr: ErrInvalidDSN, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewDSN(tt.args.raw) + if err != tt.wantErr { + t.Errorf("NewDSN() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("NewDSN() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/command/report/report.go b/command/report/report.go index 41131226..30bc954e 100644 --- a/command/report/report.go +++ b/command/report/report.go @@ -24,6 +24,7 @@ type ReportOptions struct { Value string ValueFile string SkipCertificateVerification bool + DSN string } // NewCmdVersion returns the current version of cli being used @@ -72,42 +73,16 @@ func NewCmdReport() *cobra.Command { return cmd } -func (opts *ReportOptions) Run() int { - // Verify the env variables - dsn := os.Getenv("DEEPSOURCE_DSN") - if dsn == "" { - fmt.Fprintln(os.Stderr, "DeepSource | Error | Environment variable DEEPSOURCE_DSN not set (or) is empty. You can find it under the repository settings page") - return 1 - } - sentry.ConfigureScope(func(scope *sentry.Scope) { - scope.SetUser(sentry.User{ID: dsn}) - }) - - ///////////////////// - // Command: report // - ///////////////////// - - reportCommandAnalyzerShortcode := strings.TrimSpace(opts.Analyzer) - reportCommandAnalyzerType := strings.TrimSpace(opts.AnalyzerType) - reportCommandKey := strings.TrimSpace(opts.Key) - reportCommandValue := opts.Value - reportCommandValueFile := strings.TrimSpace(opts.ValueFile) - - // Get current path - currentDir, err := os.Getwd() - if err != nil { - fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to identify current directory") - sentry.CaptureException(err) - return 1 - } - sentry.ConfigureScope(func(scope *sentry.Scope) { - scope.SetExtra("currentDir", currentDir) - }) - - ////////////////// - // Validate Key // - ////////////////// +func (opts *ReportOptions) sanitize() { + opts.Analyzer = strings.TrimSpace(opts.Analyzer) + opts.AnalyzerType = strings.TrimSpace(opts.AnalyzerType) + opts.Key = strings.TrimSpace(opts.Key) + opts.Value = strings.TrimSpace(opts.Value) + opts.ValueFile = strings.TrimSpace(opts.ValueFile) + opts.DSN = strings.TrimSpace(os.Getenv("DEEPSOURCE_DSN")) +} +func (opts *ReportOptions) validateKey() error { supportedKeys := map[string]bool{ "python": true, "go": true, @@ -123,66 +98,56 @@ func (opts *ReportOptions) Run() int { "kotlin": true, } - allowedKeys := func(m map[string]bool) []string { - keys := make([]string, 0, len(supportedKeys)) - for k := range m { - keys = append(keys, k) - } - return keys + if opts.Analyzer == "test-coverage" && !supportedKeys[opts.Key] { + return fmt.Errorf("DeepSource | Error | Invalid Key: %s (Supported Keys: %v)", opts.Key, supportedKeys) } - if reportCommandAnalyzerShortcode == "test-coverage" && !supportedKeys[reportCommandKey] { - err = fmt.Errorf("DeepSource | Error | Invalid Key: %s (Supported Keys: %v)", reportCommandKey, allowedKeys(supportedKeys)) - fmt.Fprintln(os.Stderr, err) - sentry.CaptureException(err) + return nil +} + +func (opts *ReportOptions) Run() int { + opts.sanitize() + if opts.DSN == "" { + fmt.Fprintln(os.Stderr, "DeepSource | Error | Environment variable DEEPSOURCE_DSN not set (or) is empty. You can find it under the repository settings page") return 1 } + sentry.ConfigureScope(func(scope *sentry.Scope) { + scope.SetUser(sentry.User{ID: opts.DSN}) + }) - ////////////////// - // Validate DSN // - ////////////////// - - // Protocol - dsnSplitProtocolBody := strings.Split(dsn, "://") + ///////////////////// + // Command: report // + ///////////////////// - // Validate DSN parsing - if len(dsnSplitProtocolBody) != 2 { - err = errors.New("DeepSource | Error | Invalid DSN. Cross verify DEEPSOURCE_DSN value against the settings page of the repository") - fmt.Fprintln(os.Stderr, err) + // Get current path + currentDir, err := os.Getwd() + if err != nil { + fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to identify current directory") sentry.CaptureException(err) return 1 } + sentry.ConfigureScope(func(scope *sentry.Scope) { + scope.SetExtra("currentDir", currentDir) + }) - // Check for valid protocol - if !strings.HasPrefix(dsnSplitProtocolBody[0], "http") { - err = errors.New("DeepSource | Error | DSN specified should start with http(s). Cross verify DEEPSOURCE_DSN value against the settings page of the repository") + // validate key + if err := opts.validateKey(); err != nil { fmt.Fprintln(os.Stderr, err) sentry.CaptureException(err) return 1 } - dsnProtocol := dsnSplitProtocolBody[0] - - // Parse body of the DSN - dsnSplitTokenHost := strings.Split(dsnSplitProtocolBody[1], "@") - // Validate DSN parsing - if len(dsnSplitTokenHost) != 2 { - err = errors.New("DeepSource | Error | Invalid DSN. Cross verify DEEPSOURCE_DSN value against the settings page of the repository") + dsn, err := NewDSN(opts.DSN) + if err != nil { fmt.Fprintln(os.Stderr, err) sentry.CaptureException(err) return 1 } - // Set values parsed from DSN - dsnHost := dsnSplitTokenHost[1] - /////////////////////// // Generate metadata // /////////////////////// - // Access token - dsnAccessToken := dsnSplitTokenHost[0] - // Head Commit OID headCommitOID, warning, err := gitGetHead(currentDir) if err != nil { @@ -196,7 +161,7 @@ func (opts *ReportOptions) Run() int { }) // Flag validation - if reportCommandValue == "" && reportCommandValueFile == "" { + if opts.Value == "" && opts.ValueFile == "" { fmt.Fprintln(os.Stderr, "DeepSource | Error | '--value' (or) '--value-file' not passed") return 1 } @@ -206,26 +171,26 @@ func (opts *ReportOptions) Run() int { var artifactKey string var artifactValue string - analyzerShortcode = reportCommandAnalyzerShortcode - analyzerType = reportCommandAnalyzerType - artifactKey = reportCommandKey + analyzerShortcode = opts.Analyzer + analyzerType = opts.AnalyzerType + artifactKey = opts.Key - if reportCommandValue != "" { - artifactValue = reportCommandValue + if opts.Value != "" { + artifactValue = opts.Value } - if reportCommandValueFile != "" { + if opts.ValueFile != "" { // Check file size - _, err := os.Stat(reportCommandValueFile) + _, err := os.Stat(opts.ValueFile) if err != nil { - fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to read specified value file:", reportCommandValueFile) + fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to read specified value file:", opts.ValueFile) sentry.CaptureException(err) return 1 } - valueBytes, err := os.ReadFile(reportCommandValueFile) + valueBytes, err := os.ReadFile(opts.ValueFile) if err != nil { - fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to read specified value file:", reportCommandValueFile) + fmt.Fprintln(os.Stderr, "DeepSource | Error | Unable to read specified value file:", opts.ValueFile) sentry.CaptureException(err) return 1 } @@ -244,7 +209,7 @@ func (opts *ReportOptions) Run() int { } r, err := makeQuery( - dsnProtocol+"://"+dsnHost+"/graphql/cli/", + dsn.Protocol+"://"+dsn.Host+"/graphql/cli/", qBytes, "application/json", opts.SkipCertificateVerification, @@ -284,7 +249,7 @@ func (opts *ReportOptions) Run() int { compressLevel := 20 compressedBytes, err = zstd.CompressLevel(compressedBytes, []byte(artifactValue), compressLevel) if err != nil { - fmt.Fprintln(os.Stderr, "DeepSource | Error | Failed to compress value file:", reportCommandValueFile) + fmt.Fprintln(os.Stderr, "DeepSource | Error | Failed to compress value file:", opts.ValueFile) sentry.CaptureException(err) return 1 } @@ -302,7 +267,7 @@ func (opts *ReportOptions) Run() int { //////////////////// queryInput := ReportQueryInput{ - AccessToken: dsnAccessToken, + AccessToken: dsn.Token, CommitOID: headCommitOID, ReporterName: "cli", ReporterVersion: CliVersion, @@ -331,7 +296,7 @@ func (opts *ReportOptions) Run() int { } queryResponseBody, err := makeQuery( - dsnProtocol+"://"+dsnHost+"/graphql/cli/", + dsn.Protocol+"://"+dsn.Host+"/graphql/cli/", queryBodyBytes, "application/json", opts.SkipCertificateVerification, @@ -347,7 +312,7 @@ func (opts *ReportOptions) Run() int { return 1 } queryResponseBody, err = makeQuery( - dsnProtocol+"://"+dsnHost+"/graphql/cli/", + dsn.Protocol+"://"+dsn.Host+"/graphql/cli/", queryBodyBytes, "application/json", opts.SkipCertificateVerification, diff --git a/command/report/tests/golden_files/report_graphql_request_body.json b/command/report/tests/golden_files/report_graphql_request_body.json index 8873419b..26eb0e1c 100644 --- a/command/report/tests/golden_files/report_graphql_request_body.json +++ b/command/report/tests/golden_files/report_graphql_request_body.json @@ -7,7 +7,7 @@ "reporter": "cli", "reporterVersion": "v0.1.6", "key": "python", - "data": "\u003c?xml version=\"1.0\" ?\u003e\n\u003ccoverage branch-rate=\"0.9333\" branches-covered=\"28\" branches-valid=\"30\" complexity=\"0\" line-rate=\"0.9839\" lines-covered=\"183\" lines-valid=\"186\" timestamp=\"1551180635459\" version=\"4.5.2\"\u003e\n \u003c!-- Generated by coverage.py: https://coverage.readthedocs.io --\u003e\n \u003c!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --\u003e\n \u003csources/\u003e\n \u003cpackages\u003e\n \u003cpackage branch-rate=\"0.9333\" complexity=\"0\" line-rate=\"0.9839\" name=\".Users.sanket.Code.s3tree.s3tree\"\u003e\n \u003cclasses\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/__init__.py\" line-rate=\"1\" name=\"__init__.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"9\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline hits=\"1\" number=\"12\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/__version__.py\" line-rate=\"1\" name=\"__version__.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"0.9375\" complexity=\"0\" filename=\"/code/s3tree/s3tree/core.py\" line-rate=\"0.9846\" name=\"core.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"13\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"41\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003cline hits=\"1\" number=\"45\"/\u003e\n \u003cline hits=\"1\" number=\"49\"/\u003e\n \u003cline hits=\"1\" number=\"50\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"53\"/\u003e\n \u003cline hits=\"1\" number=\"54\"/\u003e\n \u003cline hits=\"1\" number=\"57\"/\u003e\n \u003cline hits=\"1\" number=\"61\"/\u003e\n \u003cline hits=\"1\" number=\"62\"/\u003e\n \u003cline hits=\"1\" number=\"65\"/\u003e\n \u003cline hits=\"1\" number=\"66\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"72\"/\u003e\n \u003cline hits=\"1\" number=\"73\"/\u003e\n \u003cline hits=\"1\" number=\"76\"/\u003e\n \u003cline hits=\"1\" number=\"78\"/\u003e\n \u003cline hits=\"1\" number=\"79\"/\u003e\n \u003cline hits=\"1\" number=\"81\"/\u003e\n \u003cline hits=\"1\" number=\"82\"/\u003e\n \u003cline hits=\"1\" number=\"84\"/\u003e\n \u003cline hits=\"1\" number=\"86\"/\u003e\n \u003cline hits=\"1\" number=\"90\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"94\"/\u003e\n \u003cline hits=\"1\" number=\"95\"/\u003e\n \u003cline hits=\"1\" number=\"99\"/\u003e\n \u003cline hits=\"1\" number=\"101\"/\u003e\n \u003cline hits=\"1\" number=\"104\"/\u003e\n \u003cline hits=\"1\" number=\"105\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"107\"/\u003e\n \u003cline hits=\"1\" number=\"108\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"110\"/\u003e\n \u003cline hits=\"1\" number=\"111\"/\u003e\n \u003cline hits=\"1\" number=\"113\"/\u003e\n \u003cline hits=\"1\" number=\"115\"/\u003e\n \u003cline hits=\"1\" number=\"120\"/\u003e\n \u003cline hits=\"1\" number=\"121\"/\u003e\n \u003cline hits=\"1\" number=\"122\"/\u003e\n \u003cline hits=\"1\" number=\"125\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"127\"/\u003e\n \u003cline hits=\"1\" number=\"128\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"50% (1/2)\" hits=\"1\" missing-branches=\"134\" number=\"130\"/\u003e\n \u003cline hits=\"1\" number=\"131\"/\u003e\n \u003cline hits=\"0\" number=\"134\"/\u003e\n \u003cline hits=\"1\" number=\"136\"/\u003e\n \u003cline hits=\"1\" number=\"139\"/\u003e\n \u003cline hits=\"1\" number=\"141\"/\u003e\n \u003cline hits=\"1\" number=\"144\"/\u003e\n \u003cline hits=\"1\" number=\"146\"/\u003e\n \u003cline hits=\"1\" number=\"149\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"151\"/\u003e\n \u003cline hits=\"1\" number=\"152\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"154\"/\u003e\n \u003cline hits=\"1\" number=\"155\"/\u003e\n \u003cline hits=\"1\" number=\"157\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/exceptions.py\" line-rate=\"1\" name=\"exceptions.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"15\"/\u003e\n \u003cline hits=\"1\" number=\"16\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"20\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"22\"/\u003e\n \u003cline hits=\"1\" number=\"25\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline hits=\"1\" number=\"29\"/\u003e\n \u003cline hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"34\"/\u003e\n \u003cline hits=\"1\" number=\"35\"/\u003e\n \u003cline hits=\"1\" number=\"36\"/\u003e\n \u003cline hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"41\"/\u003e\n \u003cline hits=\"1\" number=\"42\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/models.py\" line-rate=\"0.9615\" name=\"models.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"9\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"13\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"19\"/\u003e\n \u003cline hits=\"1\" number=\"20\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"23\"/\u003e\n \u003cline hits=\"1\" number=\"25\"/\u003e\n \u003cline hits=\"1\" number=\"27\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"45\"/\u003e\n \u003cline hits=\"1\" number=\"48\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"51\"/\u003e\n \u003cline hits=\"1\" number=\"52\"/\u003e\n \u003cline hits=\"1\" number=\"55\"/\u003e\n \u003cline hits=\"1\" number=\"57\"/\u003e\n \u003cline hits=\"1\" number=\"58\"/\u003e\n \u003cline hits=\"1\" number=\"59\"/\u003e\n \u003cline hits=\"1\" number=\"60\"/\u003e\n \u003cline hits=\"1\" number=\"61\"/\u003e\n \u003cline hits=\"1\" number=\"64\"/\u003e\n \u003cline hits=\"1\" number=\"67\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"72\"/\u003e\n \u003cline hits=\"1\" number=\"74\"/\u003e\n \u003cline hits=\"1\" number=\"77\"/\u003e\n \u003cline hits=\"1\" number=\"79\"/\u003e\n \u003cline hits=\"1\" number=\"82\"/\u003e\n \u003cline hits=\"1\" number=\"84\"/\u003e\n \u003cline hits=\"1\" number=\"86\"/\u003e\n \u003cline hits=\"1\" number=\"87\"/\u003e\n \u003cline hits=\"0\" number=\"90\"/\u003e\n \u003cline hits=\"0\" number=\"91\"/\u003e\n \u003cline hits=\"1\" number=\"93\"/\u003e\n \u003cline hits=\"1\" number=\"94\"/\u003e\n \u003cline hits=\"1\" number=\"96\"/\u003e\n \u003cline hits=\"1\" number=\"99\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"101\"/\u003e\n \u003cline hits=\"1\" number=\"102\"/\u003e\n \u003cline hits=\"1\" number=\"103\"/\u003e\n \u003cline hits=\"1\" number=\"105\"/\u003e\n \u003cline hits=\"1\" number=\"108\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"0.5\" complexity=\"0\" filename=\"/code/s3tree/s3tree/types.py\" line-rate=\"1\" name=\"types.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"50% (1/2)\" hits=\"1\" missing-branches=\"14\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"12\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"18\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"22\"/\u003e\n \u003cline hits=\"1\" number=\"23\"/\u003e\n \u003cline hits=\"1\" number=\"24\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/utils.py\" line-rate=\"1\" name=\"utils.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"27\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"34\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"38\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003cline hits=\"1\" number=\"56\"/\u003e\n \u003cline hits=\"1\" number=\"60\"/\u003e\n \u003cline hits=\"1\" number=\"65\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"73\"/\u003e\n \u003cline hits=\"1\" number=\"74\"/\u003e\n \u003cline hits=\"1\" number=\"76\"/\u003e\n \u003cline hits=\"1\" number=\"78\"/\u003e\n \u003cline hits=\"1\" number=\"81\"/\u003e\n \u003cline hits=\"1\" number=\"83\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003c/classes\u003e\n \u003c/package\u003e\n \u003c/packages\u003e\n\u003c/coverage\u003e\n", + "data": "\u003c?xml version=\"1.0\" ?\u003e\n\u003ccoverage branch-rate=\"0.9333\" branches-covered=\"28\" branches-valid=\"30\" complexity=\"0\" line-rate=\"0.9839\" lines-covered=\"183\" lines-valid=\"186\" timestamp=\"1551180635459\" version=\"4.5.2\"\u003e\n \u003c!-- Generated by coverage.py: https://coverage.readthedocs.io --\u003e\n \u003c!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --\u003e\n \u003csources/\u003e\n \u003cpackages\u003e\n \u003cpackage branch-rate=\"0.9333\" complexity=\"0\" line-rate=\"0.9839\" name=\".Users.sanket.Code.s3tree.s3tree\"\u003e\n \u003cclasses\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/__init__.py\" line-rate=\"1\" name=\"__init__.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"9\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline hits=\"1\" number=\"12\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/__version__.py\" line-rate=\"1\" name=\"__version__.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"0.9375\" complexity=\"0\" filename=\"/code/s3tree/s3tree/core.py\" line-rate=\"0.9846\" name=\"core.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"13\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"41\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003cline hits=\"1\" number=\"45\"/\u003e\n \u003cline hits=\"1\" number=\"49\"/\u003e\n \u003cline hits=\"1\" number=\"50\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"53\"/\u003e\n \u003cline hits=\"1\" number=\"54\"/\u003e\n \u003cline hits=\"1\" number=\"57\"/\u003e\n \u003cline hits=\"1\" number=\"61\"/\u003e\n \u003cline hits=\"1\" number=\"62\"/\u003e\n \u003cline hits=\"1\" number=\"65\"/\u003e\n \u003cline hits=\"1\" number=\"66\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"72\"/\u003e\n \u003cline hits=\"1\" number=\"73\"/\u003e\n \u003cline hits=\"1\" number=\"76\"/\u003e\n \u003cline hits=\"1\" number=\"78\"/\u003e\n \u003cline hits=\"1\" number=\"79\"/\u003e\n \u003cline hits=\"1\" number=\"81\"/\u003e\n \u003cline hits=\"1\" number=\"82\"/\u003e\n \u003cline hits=\"1\" number=\"84\"/\u003e\n \u003cline hits=\"1\" number=\"86\"/\u003e\n \u003cline hits=\"1\" number=\"90\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"94\"/\u003e\n \u003cline hits=\"1\" number=\"95\"/\u003e\n \u003cline hits=\"1\" number=\"99\"/\u003e\n \u003cline hits=\"1\" number=\"101\"/\u003e\n \u003cline hits=\"1\" number=\"104\"/\u003e\n \u003cline hits=\"1\" number=\"105\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"107\"/\u003e\n \u003cline hits=\"1\" number=\"108\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"110\"/\u003e\n \u003cline hits=\"1\" number=\"111\"/\u003e\n \u003cline hits=\"1\" number=\"113\"/\u003e\n \u003cline hits=\"1\" number=\"115\"/\u003e\n \u003cline hits=\"1\" number=\"120\"/\u003e\n \u003cline hits=\"1\" number=\"121\"/\u003e\n \u003cline hits=\"1\" number=\"122\"/\u003e\n \u003cline hits=\"1\" number=\"125\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"127\"/\u003e\n \u003cline hits=\"1\" number=\"128\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"50% (1/2)\" hits=\"1\" missing-branches=\"134\" number=\"130\"/\u003e\n \u003cline hits=\"1\" number=\"131\"/\u003e\n \u003cline hits=\"0\" number=\"134\"/\u003e\n \u003cline hits=\"1\" number=\"136\"/\u003e\n \u003cline hits=\"1\" number=\"139\"/\u003e\n \u003cline hits=\"1\" number=\"141\"/\u003e\n \u003cline hits=\"1\" number=\"144\"/\u003e\n \u003cline hits=\"1\" number=\"146\"/\u003e\n \u003cline hits=\"1\" number=\"149\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"151\"/\u003e\n \u003cline hits=\"1\" number=\"152\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"154\"/\u003e\n \u003cline hits=\"1\" number=\"155\"/\u003e\n \u003cline hits=\"1\" number=\"157\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/exceptions.py\" line-rate=\"1\" name=\"exceptions.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"15\"/\u003e\n \u003cline hits=\"1\" number=\"16\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"20\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"22\"/\u003e\n \u003cline hits=\"1\" number=\"25\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline hits=\"1\" number=\"29\"/\u003e\n \u003cline hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"34\"/\u003e\n \u003cline hits=\"1\" number=\"35\"/\u003e\n \u003cline hits=\"1\" number=\"36\"/\u003e\n \u003cline hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"41\"/\u003e\n \u003cline hits=\"1\" number=\"42\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/models.py\" line-rate=\"0.9615\" name=\"models.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"7\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"9\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"13\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"19\"/\u003e\n \u003cline hits=\"1\" number=\"20\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"23\"/\u003e\n \u003cline hits=\"1\" number=\"25\"/\u003e\n \u003cline hits=\"1\" number=\"27\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"45\"/\u003e\n \u003cline hits=\"1\" number=\"48\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"51\"/\u003e\n \u003cline hits=\"1\" number=\"52\"/\u003e\n \u003cline hits=\"1\" number=\"55\"/\u003e\n \u003cline hits=\"1\" number=\"57\"/\u003e\n \u003cline hits=\"1\" number=\"58\"/\u003e\n \u003cline hits=\"1\" number=\"59\"/\u003e\n \u003cline hits=\"1\" number=\"60\"/\u003e\n \u003cline hits=\"1\" number=\"61\"/\u003e\n \u003cline hits=\"1\" number=\"64\"/\u003e\n \u003cline hits=\"1\" number=\"67\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"72\"/\u003e\n \u003cline hits=\"1\" number=\"74\"/\u003e\n \u003cline hits=\"1\" number=\"77\"/\u003e\n \u003cline hits=\"1\" number=\"79\"/\u003e\n \u003cline hits=\"1\" number=\"82\"/\u003e\n \u003cline hits=\"1\" number=\"84\"/\u003e\n \u003cline hits=\"1\" number=\"86\"/\u003e\n \u003cline hits=\"1\" number=\"87\"/\u003e\n \u003cline hits=\"0\" number=\"90\"/\u003e\n \u003cline hits=\"0\" number=\"91\"/\u003e\n \u003cline hits=\"1\" number=\"93\"/\u003e\n \u003cline hits=\"1\" number=\"94\"/\u003e\n \u003cline hits=\"1\" number=\"96\"/\u003e\n \u003cline hits=\"1\" number=\"99\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"101\"/\u003e\n \u003cline hits=\"1\" number=\"102\"/\u003e\n \u003cline hits=\"1\" number=\"103\"/\u003e\n \u003cline hits=\"1\" number=\"105\"/\u003e\n \u003cline hits=\"1\" number=\"108\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"0.5\" complexity=\"0\" filename=\"/code/s3tree/s3tree/types.py\" line-rate=\"1\" name=\"types.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"10\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"50% (1/2)\" hits=\"1\" missing-branches=\"14\" number=\"11\"/\u003e\n \u003cline hits=\"1\" number=\"12\"/\u003e\n \u003cline hits=\"1\" number=\"14\"/\u003e\n \u003cline hits=\"1\" number=\"17\"/\u003e\n \u003cline hits=\"1\" number=\"18\"/\u003e\n \u003cline hits=\"1\" number=\"21\"/\u003e\n \u003cline hits=\"1\" number=\"22\"/\u003e\n \u003cline hits=\"1\" number=\"23\"/\u003e\n \u003cline hits=\"1\" number=\"24\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003cclass branch-rate=\"1\" complexity=\"0\" filename=\"/code/s3tree/s3tree/utils.py\" line-rate=\"1\" name=\"utils.py\"\u003e\n \u003cmethods/\u003e\n \u003clines\u003e\n \u003cline hits=\"1\" number=\"3\"/\u003e\n \u003cline hits=\"1\" number=\"4\"/\u003e\n \u003cline hits=\"1\" number=\"5\"/\u003e\n \u003cline hits=\"1\" number=\"6\"/\u003e\n \u003cline hits=\"1\" number=\"8\"/\u003e\n \u003cline hits=\"1\" number=\"11\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"27\"/\u003e\n \u003cline hits=\"1\" number=\"28\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"30\"/\u003e\n \u003cline hits=\"1\" number=\"31\"/\u003e\n \u003cline hits=\"1\" number=\"34\"/\u003e\n \u003cline branch=\"true\" condition-coverage=\"100% (2/2)\" hits=\"1\" number=\"37\"/\u003e\n \u003cline hits=\"1\" number=\"38\"/\u003e\n \u003cline hits=\"1\" number=\"40\"/\u003e\n \u003cline hits=\"1\" number=\"43\"/\u003e\n \u003cline hits=\"1\" number=\"56\"/\u003e\n \u003cline hits=\"1\" number=\"60\"/\u003e\n \u003cline hits=\"1\" number=\"65\"/\u003e\n \u003cline hits=\"1\" number=\"69\"/\u003e\n \u003cline hits=\"1\" number=\"73\"/\u003e\n \u003cline hits=\"1\" number=\"74\"/\u003e\n \u003cline hits=\"1\" number=\"76\"/\u003e\n \u003cline hits=\"1\" number=\"78\"/\u003e\n \u003cline hits=\"1\" number=\"81\"/\u003e\n \u003cline hits=\"1\" number=\"83\"/\u003e\n \u003c/lines\u003e\n \u003c/class\u003e\n \u003c/classes\u003e\n \u003c/package\u003e\n \u003c/packages\u003e\n\u003c/coverage\u003e", "analyzer": "test-coverage", "metadata": { "workDir": "/home/runner/code", diff --git a/command/report/tests/report_workflow_test.go b/command/report/tests/report_workflow_test.go index 186ab8ba..da45a1e5 100644 --- a/command/report/tests/report_workflow_test.go +++ b/command/report/tests/report_workflow_test.go @@ -9,6 +9,7 @@ import ( "net/http" "os" "os/exec" + "strings" "testing" "github.com/DataDog/zstd" @@ -127,6 +128,9 @@ func graphQLAPIMock(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Header().Set("Content-Type", "application/json") + requestReportQuery.Variables.Input.Data = strings.TrimSuffix(requestReportQuery.Variables.Input.Data, "\n") + reportQuery.Variables.Input.Data = strings.TrimSuffix(reportQuery.Variables.Input.Data, "\n") + if want, got := requestReportQuery, reportQuery; cmp.Equal(want, got) { w.Write([]byte(successResponseBodyData)) } else { diff --git a/go.mod b/go.mod index a9bfdd93..a15ae260 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/deepsourcelabs/cli -go 1.18 +go 1.21 require ( github.com/AlecAivazis/survey/v2 v2.2.12 @@ -49,13 +49,13 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect - golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect - golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.51.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 37630dda..353b9568 100644 --- a/go.sum +++ b/go.sum @@ -365,8 +365,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -436,17 +436,18 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -515,8 +516,9 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=