Skip to content

Commit 99ef8bc

Browse files
committed
fix linters errors
1 parent ec9a404 commit 99ef8bc

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

closer/closer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func New(ctx context.Context, signals ...os.Signal) *closer {
7878
}
7979

8080
<-ctx.Done()
81-
c.CloseAll()
81+
c.CloseAll() //nolint:contextcheck
8282
}()
8383

8484
return c

ctxkey/.golangci.yml

-5
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,6 @@ linters-settings:
165165
- sliceClear
166166
- stringXbytes
167167

168-
gofmt:
169-
rewrite-rules:
170-
- pattern: 'interface{}'
171-
replacement: 'any'
172-
173168
gosec:
174169
excludes:
175170
# _ instead of err checks

ctxkey/ctxkey.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
// operations in context value retrieval to use pointer equality within the
1212
// current Go's specification:
1313
//
14-
// https://golang.org/ref/spec#Comparison_operators
14+
// https://golang.org/ref/spec#Comparison_operators
1515
//
1616
// Additional allocations means that you will not allocate for the context key
1717
// as seen with this common idiom:
1818
//
19-
// type key int
20-
// var myKey key = 0
21-
// // 3 allocations, context struct, myKey and someValue
22-
// context.WithValue(ctx, myKey, SomeValue)
19+
// type key int
20+
// var myKey key = 0
21+
// // 3 allocations, context struct, myKey and someValue
22+
// context.WithValue(ctx, myKey, SomeValue)
2323
//
2424
// Keys issued by New() fit within an interface{} value, i.e.:
2525
//
26-
// var myKey = ctxkey.New(`MyKey`)
27-
// // 2 allocations, context struct and someValue
28-
// context.WithValue(ctx, myKey, SomeValue)
26+
// var myKey = ctxkey.New(`MyKey`)
27+
// // 2 allocations, context struct and someValue
28+
// context.WithValue(ctx, myKey, SomeValue)
2929
package ctxkey
3030

3131
import (

time/.golangci.yml

-5
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,6 @@ linters-settings:
165165
- sliceClear
166166
- stringXbytes
167167

168-
gofmt:
169-
rewrite-rules:
170-
- pattern: 'interface{}'
171-
replacement: 'any'
172-
173168
gosec:
174169
excludes:
175170
# _ instead of err checks

0 commit comments

Comments
 (0)