diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 25e1afd..251f7fa 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -11,12 +11,12 @@ jobs: env: RUNGOGENERATE: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: - go-version: "1.18.x" + go-version: "1.19.x" - name: Run repo-specific setup uses: ./.github/actions/go-check-setup if: hashFiles('./.github/actions/go-check-setup') != '' @@ -27,7 +27,7 @@ jobs: echo "RUNGOGENERATE=true" >> $GITHUB_ENV fi - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@d7e217c1ff411395475b2971c0824e1e7cc1af98 # 2022.1 (v0.3.0) + run: go install honnef.co/go/tools/cmd/staticcheck@376210a89477dedbe6fdc4484b233998650d7b3c # 2022.1.3 (v0.3.3) - name: Check that go.mod is tidy uses: protocol/multiple-go-modules@v1.2 with: diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index b86241a..8a1697b 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -10,16 +10,16 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.17.x", "1.18.x" ] + go: [ "1.18.x", "1.19.x" ] env: COVERAGES: "" runs-on: ${{ format('{0}-latest', matrix.os) }} name: ${{ matrix.os }} (go ${{ matrix.go }}) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Go information @@ -43,7 +43,7 @@ jobs: # Use -coverpkg=./..., so that we include cross-package coverage. # If package ./A imports ./B, and ./A's tests also cover ./B, # this means ./B's coverage will be significantly higher than 0%. - run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./... + run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./... - name: Run tests (32 bit) if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. uses: protocol/multiple-go-modules@v1.2 @@ -52,7 +52,7 @@ jobs: with: run: | export "PATH=${{ env.PATH_386 }}:$PATH" - go test -v ./... + go test -v -shuffle=on ./... - name: Run tests with race detector if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow uses: protocol/multiple-go-modules@v1.2 @@ -62,7 +62,7 @@ jobs: shell: bash run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV - name: Upload coverage to Codecov - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 + uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0 with: files: '${{ env.COVERAGES }}' env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} diff --git a/go.mod b/go.mod index 189f70d..ac17108 100644 --- a/go.mod +++ b/go.mod @@ -14,4 +14,4 @@ require ( golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect ) -go 1.17 +go 1.18 diff --git a/go.sum b/go.sum index 680bbcd..1dbed46 100644 --- a/go.sum +++ b/go.sum @@ -11,13 +11,7 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= diff --git a/register/all/multihash_all.go b/register/all/multihash_all.go index 9a623c5..26eabf7 100644 --- a/register/all/multihash_all.go +++ b/register/all/multihash_all.go @@ -1,18 +1,18 @@ /* - This package has no purpose except to perform registration of mulithashes. +This package has no purpose except to perform registration of mulithashes. - It is meant to be used as a side-effecting import, e.g. +It is meant to be used as a side-effecting import, e.g. - import ( - _ "github.com/multiformats/go-multihash/register/all" - ) + import ( + _ "github.com/multiformats/go-multihash/register/all" + ) - This package registers many multihashes at once. - Importing it will increase the size of your dependency tree significantly. - It's recommended that you import this package if you're building some - kind of data broker application, which may need to handle many different kinds of hashes; - if you're building an application which you know only handles a specific hash, - importing this package may bloat your builds unnecessarily. +This package registers many multihashes at once. +Importing it will increase the size of your dependency tree significantly. +It's recommended that you import this package if you're building some +kind of data broker application, which may need to handle many different kinds of hashes; +if you're building an application which you know only handles a specific hash, +importing this package may bloat your builds unnecessarily. */ package all diff --git a/register/blake3/multihash_blake3.go b/register/blake3/multihash_blake3.go index 143fb57..8e7c00f 100644 --- a/register/blake3/multihash_blake3.go +++ b/register/blake3/multihash_blake3.go @@ -1,11 +1,11 @@ /* - This package has no purpose except to register the blake3 hash function. +This package has no purpose except to register the blake3 hash function. - It is meant to be used as a side-effecting import, e.g. +It is meant to be used as a side-effecting import, e.g. - import ( - _ "github.com/multiformats/go-multihash/register/blake3" - ) + import ( + _ "github.com/multiformats/go-multihash/register/blake3" + ) */ package blake3 diff --git a/register/miniosha256/multihash_miniosha256.go b/register/miniosha256/multihash_miniosha256.go index 66eccd5..82320e7 100644 --- a/register/miniosha256/multihash_miniosha256.go +++ b/register/miniosha256/multihash_miniosha256.go @@ -1,14 +1,14 @@ /* - This package has no purpose except to perform registration of multihashes. +This package has no purpose except to perform registration of multihashes. - It is meant to be used as a side-effecting import, e.g. +It is meant to be used as a side-effecting import, e.g. - import ( - _ "github.com/multiformats/go-multihash/register/miniosha256" - ) + import ( + _ "github.com/multiformats/go-multihash/register/miniosha256" + ) - This package registers alternative implementations for sha2-256, using - the github.com/minio/sha256-simd library. +This package registers alternative implementations for sha2-256, using +the github.com/minio/sha256-simd library. */ package miniosha256 diff --git a/register/murmur3/multihash_murmur3.go b/register/murmur3/multihash_murmur3.go index cdf6d69..15890e5 100644 --- a/register/murmur3/multihash_murmur3.go +++ b/register/murmur3/multihash_murmur3.go @@ -1,13 +1,13 @@ /* - This package has no purpose except to perform registration of multihashes. +This package has no purpose except to perform registration of multihashes. - It is meant to be used as a side-effecting import, e.g. +It is meant to be used as a side-effecting import, e.g. - import ( - _ "github.com/multiformats/go-multihash/register/murmur3" - ) + import ( + _ "github.com/multiformats/go-multihash/register/murmur3" + ) - This package registers multihashes for murmur3 +This package registers multihashes for murmur3 */ package murmur3 diff --git a/register/sha3/multihash_sha3.go b/register/sha3/multihash_sha3.go index db70b2b..c079e95 100644 --- a/register/sha3/multihash_sha3.go +++ b/register/sha3/multihash_sha3.go @@ -1,15 +1,15 @@ /* - This package has no purpose except to perform registration of multihashes. +This package has no purpose except to perform registration of multihashes. - It is meant to be used as a side-effecting import, e.g. +It is meant to be used as a side-effecting import, e.g. - import ( - _ "github.com/multiformats/go-multihash/register/sha3" - ) + import ( + _ "github.com/multiformats/go-multihash/register/sha3" + ) - This package registers several multihashes for the sha3 family. - This also includes some functions known as "shake" and "keccak", - since they share much of their implementation and come in the same repos. +This package registers several multihashes for the sha3 family. +This also includes some functions known as "shake" and "keccak", +since they share much of their implementation and come in the same repos. */ package sha3