mirror of
https://github.com/restic/restic.git
synced 2025-12-29 05:16:12 +00:00
Update dependencies
This commit is contained in:
5
vendor/github.com/pkg/profile/.travis.yml
generated
vendored
5
vendor/github.com/pkg/profile/.travis.yml
generated
vendored
@@ -1,9 +1,8 @@
|
||||
language: go
|
||||
go_import_path: github.com/pkg/profile
|
||||
go:
|
||||
- 1.4.3
|
||||
- 1.5.2
|
||||
- 1.6.3
|
||||
- 1.10.x
|
||||
- 1.12.x
|
||||
- tip
|
||||
|
||||
script:
|
||||
|
||||
25
vendor/github.com/pkg/profile/profile.go
generated
vendored
25
vendor/github.com/pkg/profile/profile.go
generated
vendored
@@ -19,6 +19,7 @@ const (
|
||||
mutexMode
|
||||
blockMode
|
||||
traceMode
|
||||
threadCreateMode
|
||||
)
|
||||
|
||||
// Profile represents an active profiling session.
|
||||
@@ -83,17 +84,20 @@ func MemProfileRate(rate int) func(*Profile) {
|
||||
|
||||
// MutexProfile enables mutex profiling.
|
||||
// It disables any previous profiling settings.
|
||||
//
|
||||
// Mutex profiling is a no-op before go1.8.
|
||||
func MutexProfile(p *Profile) { p.mode = mutexMode }
|
||||
|
||||
// BlockProfile enables block (contention) profiling.
|
||||
// It disables any previous profiling settings.
|
||||
func BlockProfile(p *Profile) { p.mode = blockMode }
|
||||
|
||||
// Trace profile controls if execution tracing will be enabled. It disables any previous profiling settings.
|
||||
// Trace profile enables execution tracing.
|
||||
// It disables any previous profiling settings.
|
||||
func TraceProfile(p *Profile) { p.mode = traceMode }
|
||||
|
||||
// ThreadcreationProfile enables thread creation profiling..
|
||||
// It disables any previous profiling settings.
|
||||
func ThreadcreationProfile(p *Profile) { p.mode = threadCreateMode }
|
||||
|
||||
// ProfilePath controls the base path where various profiling
|
||||
// files are written. If blank, the base path will be generated
|
||||
// by ioutil.TempDir.
|
||||
@@ -211,6 +215,21 @@ func Start(options ...func(*Profile)) interface {
|
||||
logf("profile: block profiling disabled, %s", fn)
|
||||
}
|
||||
|
||||
case threadCreateMode:
|
||||
fn := filepath.Join(path, "threadcreation.pprof")
|
||||
f, err := os.Create(fn)
|
||||
if err != nil {
|
||||
log.Fatalf("profile: could not create thread creation profile %q: %v", fn, err)
|
||||
}
|
||||
logf("profile: thread creation profiling enabled, %s", fn)
|
||||
prof.closer = func() {
|
||||
if mp := pprof.Lookup("threadcreate"); mp != nil {
|
||||
mp.WriteTo(f, 0)
|
||||
}
|
||||
f.Close()
|
||||
logf("profile: thread creation profiling disabled, %s", fn)
|
||||
}
|
||||
|
||||
case traceMode:
|
||||
fn := filepath.Join(path, "trace.out")
|
||||
f, err := os.Create(fn)
|
||||
|
||||
3
vendor/github.com/pkg/xattr/.travis.sh
generated
vendored
3
vendor/github.com/pkg/xattr/.travis.sh
generated
vendored
@@ -9,6 +9,9 @@ GOOS=darwin go build
|
||||
echo "Building for FreeBSD..."
|
||||
GOOS=freebsd go build
|
||||
|
||||
echo "Building for Windows...(dummy)"
|
||||
GOOS=windows go build
|
||||
|
||||
echo "Running tests..."
|
||||
go vet
|
||||
go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
||||
|
||||
6
vendor/github.com/pkg/xattr/.travis.yml
generated
vendored
6
vendor/github.com/pkg/xattr/.travis.yml
generated
vendored
@@ -2,11 +2,12 @@ language: go
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- "1.11"
|
||||
- "1.11.x"
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
|
||||
before_install:
|
||||
- go version
|
||||
@@ -18,7 +19,8 @@ install:
|
||||
|
||||
script:
|
||||
- ./.travis.sh
|
||||
- diff <(goimports -d .) <(printf "")
|
||||
# goimports on windows gives false positives
|
||||
- if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then diff <(goimports -d .) <(printf ""); fi
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
4
vendor/github.com/pkg/xattr/README.md
generated
vendored
4
vendor/github.com/pkg/xattr/README.md
generated
vendored
@@ -6,11 +6,11 @@
|
||||
|
||||
xattr
|
||||
=====
|
||||
Extended attribute support for Go (linux + darwin + freebsd).
|
||||
Extended attribute support for Go (linux + darwin + freebsd + netbsd).
|
||||
|
||||
"Extended attributes are name:value pairs associated permanently with files and directories, similar to the environment strings associated with a process. An attribute may be defined or undefined. If it is defined, its value may be empty or non-empty." [See more...](https://en.wikipedia.org/wiki/Extended_file_attributes)
|
||||
|
||||
`SetWithFlags` allows to additionally pass system flags to be forwarded to the underlying calls, FreeBSD does not support this and the parameter will be ignored.
|
||||
`SetWithFlags` allows to additionally pass system flags to be forwarded to the underlying calls. FreeBSD and NetBSD do not support this and the parameter will be ignored.
|
||||
|
||||
The `L` variants of all functions (`LGet/LSet/...`) are identical to `Get/Set/...` except that they
|
||||
do not reference a symlink that appears at the end of a path. See
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build freebsd
|
||||
// +build freebsd netbsd
|
||||
|
||||
package xattr
|
||||
|
||||
51
vendor/github.com/pkg/xattr/xattr_darwin.go
generated
vendored
51
vendor/github.com/pkg/xattr/xattr_darwin.go
generated
vendored
@@ -5,7 +5,6 @@ package xattr
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
@@ -30,23 +29,7 @@ func getxattr(path string, name string, data []byte) (int, error) {
|
||||
}
|
||||
|
||||
func lgetxattr(path string, name string, data []byte) (int, error) {
|
||||
value, size := bytePtrFromSlice(data)
|
||||
/*
|
||||
ssize_t getxattr(
|
||||
const char *path,
|
||||
const char *name,
|
||||
void *value,
|
||||
size_t size,
|
||||
u_int32_t position,
|
||||
int options
|
||||
)
|
||||
*/
|
||||
r0, _, err := syscall.Syscall6(syscall.SYS_GETXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))),
|
||||
uintptr(unsafe.Pointer(syscall.StringBytePtr(name))), uintptr(unsafe.Pointer(value)), uintptr(size), 0, XATTR_NOFOLLOW)
|
||||
if err != syscall.Errno(0) {
|
||||
return int(r0), err
|
||||
}
|
||||
return int(r0), nil
|
||||
return unix.Lgetxattr(path, name, data)
|
||||
}
|
||||
|
||||
func fgetxattr(f *os.File, name string, data []byte) (int, error) {
|
||||
@@ -58,7 +41,7 @@ func setxattr(path string, name string, data []byte, flags int) error {
|
||||
}
|
||||
|
||||
func lsetxattr(path string, name string, data []byte, flags int) error {
|
||||
return unix.Setxattr(path, name, data, flags|XATTR_NOFOLLOW)
|
||||
return unix.Lsetxattr(path, name, data, flags)
|
||||
}
|
||||
|
||||
func fsetxattr(f *os.File, name string, data []byte, flags int) error {
|
||||
@@ -70,19 +53,7 @@ func removexattr(path string, name string) error {
|
||||
}
|
||||
|
||||
func lremovexattr(path string, name string) error {
|
||||
/*
|
||||
int removexattr(
|
||||
const char *path,
|
||||
const char *name,
|
||||
int options
|
||||
);
|
||||
*/
|
||||
_, _, err := syscall.Syscall(syscall.SYS_REMOVEXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))),
|
||||
uintptr(unsafe.Pointer(syscall.StringBytePtr(name))), XATTR_NOFOLLOW)
|
||||
if err != syscall.Errno(0) {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return unix.Lremovexattr(path, name)
|
||||
}
|
||||
|
||||
func fremovexattr(f *os.File, name string) error {
|
||||
@@ -94,21 +65,7 @@ func listxattr(path string, data []byte) (int, error) {
|
||||
}
|
||||
|
||||
func llistxattr(path string, data []byte) (int, error) {
|
||||
name, size := bytePtrFromSlice(data)
|
||||
/*
|
||||
ssize_t listxattr(
|
||||
const char *path,
|
||||
char *name,
|
||||
size_t size,
|
||||
int options
|
||||
);
|
||||
*/
|
||||
r0, _, err := syscall.Syscall6(syscall.SYS_LISTXATTR, uintptr(unsafe.Pointer(syscall.StringBytePtr(path))),
|
||||
uintptr(unsafe.Pointer(name)), uintptr(size), XATTR_NOFOLLOW, 0, 0)
|
||||
if err != syscall.Errno(0) {
|
||||
return int(r0), err
|
||||
}
|
||||
return int(r0), nil
|
||||
return unix.Llistxattr(path, data)
|
||||
}
|
||||
|
||||
func flistxattr(f *os.File, data []byte) (int, error) {
|
||||
|
||||
60
vendor/github.com/pkg/xattr/xattr_unsupported.go
generated
vendored
Normal file
60
vendor/github.com/pkg/xattr/xattr_unsupported.go
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
// +build !linux,!freebsd,!netbsd,!darwin
|
||||
|
||||
package xattr
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func getxattr(path string, name string, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func lgetxattr(path string, name string, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func fgetxattr(f *os.File, name string, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func setxattr(path string, name string, data []byte, flags int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func lsetxattr(path string, name string, data []byte, flags int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func fsetxattr(f *os.File, name string, data []byte, flags int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func removexattr(path string, name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func lremovexattr(path string, name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func fremovexattr(f *os.File, name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func listxattr(path string, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func llistxattr(path string, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func flistxattr(f *os.File, data []byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
// dummy
|
||||
func stringsFromByteSlice(buf []byte) (result []string) {
|
||||
return []string{}
|
||||
}
|
||||
Reference in New Issue
Block a user