Go

Go

Made by DeepSource

Use time.Sleep instead of single case select SCC-S1037

Anti-pattern
Major
Autofix

Instead of using a single case in a select statement that receives results from time.After is preferable to simply use time.Sleep.

Bad practice

select {
case <-time.After(0):
}

Recommended

time.Sleep(0)