vendor: update all dependencies

* Update all dependencies
  * Remove all `[[constraint]]` from Gopkg.toml
  * Add in the minimum number of `[[override]]` to build
  * Remove go get of github.com/inconshreveable/mousetrap as it is vendored
  * Update docs with new policy on constraints
This commit is contained in:
Nick Craig-Wood 2018-05-02 17:09:45 +01:00
parent 21383877df
commit 6427029c4e
4902 changed files with 1443417 additions and 227283 deletions

View file

@ -1,9 +1,8 @@
// +build dragonfly freebsd linux netbsd openbsd plan9 solaris
// +build darwin dragonfly freebsd linux netbsd openbsd plan9 solaris
package daemon
import (
"fmt"
"syscall"
)
@ -22,19 +21,3 @@ func unlockFile(fd uintptr) error {
}
return err
}
const pathMax = 0x1000
func getFdName(fd uintptr) (name string, err error) {
path := fmt.Sprintf("/proc/self/fd/%d", int(fd))
// We use predefined pathMax const because /proc directory contains special files
// so that unable to get correct size of pseudo-symlink through lstat.
// please see notes and example for readlink syscall:
// http://man7.org/linux/man-pages/man2/readlink.2.html#NOTES
buf := make([]byte, pathMax)
var n int
if n, err = syscall.Readlink(path, buf); err == nil {
name = string(buf[:n])
}
return
}