mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-14 09:18:51 +02:00
Add gocritic linter (#1324)
* Add gocritic linter `gocritic` provides diagnostics that check for bugs, performance, and style issues We disable the following checks: - commentFormatting - captLocal - deprecatedComment This PR contains many `//nolint:gocritic` to disable `appendAssign`.
This commit is contained in:
@ -15,7 +15,7 @@ func Retry(attempts int, sleep time.Duration, toExec func() error, onError func(
|
||||
|
||||
if attempts--; attempts > 0 {
|
||||
jitter := time.Duration(rand.Int63n(int64(sleep)))
|
||||
sleep = sleep + jitter/2
|
||||
sleep += jitter / 2
|
||||
|
||||
onError(err)
|
||||
time.Sleep(sleep)
|
||||
|
Reference in New Issue
Block a user