Skip to content

Commit 702f5a6

Browse files
committed
Minor staticcheck fixes
Don't need the exception as my PR to improve it got merged.
1 parent 6f7689d commit 702f5a6

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

cmd/tomlv/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func main() {
5353
log.Fatalf("Error in '%s': %s", f, err)
5454
}
5555
if flagTime {
56-
fmt.Printf("%f\n", time.Now().Sub(start).Seconds())
56+
fmt.Printf("%f\n", time.Since(start).Seconds())
5757
}
5858
if flagTypes {
5959
printTypes(md)

decode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ func BenchmarkKey(b *testing.B) {
11441144
k := Key{"cargo-credential-macos-keychain", "version"}
11451145
b.ResetTimer()
11461146
for n := 0; n < b.N; n++ {
1147-
k.String()
1147+
_ = k.String()
11481148
}
11491149
}
11501150

parse.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func parse(data string) (p *parser, err error) {
5050
// it anyway.
5151
if strings.HasPrefix(data, "\xff\xfe") || strings.HasPrefix(data, "\xfe\xff") { // UTF-16
5252
data = data[2:]
53-
//lint:ignore S1017 https://github.com/dominikh/go-tools/issues/1447
5453
} else if strings.HasPrefix(data, "\xef\xbb\xbf") { // UTF-8
5554
data = data[3:]
5655
}

0 commit comments

Comments
 (0)