Browse Source

bump gofrs/flock v0.7.1

full diff: https://github.com/gofrs/flock/compare/v0.7.0...v0.7.1

- gofrs/flock#34 don't mention sync.Locker in package documentation
    - fixes gofrs/flock#33 incorrect interface
- gofrs/flock#35 Fix linting issues and add goreportcard badge

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 years ago
parent
commit
61a2b7ac94
3 changed files with 7 additions and 6 deletions
  1. 1 1
      vendor.conf
  2. 1 0
      vendor/github.com/gofrs/flock/README.md
  3. 5 5
      vendor/github.com/gofrs/flock/flock.go

+ 1 - 1
vendor.conf

@@ -33,7 +33,7 @@ github.com/opentracing/opentracing-go               1361b9cd60be79c4c3a7fa9841b3
 github.com/google/shlex                             6f45313302b9c56850fc17f99e40caebce98c716
 github.com/opentracing-contrib/go-stdlib            b1a47cfbdd7543e70e9ef3e73d0802ad306cc1cc
 github.com/mitchellh/hashstructure                  2bca23e0e452137f789efbc8610126fd8b94f73b
-github.com/gofrs/flock                              7f43ea2e6a643ad441fc12d0ecc0d3388b300c53 # v0.7.0
+github.com/gofrs/flock                              392e7fae8f1b0bdbd67dad7237d23f618feb6dbb # v0.7.1
 
 # libnetwork
 

+ 1 - 0
vendor/github.com/gofrs/flock/README.md

@@ -2,6 +2,7 @@
 [![TravisCI Build Status](https://img.shields.io/travis/gofrs/flock/master.svg?style=flat)](https://travis-ci.org/gofrs/flock)
 [![GoDoc](https://img.shields.io/badge/godoc-go--flock-blue.svg?style=flat)](https://godoc.org/github.com/gofrs/flock)
 [![License](https://img.shields.io/badge/license-BSD_3--Clause-brightgreen.svg?style=flat)](https://github.com/gofrs/flock/blob/master/LICENSE)
+[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/flock)](https://goreportcard.com/report/github.com/gofrs/flock)
 
 `flock` implements a thread-safe sync.Locker interface for file locking. It also
 includes a non-blocking TryLock() function to allow locking without blocking execution.

+ 5 - 5
vendor/github.com/gofrs/flock/flock.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by the BSD 3-Clause
 // license that can be found in the LICENSE file.
 
-// Package flock implements a thread-safe sync.Locker interface for file locking.
+// Package flock implements a thread-safe interface for file locking.
 // It also includes a non-blocking TryLock() function to allow locking
 // without blocking execution.
 //
@@ -13,7 +13,7 @@
 // guaranteed to be the same on each platform. For example, some UNIX-like
 // operating systems will transparently convert a shared lock to an exclusive
 // lock. If you Unlock() the flock from a location where you believe that you
-// have the shared lock, you may accidently drop the exclusive lock.
+// have the shared lock, you may accidentally drop the exclusive lock.
 package flock
 
 import (
@@ -86,17 +86,17 @@ func (f *Flock) String() string {
 // conditions is met: TryLock succeeds, TryLock fails with error, or Context
 // Done channel is closed.
 func (f *Flock) TryLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) {
-	return tryCtx(f.TryLock, ctx, retryDelay)
+	return tryCtx(ctx, f.TryLock, retryDelay)
 }
 
 // TryRLockContext repeatedly tries to take a shared lock until one of the
 // conditions is met: TryRLock succeeds, TryRLock fails with error, or Context
 // Done channel is closed.
 func (f *Flock) TryRLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) {
-	return tryCtx(f.TryRLock, ctx, retryDelay)
+	return tryCtx(ctx, f.TryRLock, retryDelay)
 }
 
-func tryCtx(fn func() (bool, error), ctx context.Context, retryDelay time.Duration) (bool, error) {
+func tryCtx(ctx context.Context, fn func() (bool, error), retryDelay time.Duration) (bool, error) {
 	if ctx.Err() != nil {
 		return false, ctx.Err()
 	}