Documentation ¶
Overview ¶
Package nosleep contains a Go linter that prevents the use of time.Sleep in tests.
Time is not a synchronization mechanism. It is not an appropriate thing to use in tests because undoubtedly the thing you are synchronizing on is going to depend on some unspoken assumption that can and will randomly change. Do something else.
If god is dead and you need to do this anyways, add a comment that reads:
//nosleep:bypass put a reason why here
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{
Name: "nosleep",
Doc: "Prevent the use of time.Sleep in test functions",
Run: run,
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.