Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit a20f8cb

Browse files
committed
Remove use of select with a single case
graceful.go:188:7: should use a simple channel send/receive instead of select with a single case (S1000)
1 parent e09a051 commit a20f8cb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

graceful.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,8 @@ func shutdown(s Shutdowner, logger Logger) {
185185
done := make(chan error)
186186

187187
go func() {
188-
select {
189-
case <-ctx.Done():
190-
done <- ctx.Err()
191-
}
188+
<-ctx.Done()
189+
done <- ctx.Err()
192190
}()
193191

194192
go func() {

0 commit comments

Comments
 (0)