diff --git a/xattr/xattr.go b/xattr/xattr_linux.go similarity index 100% rename from xattr/xattr.go rename to xattr/xattr_linux.go diff --git a/xattr/xattr_unsupported.go b/xattr/xattr_unsupported.go new file mode 100644 index 00000000..821dea3b --- /dev/null +++ b/xattr/xattr_unsupported.go @@ -0,0 +1,15 @@ +// +build !linux + +package xattr + +func Listxattr(path string) ([]string, error) { + return nil, ErrNotSupportedPlatform +} + +func Getxattr(path, attr string) (string, error) { + return "", ErrNotSupportedPlatform +} + +func Setxattr(path, xattr, value string) error { + return ErrNotSupportedPlatform +}