We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd0fa1d commit ccb108cCopy full SHA for ccb108c
1 file changed
exitplan_test.go
@@ -196,13 +196,16 @@ func TestOnExitTimeout(t *testing.T) {
196
func TestCallbackName(t *testing.T) {
197
t.Parallel()
198
199
+ mu := sync.Mutex{}
200
names := make([]string, 0)
201
202
l := exitplan.New(
203
exitplan.WithExitError(func(err error) {
204
var exErr *exitplan.CallbackErr
205
if errors.As(err, &exErr) {
206
+ mu.Lock()
207
names = append(names, exErr.Name)
208
+ mu.Unlock()
209
}
210
}),
211
)
0 commit comments