Skip to content

Commit ec7c16c

Browse files
authored
Merge pull request #135 from thockin/fix-actions-go-versions
Fix lint error and tests for Go versions
2 parents e2fd555 + e438a74 commit ec7c16c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 1 deletion
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)