mirror of
https://github.com/restic/restic.git
synced 2026-09-24 04:50:30 +00:00
Update dependencies, enable pruning for vendor/
So, `dep` got an nice new feature to remove tests and non-go files from `vendor/`, and this brings the size of the vendor directory from ~300MiB down to ~20MiB. We don that now.
This commit is contained in:
+11
@@ -1,6 +1,7 @@
|
||||
[](http://godoc.org/github.com/pkg/xattr)
|
||||
[](https://goreportcard.com/report/github.com/pkg/xattr)
|
||||
[](https://travis-ci.org/pkg/xattr)
|
||||
[](https://github.com/pkg/xattr/releases)
|
||||
|
||||
xattr
|
||||
=====
|
||||
@@ -8,6 +9,11 @@ Extended attribute support for Go (linux + darwin + freebsd).
|
||||
|
||||
"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.
|
||||
|
||||
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
|
||||
[GoDoc](http://godoc.org/github.com/pkg/xattr) for details.
|
||||
|
||||
### Example
|
||||
```go
|
||||
@@ -31,4 +37,9 @@ Extended attribute support for Go (linux + darwin + freebsd).
|
||||
if err = xattr.Remove(path, prefix+"test"); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// One can also specify the flags parameter to be passed to the OS.
|
||||
if err := xattr.SetWithFlags(path, prefix+"test", []byte("test-attr-value"), xattr.XATTR_CREATE); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user