mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-30 04:05:36 +02:00
Fix lint warnings and std lib deprecations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user