Skip to content

Commit

Permalink
Update Go to v1.20 (#126)
Browse files Browse the repository at this point in the history
* Update to go v1.20

* Update golangci-lint to v1.53.3

* Remove deprecated rand.Seed

* Update missed go v1.20 definitions

* Remove depguard from golangci-lint
  • Loading branch information
optik-aper authored Jul 7, 2023
1 parent ef3ab0a commit f8e6d36
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Unit/Coverage Tests"
name: "Unit/Coverage Tests"

on:
pull_request_target:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: "1.20"

- name: Run unit tests and coverage test
id: test-coverage
Expand All @@ -28,10 +28,10 @@ jobs:
if: always()
run: |
CONTENT=$(cat output.txt)
CONTENT="${CONTENT//'%'/'%25'}"
CONTENT="${CONTENT//$'\n'/'%0A'}"
CONTENT="${CONTENT//$'\r'/'%0D'}"
echo "::set-output name=content::$CONTENT"
CONTENT="${CONTENT//'%'/'%25'}"
CONTENT="${CONTENT//$'\n'/'%0A'}"
CONTENT="${CONTENT//$'\r'/'%0D'}"
echo "::set-output name=content::$CONTENT"
comment:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
go version
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
- name: Run Lint
run: |
golangci-lint run driver/...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.19
go-version: "1.20"
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: "1.20"
-
name: Docker Login
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.19
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.19
go-version: "1.20"
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
Expand Down Expand Up @@ -97,6 +96,7 @@ linters:
- whitespace

# don't enable:
# - depguard
# - asciicheck
# - scopelint
# - gochecknoglobals
Expand Down
2 changes: 1 addition & 1 deletion driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

func init() { //nolint:gochecknoinits
rand.Seed(time.Now().UnixNano())
rand.New(rand.NewSource(time.Now().UnixNano()))
}

func TestDriverSuite(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vultr/vultr-csi

go 1.19
go 1.20

require (
github.com/container-storage-interface/spec v1.7.0
Expand Down

0 comments on commit f8e6d36

Please sign in to comment.