From 539a1e7a4ed9d2048a922dc2edb22e9cc550b781 Mon Sep 17 00:00:00 2001 From: Stephen Day Date: Wed, 18 Aug 2021 18:36:22 -0700 Subject: [PATCH 1/6] digest: promote blake3 to first-class digest The dual module approach for blake3 was slightly awkward. Since it provides similar usability with a massive bump in performance, it's extremely likely to land as a registered algorithm in the image-spec. This PR removes the secondary module, which made it difficult to test as a unit. This may break users who are using HEAD versions of the package. For a new release, this will be backwards compatible. The other drawback is that the zeebo/blake3 will now be a dependency but this can be replaced transparently by the standard libary in the future. In addition to promoting blake3, this makes a few style adjustments to be in line with Go's style guidelines. Signed-off-by: Stephen Day --- .github/workflows/test.yml | 3 -- algorithm.go | 30 +++++++++------ blake3/blake3.go => blake3.go | 14 +++++-- blake3/blake3_test.go | 39 ------------------- blake3/go.mod | 15 -------- digest_test.go | 3 ++ go.mod | 2 + blake3/go.sum => go.sum | 0 testdigest/testdigest.go | 72 ----------------------------------- verifiers_test.go | 9 +++++ 10 files changed, 42 insertions(+), 145 deletions(-) rename blake3/blake3.go => blake3.go (77%) delete mode 100644 blake3/blake3_test.go delete mode 100644 blake3/go.mod rename blake3/go.sum => go.sum (100%) delete mode 100644 testdigest/testdigest.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29c256c..7d30c87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,3 @@ jobs: uses: actions/checkout@v4 - name: Test run: go test -v ./... - - name: Test Blake3 - run: go test -v ./... - working-directory: blake3 diff --git a/algorithm.go b/algorithm.go index bcf2b49..1d9d7fc 100644 --- a/algorithm.go +++ b/algorithm.go @@ -103,14 +103,16 @@ const ( var algorithmRegexp = regexp.MustCompile(`^[a-z0-9]+([+._-][a-z0-9]+)*$`) -// CryptoHash is the interface that any hash algorithm must implement +// CryptoHash is the interface that any digest algorithm must implement type CryptoHash interface { - // Available reports whether the given hash function is usable in the current binary. + // Available reports whether the given hash function is usable in the + // current binary. Available() bool - // Size returns the length, in bytes, of a digest resulting from the given hash function. + // Size returns the length, in bytes, of a digest resulting from the given + // hash function. Size() int - // New returns a new hash.Hash calculating the given hash function. If the hash function is not - // available, it may panic. + // New returns a new hash.Hash calculating the given hash function. If the + // hash function is not available, it may panic. New() hash.Hash } @@ -129,14 +131,16 @@ var ( algorithmsLock sync.RWMutex ) -// RegisterAlgorithm may be called to dynamically register an algorithm. The implementation is a CryptoHash, and -// the regex is meant to match the hash portion of the algorithm. If a duplicate algorithm is already registered, -// the return value is false, otherwise if registration was successful the return value is true. +// RegisterAlgorithm may be called to dynamically register an algorithm. The +// implementation is a CryptoHash, and the regex is meant to match the hash +// portion of the algorithm. If a duplicate algorithm is already registered, the +// return value is false, otherwise if registration was successful the return +// value is true. // // The algorithm encoding format must be based on hex. // -// The algorithm name must be conformant to the BNF specification in the OCI image-spec, otherwise the function -// will panic. +// The algorithm name must be conformant to the BNF specification in the OCI +// image-spec, otherwise the function will panic. func RegisterAlgorithm(algorithm Algorithm, implementation CryptoHash) bool { algorithmsLock.Lock() defer algorithmsLock.Unlock() @@ -150,8 +154,10 @@ func RegisterAlgorithm(algorithm Algorithm, implementation CryptoHash) bool { } algorithms[algorithm] = implementation - // We can do this since the Digest function below only implements a hex digest. If we open this in the future - // we need to allow for alternative digest algorithms to be implemented and for the user to pass their own + + // We can do this since the Digest function below only implements a hex + // digest. If we open this in the future we need to allow for alternative + // digest algorithms to be implemented and for the user to pass their own // custom regexp. anchoredEncodedRegexps[algorithm] = hexDigestRegex(implementation) return true diff --git a/blake3/blake3.go b/blake3.go similarity index 77% rename from blake3/blake3.go rename to blake3.go index 2f7df59..00b3a42 100644 --- a/blake3/blake3.go +++ b/blake3.go @@ -11,18 +11,24 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -package blake3 +package digest import ( "hash" - "github.com/opencontainers/go-digest" "github.com/zeebo/blake3" ) +const ( + // Blake3 is the blake3 algorithm with the default 256-bit output size + Blake3 Algorithm = "blake3" + + // BLAKE3 is deprecated. Use the symbol "Blake3" instead. + BLAKE3 = Blake3 +) + func init() { - digest.RegisterAlgorithm(digest.BLAKE3, &blake3hash{}) + RegisterAlgorithm(Blake3, &blake3hash{}) } type blake3hash struct{} diff --git a/blake3/blake3_test.go b/blake3/blake3_test.go deleted file mode 100644 index cb9a230..0000000 --- a/blake3/blake3_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 OCI Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package blake3 - -import ( - "testing" - - "github.com/opencontainers/go-digest" - "github.com/opencontainers/go-digest/testdigest" -) - -func TestBLAKE3(t *testing.T) { - testdigest.RunTestCase(t, testdigest.TestCase{ - Input: "blake3:af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", - Algorithm: "blake3", - Encoded: "af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", - }) -} - -func TestBLAKE3Vector(t *testing.T) { - // From the BLAKE3 test vectors. - testvector := digest.BLAKE3.FromBytes([]byte{0, 1, 2, 3, 4}) - expected := "blake3:b40b44dfd97e7a84a996a91af8b85188c66c126940ba7aad2e7ae6b385402aa2" - if string(testvector) != expected { - t.Fatalf("Expected: %s; Got: %s", expected, testvector) - } -} diff --git a/blake3/go.mod b/blake3/go.mod deleted file mode 100644 index 45d35c9..0000000 --- a/blake3/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/opencontainers/go-digest/blake3 - -go 1.18 - -require ( - github.com/opencontainers/go-digest v1.0.0 - github.com/zeebo/blake3 v0.2.3 -) - -replace github.com/opencontainers/go-digest => ../ - -require ( - github.com/klauspost/cpuid/v2 v2.2.5 // indirect - golang.org/x/sys v0.13.0 // indirect -) diff --git a/digest_test.go b/digest_test.go index 132d9e5..5d31ecb 100644 --- a/digest_test.go +++ b/digest_test.go @@ -38,6 +38,9 @@ func TestParseDigest(t *testing.T) { Algorithm: "sha384", Encoded: "d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", }, + { + Input: "blake3:af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", + Algorithm: "blake3", { // empty Input: "", diff --git a/go.mod b/go.mod index a8be38c..ba90833 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/opencontainers/go-digest go 1.18 + +require github.com/zeebo/blake3 v0.2.0 diff --git a/blake3/go.sum b/go.sum similarity index 100% rename from blake3/go.sum rename to go.sum diff --git a/testdigest/testdigest.go b/testdigest/testdigest.go deleted file mode 100644 index 79f4a51..0000000 --- a/testdigest/testdigest.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2021 OCI Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package testdigest is a separate package, because it has some testing -// utilities that may be useful to other internal Algorithm implementors. -// -// It is not a stable interface and not meant for consumption outside of -// digest developers. -package testdigest - -import ( - "errors" - "testing" - - "github.com/opencontainers/go-digest" -) - -type TestCase struct { - // Input the formal format of the hash, for example sha256:e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b - Input string - // If err is non-nil, then the parsing of Input is expected to return this error - Err error - // Algorithm should be an available or registered algorithm - Algorithm digest.Algorithm - // Encoded is the the encoded portion of the digest to expect, for example e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b - Encoded string -} - -func RunTestCase(t *testing.T, testcase TestCase) { - dgst, err := digest.Parse(testcase.Input) - if !errors.Is(err, testcase.Err) { - t.Fatalf("error differed from expected while parsing %q: %v != %v", testcase.Input, err, testcase.Err) - } - - if testcase.Err != nil { - return - } - - if dgst.Algorithm() != testcase.Algorithm { - t.Fatalf("incorrect Algorithm for parsed digest: %q != %q", dgst.Algorithm(), testcase.Algorithm) - } - - if dgst.Encoded() != testcase.Encoded { - t.Fatalf("incorrect hex for parsed digest: %q != %q", dgst.Encoded(), testcase.Encoded) - } - - // Parse string return value and check equality - newParsed, err := digest.Parse(dgst.String()) - if err != nil { - t.Fatalf("unexpected error parsing Input %q: %v", testcase.Input, err) - } - - if newParsed != dgst { - t.Fatalf("expected equal: %q != %q", newParsed, dgst) - } - - newFromHex := digest.NewDigestFromEncoded(newParsed.Algorithm(), newParsed.Encoded()) - if newFromHex != dgst { - t.Fatalf("%v != %v", newFromHex, dgst) - } -} diff --git a/verifiers_test.go b/verifiers_test.go index 0e35115..9157a27 100644 --- a/verifiers_test.go +++ b/verifiers_test.go @@ -37,6 +37,15 @@ func TestDigestVerifier(t *testing.T) { } } +func TestDigestBlakeVector(t *testing.T) { + // From the BLAKE3 test vectors. + testvector := Blake3.FromBytes([]byte{0, 1, 2, 3, 4}) + expected := "blake3:b40b44dfd97e7a84a996a91af8b85188c66c126940ba7aad2e7ae6b385402aa2" + if string(testvector) != expected { + t.Fatalf("Expected: %s; Got: %s", expected, testvector) + } +} + // TestVerifierUnsupportedDigest ensures that unsupported digest validation is // flowing through verifier creation. func TestVerifierUnsupportedDigest(t *testing.T) { From b67785d9468830bb3de96fe70e30b6b38bd9c135 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 25 Apr 2025 12:01:16 -0700 Subject: [PATCH 2/6] fix: update stevvooe's blake3 PR https://github.com/opencontainers/go-digest/pull/66 https://github.com/opencontainers/image-spec/pull/1240 Signed-off-by: Ramkumar Chinchani --- go.mod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index ba90833..9813b65 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,9 @@ module github.com/opencontainers/go-digest go 1.18 -require github.com/zeebo/blake3 v0.2.0 +require github.com/zeebo/blake3 v0.2.4 + +require ( + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + golang.org/x/sys v0.32.0 // indirect +) From 53fecb6d3de0094217183027fc8eb5bcc441d9bf Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 25 Apr 2025 12:09:46 -0700 Subject: [PATCH 3/6] fix: add a length test for blake3 Signed-off-by: Ramkumar Chinchani --- digest_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/digest_test.go b/digest_test.go index 5d31ecb..a8fdabc 100644 --- a/digest_test.go +++ b/digest_test.go @@ -87,7 +87,12 @@ func TestParseDigest(t *testing.T) { Err: digest.ErrDigestInvalidLength, }, { - Input: "foo:d41d8cd98f00b204e9800998ecf8427e", + // too short (from different algorithm) + input: "blake3:abcdef0123456789abcdef0123456789abcdef01234", + Err: diest.ErrDigestInvalidLength, + }, + { + input: "foo:d41d8cd98f00b204e9800998ecf8427e", Err: digest.ErrDigestUnsupported, }, { From 56db9bb4d275b5236c2055a4019f556ae7c8b76e Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 25 Apr 2025 12:11:15 -0700 Subject: [PATCH 4/6] fix: add a Makefile make make build make test Signed-off-by: Ramkumar Chinchani --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..381020e --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.PHONY: all build test + +all: build test + +build: + go build -v ./... + +test: + go test -v -cover -race ./... From 01e3f4bab87900f5d56bc8006ead0953957b282e Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 25 Apr 2025 12:25:57 -0700 Subject: [PATCH 5/6] fix: merge conflicts Signed-off-by: Ramkumar Chinchani --- blake3.go | 3 -- digest_test.go | 8 +++-- go.mod | 2 +- go.sum | 18 ++++------ testdigest/testdigest.go | 72 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 testdigest/testdigest.go diff --git a/blake3.go b/blake3.go index 00b3a42..f40972e 100644 --- a/blake3.go +++ b/blake3.go @@ -22,9 +22,6 @@ import ( const ( // Blake3 is the blake3 algorithm with the default 256-bit output size Blake3 Algorithm = "blake3" - - // BLAKE3 is deprecated. Use the symbol "Blake3" instead. - BLAKE3 = Blake3 ) func init() { diff --git a/digest_test.go b/digest_test.go index a8fdabc..379e5a1 100644 --- a/digest_test.go +++ b/digest_test.go @@ -41,6 +41,8 @@ func TestParseDigest(t *testing.T) { { Input: "blake3:af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", Algorithm: "blake3", + Encoded: "af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", + }, { // empty Input: "", @@ -88,11 +90,11 @@ func TestParseDigest(t *testing.T) { }, { // too short (from different algorithm) - input: "blake3:abcdef0123456789abcdef0123456789abcdef01234", - Err: diest.ErrDigestInvalidLength, + Input: "blake3:abcdef0123456789abcdef0123456789abcdef01234", + Err: digest.ErrDigestInvalidLength, }, { - input: "foo:d41d8cd98f00b204e9800998ecf8427e", + Input: "foo:d41d8cd98f00b204e9800998ecf8427e", Err: digest.ErrDigestUnsupported, }, { diff --git a/go.mod b/go.mod index 9813b65..ee57172 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/opencontainers/go-digest -go 1.18 +go 1.23 require github.com/zeebo/blake3 v0.2.4 diff --git a/go.sum b/go.sum index 125dc80..834b23c 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,10 @@ -github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/blake3 v0.2.2 h1:ddH9fUIlef5r+pqvJShGgSXFd6c7k54eQXZ48hNjotQ= -github.com/zeebo/blake3 v0.2.2/go.mod h1:TSQ0KjMH+pht+bRyvVooJ1rBpvvngSGaPISafq9MxJk= -github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= -github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= +github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI= +github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE= github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= -golang.org/x/sys v0.0.0-20201014080544-cc95f250f6bc h1:HVFDs9bKvTxP6bh1Rj9MCSo+UmafQtI8ZWDPVwVk9g4= -golang.org/x/sys v0.0.0-20201014080544-cc95f250f6bc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= diff --git a/testdigest/testdigest.go b/testdigest/testdigest.go new file mode 100644 index 0000000..79f4a51 --- /dev/null +++ b/testdigest/testdigest.go @@ -0,0 +1,72 @@ +// Copyright 2021 OCI Contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package testdigest is a separate package, because it has some testing +// utilities that may be useful to other internal Algorithm implementors. +// +// It is not a stable interface and not meant for consumption outside of +// digest developers. +package testdigest + +import ( + "errors" + "testing" + + "github.com/opencontainers/go-digest" +) + +type TestCase struct { + // Input the formal format of the hash, for example sha256:e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b + Input string + // If err is non-nil, then the parsing of Input is expected to return this error + Err error + // Algorithm should be an available or registered algorithm + Algorithm digest.Algorithm + // Encoded is the the encoded portion of the digest to expect, for example e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b + Encoded string +} + +func RunTestCase(t *testing.T, testcase TestCase) { + dgst, err := digest.Parse(testcase.Input) + if !errors.Is(err, testcase.Err) { + t.Fatalf("error differed from expected while parsing %q: %v != %v", testcase.Input, err, testcase.Err) + } + + if testcase.Err != nil { + return + } + + if dgst.Algorithm() != testcase.Algorithm { + t.Fatalf("incorrect Algorithm for parsed digest: %q != %q", dgst.Algorithm(), testcase.Algorithm) + } + + if dgst.Encoded() != testcase.Encoded { + t.Fatalf("incorrect hex for parsed digest: %q != %q", dgst.Encoded(), testcase.Encoded) + } + + // Parse string return value and check equality + newParsed, err := digest.Parse(dgst.String()) + if err != nil { + t.Fatalf("unexpected error parsing Input %q: %v", testcase.Input, err) + } + + if newParsed != dgst { + t.Fatalf("expected equal: %q != %q", newParsed, dgst) + } + + newFromHex := digest.NewDigestFromEncoded(newParsed.Algorithm(), newParsed.Encoded()) + if newFromHex != dgst { + t.Fatalf("%v != %v", newFromHex, dgst) + } +} From 658ea7a3240b65a8625a50c7376f91cddedf29c4 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Fri, 25 Apr 2025 12:36:05 -0700 Subject: [PATCH 6/6] fix: blake3 pulls in golang 1.22.x dep 2025-04-25T19:33:20.2495501Z go: downloading github.com/zeebo/blake3 v0.2.4 2025-04-25T19:33:20.3154128Z go: downloading github.com/klauspost/cpuid/v2 v2.2.10 2025-04-25T19:33:20.3959610Z github.com/klauspost/cpuid/v2: cannot compile Go 1.22 code 2025-04-25T19:33:21.1059807Z FAIL github.com/opencontainers/go-digest [build failed] 2025-04-25T19:33:21.1060449Z FAIL github.com/opencontainers/go-digest/digestset [build failed] 2025-04-25T19:33:21.1219422Z ##[error]Process completed with exit code 1. Signed-off-by: Ramkumar Chinchani --- .github/workflows/test.yml | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d30c87..21836cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x] + go-version: [1.22.x, 1.23.x, 1.24.x] platform: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/go.mod b/go.mod index ee57172..14e8bc0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/opencontainers/go-digest -go 1.23 +go 1.22 require github.com/zeebo/blake3 v0.2.4