Skip to content

Commit e438a74

Browse files
committed
Fix GH actions for Go versions, drop 1.14
Also fix a lint-warning, which ensures the tests have something to test.
1 parent eb02c45 commit e438a74

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/tests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ jobs:
66
test:
77
strategy:
88
matrix:
9-
go-versions: [ 1.14.x, 1.15.x, 1.16.x ]
9+
version: [ '1.15', '1.16', '1.17' ]
1010
platform: [ ubuntu-latest, macos-latest, windows-latest ]
1111
runs-on: ${{ matrix.platform }}
1212
steps:
1313
- name: Install Go
1414
uses: actions/setup-go@v2
1515
with:
16-
go-version: ${{ matrix.go-version }}
16+
go-version: ${{ matrix.version }}
1717
- name: Checkout code
1818
uses: actions/checkout@v2
1919
- name: Build

funcr/funcr.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,9 @@ func (f Formatter) prettyWithFlags(value interface{}, flags uint32, depth int) s
408408
if i > 0 {
409409
buf.WriteByte(',')
410410
}
411+
k, _ := v[i].(string) // sanitize() above means no need to check success
411412
// arbitrary keys might need escaping
412-
buf.WriteString(prettyString(v[i].(string)))
413+
buf.WriteString(prettyString(k))
413414
buf.WriteByte(':')
414415
buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1))
415416
}

0 commit comments

Comments
 (0)