File tree 4 files changed +18
-3
lines changed
4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change
1
+ # for available options see https://golangci-lint.run/usage/configuration/
2
+ linters :
3
+ enable :
4
+ - goimports
5
+ fast : true
Original file line number Diff line number Diff line change
1
+ .DEFAULT_GOAL := build
2
+
3
+ lint :
4
+ golangci-lint run ./...
5
+ .PHONY :lint
6
+
7
+ build : lint
8
+ echo " done"
9
+ .PHONY :build
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ func NewFnOnce[T any](f func() T) FnOnce[T] {
14
14
}
15
15
16
16
func (p FnOnce [T ]) Call () T {
17
- if p .called {
18
- return p .value
17
+ if ! p .called {
18
+ p .value , p .called = p .callable (), true
19
+ _ = p .called
19
20
}
20
- p .value , p .called = p .callable (), true
21
21
return p .value
22
22
}
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ func (s Set[T]) Pop() T {
160
160
// Remove all elements from the set.
161
161
func (s Set [T ]) Clear () {
162
162
s .inner = make (map [T ]bool , 0 )
163
+ _ = s .inner
163
164
}
164
165
165
166
// Update the set, adding elements from all others.
You can’t perform that action at this time.
0 commit comments