diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 281ddfe..b02dacd 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -29,4 +29,4 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: - version: v2.11 + version: v2.13 diff --git a/.golangci.yaml b/.golangci.yaml index 7e6739b..d5420dc 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -60,7 +60,7 @@ linters: - godox - goheader - gomoddirectives - - gomodguard + - gomodguard_v2 - goprintffuncname - gosec - gosmopolitan diff --git a/client_test.go b/client_test.go index b2fa8eb..e9303cb 100644 --- a/client_test.go +++ b/client_test.go @@ -38,7 +38,7 @@ func TestCall(t *testing.T) { synthErr error }{ {"normal", []byte("Hi\n"), nil}, - {"normal", nil, errors.New("Superbad HTTP Error!")}, + {"http-error", nil, errors.New("Superbad HTTP Error!")}, } { t.Run(tc.name, func(t *testing.T) { t.Parallel() diff --git a/functions_test.go b/functions_test.go index 7b34793..ede7507 100644 --- a/functions_test.go +++ b/functions_test.go @@ -11,16 +11,17 @@ import ( func TestRepoFromString(t *testing.T) { t.Parallel() + const cosignRepoURL = "https://github.com/sigstore/cosign" for _, tc := range []struct { name string sut string expect string mustErr bool }{ - {"reposlug", "sigstore/cosign", "https://github.com/sigstore/cosign", false}, - {"noscheme", "github.com/sigstore/cosign", "https://github.com/sigstore/cosign", false}, + {"reposlug", "sigstore/cosign", cosignRepoURL, false}, + {"noscheme", "github.com/sigstore/cosign", cosignRepoURL, false}, {"norepo", "github.com/sigstore", "", true}, - {"locator", "git+https://github.com/sigstore/cosign@main", "https://github.com/sigstore/cosign", false}, + {"locator", "git+https://github.com/sigstore/cosign@main", cosignRepoURL, false}, } { t.Run(tc.name, func(t *testing.T) { t.Parallel()