diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c2e1fa6..a49e57a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,14 +11,11 @@ executors: docker: - image: golangci/golangci-lint:v1.53 golang-previous: - docker: - - image: golang:1.19 - golang-latest: docker: - image: golang:1.20 - golang-rc: + golang-latest: docker: - - image: golang:1.21-rc + - image: golang:1.21 jobs: lint-markdown: @@ -135,11 +132,11 @@ workflows: - build-source: matrix: parameters: - e: ["golang-previous", "golang-latest","golang-rc"] + e: ["golang-previous", "golang-latest"] - unit-test: matrix: parameters: - e: ["golang-previous", "golang-latest","golang-rc"] + e: ["golang-previous", "golang-latest"] - release-test tagged-release: diff --git a/.golangci.yml b/.golangci.yml index 417d8c61..9cd18fb5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -52,9 +52,5 @@ linters: - whitespace linters-settings: - errorlint: - # Go 1.19 compatibility (https://github.com/sylabs/sif/issues/265). - errorf-multi: false - misspell: locale: US diff --git a/go.mod b/go.mod index ce036bc7..7959173a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sylabs/sif/v2 -go 1.19 +go 1.20 require ( github.com/ProtonMail/go-crypto v0.0.0-20230710112148-e01326fd72eb diff --git a/pkg/integrity/digest.go b/pkg/integrity/digest.go index 676652d9..632cfb3a 100644 --- a/pkg/integrity/digest.go +++ b/pkg/integrity/digest.go @@ -117,7 +117,7 @@ func (d digest) MarshalJSON() ([]byte, error) { func (d *digest) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { - return fmt.Errorf("%w: %v", errDigestMalformed, err) + return fmt.Errorf("%w: %w", errDigestMalformed, err) } parts := strings.Split(s, ":") @@ -129,7 +129,7 @@ func (d *digest) UnmarshalJSON(data []byte) error { v, err := hex.DecodeString(value) if err != nil { - return fmt.Errorf("%w: %v", errDigestMalformed, err) + return fmt.Errorf("%w: %w", errDigestMalformed, err) } for h, n := range supportedDigestAlgorithms { diff --git a/pkg/integrity/dsse.go b/pkg/integrity/dsse.go index 815366b5..b6508fbb 100644 --- a/pkg/integrity/dsse.go +++ b/pkg/integrity/dsse.go @@ -125,7 +125,7 @@ func (de *dsseDecoder) verifyMessage(ctx context.Context, r io.Reader, h crypto. vr.aks, err = v.Verify(ctx, &e) if err != nil { - return nil, fmt.Errorf("%w: %v", errDSSEVerifyEnvelopeFailed, err) + return nil, fmt.Errorf("%w: %w", errDSSEVerifyEnvelopeFailed, err) } if e.PayloadType != de.payloadType {