Fix lint warnings and std lib deprecations

This commit is contained in:
MaxJa4
2023-08-25 19:12:32 +02:00
parent 3d7677f02a
commit 548d741f03
5 changed files with 12 additions and 10 deletions

View File

@@ -15,10 +15,12 @@ import (
// caller invokes the returned release func. In case the lock is currently blocked
// by another execution, it will repeatedly retry until the lock is available
// or the given timeout is exceeded.
//
//lint:ignore U1000 Keep unused function
func (s *script) lock(lockfile string) (func() error, error) {
start := time.Now()
defer func() {
s.stats.LockedTime = time.Now().Sub(start)
s.stats.LockedTime = time.Since(start)
}()
retry := time.NewTicker(5 * time.Second)