Browse Source

golint: fixed some golint warnings

pull/628/head
sina safari 5 years ago
parent
commit
19b3197c94
  1. 4
      regexp_test.go

4
regexp_test.go

@ -54,7 +54,7 @@ func Benchmark_findQueryKey(b *testing.B) {
b.ReportAllocs() b.ReportAllocs()
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
for key, _ := range all { for key := range all {
_, _ = findFirstQueryKey(query, key) _, _ = findFirstQueryKey(query, key)
} }
} }
@ -79,7 +79,7 @@ func Benchmark_findQueryKeyGoLib(b *testing.B) {
b.ReportAllocs() b.ReportAllocs()
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
for key, _ := range all { for key := range all {
v := u.Query()[key] v := u.Query()[key]
if len(v) > 0 { if len(v) > 0 {
_ = v[0] _ = v[0]

Loading…
Cancel
Save