Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Go 1.20 #549

Merged
merged 1 commit into from Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:

env:
DEFAULT_GO_VERSION: 1.19
DEFAULT_GO_VERSION: '1.20'

jobs:
verify-versions:
Expand All @@ -29,8 +29,9 @@ jobs:
fail-fast: false
matrix:
go-version:
- 1.18
- 1.19
- '1.18'
- '1.19'
- '1.20'
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/verify-versions.yml
Expand Up @@ -12,10 +12,6 @@ jobs:
runs-on: ubuntu-22.04
name: Verify Go version
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Check Go module version
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan.yml
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: read

env:
GO_VERSION: 1.19
GO_VERSION: '1.20'

jobs:
go:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -71,8 +71,11 @@ unit-test-java:
.PHONEY: lint
lint:
"$(base_dir)/scripts/check_gofmt.sh" "$(go_dir)" "$(scenario_dir)/go"
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck -f stylish -tags="pkcs11" "$(go_dir)/..." "$(scenario_dir)/go"
# staticcheck 2022.1.3 (v0.3.3) does not work with go1.20 so use @master instead of @latest until a new version is released
if [ "$(shell go env GOVERSION | cut -d . -f 2)" -ge 19 ]; then \
go install honnef.co/go/tools/cmd/staticcheck@master; \
staticcheck -f stylish -tags="pkcs11" "$(go_dir)/..." "$(scenario_dir)/go"; \
fi
go vet -tags pkcs11 "$(go_dir)/..." "$(scenario_dir)/go"
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec -tags pkcs11 -exclude-generated "$(go_dir)/..."
Expand Down
2 changes: 1 addition & 1 deletion pkg/identity/sign_test.go
Expand Up @@ -9,10 +9,10 @@ package identity
import (
"crypto"
"crypto/ecdsa"
"crypto/rand"
"encoding/asn1"
"fmt"
"math/big"
"math/rand"
"testing"

"github.com/hyperledger/fabric-gateway/pkg/internal/test"
Expand Down