Fix missing vendor dir

This commit is contained in:
Michael Lehmann
2024-12-19 22:19:04 +01:00
parent 585f4eefa1
commit cc85816e3f
543 changed files with 247315 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package common
import (
"context"
"time"
)
// Sleep awaits for provided interval.
// Can be interrupted by context cancelation.
func Sleep(ctx context.Context, interval time.Duration) error {
var timer = time.NewTimer(interval)
select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
return nil
}
}