diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index a541d42..0dd1e0a 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -20,7 +20,7 @@ jobs: go-version: 1.24.2 - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v8 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: latest diff --git a/.golangci.yaml b/.golangci.yaml index 22c3fed..1e97201 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,20 +1,37 @@ +version: "2" linters: - disable-all: true + default: none enable: - - gofmt - gosec - - gosimple - govet - ineffassign - misspell - staticcheck - - stylecheck - - typecheck - unconvert - unparam - unused - wastedassign -linters-settings: - gosec: - excludes: - - G404 + settings: + gosec: + excludes: + - G404 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/db/db.go b/db/db.go index 3d17137..b2f9275 100644 --- a/db/db.go +++ b/db/db.go @@ -120,7 +120,7 @@ func (db *Database) GetAllCerts(ctx context.Context) (map[string]CertMetadata, e certs := make(map[string]CertMetadata, len(certList)) for _, cert := range certList { - certs[cert.CertKey.SerialString()] = cert + certs[cert.SerialString()] = cert } return certs, nil }