Skip to content

Commit 6210281

Browse files
committed
.github: update CI for more recent Go versions
1 parent 1d09c0b commit 6210281

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
- name: Install Go
88
uses: WillAbides/setup-go-faster@main
99
with:
10-
go-version: 1.21.x
10+
go-version: 1.24.x
1111
- uses: actions/checkout@v4
1212
with:
1313
path: './src/github.com/kevinburke/ssh_config'
1414
# staticcheck needs this for GOPATH
1515
- run: |
16-
echo "GO111MODULE=off" >> $GITHUB_ENV
16+
echo "GO111MODULE=on" >> $GITHUB_ENV
1717
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
1818
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
1919
- name: Run tests
@@ -23,7 +23,7 @@ jobs:
2323
test:
2424
strategy:
2525
matrix:
26-
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
26+
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x]
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Install Go

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
BUMP_VERSION := $(GOPATH)/bin/bump_version
2-
STATICCHECK := $(GOPATH)/bin/staticcheck
32
WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap
43

54
$(STATICCHECK):
6-
go get honnef.co/go/tools/cmd/staticcheck
5+
go install honnef.co/go/tools/cmd/staticcheck@latest
76

8-
lint: $(STATICCHECK)
7+
lint:
98
go vet ./...
10-
$(STATICCHECK)
9+
go run honnef.co/go/tools/cmd/staticcheck@latest ./...
1110

1211
test:
1312
@# the timeout helps guard against infinite recursion

parser.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ type sshParser struct {
2121
type sshParserStateFn func() sshParserStateFn
2222

2323
// Formats and panics an error message based on a token
24-
func (p *sshParser) raiseErrorf(tok *token, msg string, args ...interface{}) {
24+
func (p *sshParser) raiseErrorf(tok *token, msg string) {
2525
// TODO this format is ugly
26-
panic(tok.Position.String() + ": " + fmt.Sprintf(msg, args...))
26+
panic(tok.Position.String() + ": " + msg)
2727
}
2828

2929
func (p *sshParser) raiseError(tok *token, err error) {
@@ -118,7 +118,7 @@ func (p *sshParser) parseKV() sshParserStateFn {
118118
}
119119
pat, err := NewPattern(strPatterns[i])
120120
if err != nil {
121-
p.raiseErrorf(val, "Invalid host pattern: %v", err)
121+
p.raiseErrorf(val, fmt.Sprintf("Invalid host pattern: %v", err))
122122
return nil
123123
}
124124
patterns = append(patterns, pat)
@@ -144,7 +144,7 @@ func (p *sshParser) parseKV() sshParserStateFn {
144144
return nil
145145
}
146146
if err != nil {
147-
p.raiseErrorf(val, "Error parsing Include directive: %v", err)
147+
p.raiseErrorf(val, fmt.Sprintf("Error parsing Include directive: %v", err))
148148
return nil
149149
}
150150
lastHost.Nodes = append(lastHost.Nodes, inc)

0 commit comments

Comments
 (0)