-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update Go version #24
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the latest version of Go is not required.
The version inside the go.mod is the min Go version and only need to be updated when using specific elements of a Go version.
.github/workflows/go-cross.yml
Outdated
@@ -11,7 +11,7 @@ jobs: | |||
|
|||
strategy: | |||
matrix: | |||
go-version: [ 1.19, 1.x ] | |||
go-version: [ 1.23, 1.x ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go-version: [ 1.23, 1.x ] | |
go-version: [ oldstable, stable ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply suggestions Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
@ldez I applied your suggestion :) thank you! |
All the following section: steps:
# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}(${{ matrix.arch }})
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
architecture: ${{ matrix.arch }}
# https://github.com/marketplace/actions/checkout
- name: Checkout code
uses: actions/checkout@v2
# https://github.com/marketplace/actions/cache
- name: Cache Go modules
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-${{ matrix.arch }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-${{ matrix.go-version }}-go- should be replaced by: steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
architecture: ${{ matrix.arch }} |
@ldez Hi, sorry for late response since I was busy! I updated the actions but got |
Sorry you must remove:
and the element related to the matrix. Github action supports only amd64. |
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
@ldez thank you for code suggestion, applied! |
Hi, I tried to make a plugin by myself and noticed Go itself and several tools version are old so I updated.
Updated tools
go mod tidy -go=1.23
)Updated tool settings
goerr133
toerr133
fmt.Errorf
toerrors.New
Other
Maybe we can use
package plugindemo
instead ofpackage plugindemo_test
fordemo_test.go
since golangci-lint detectsdepguard
because it imports not-test package?