Fix three golint warnings
We are clean again. Warnings were: internal/fusefrontend/fs.go:443:14: should omit type string from declaration of var cTarget; it will be inferred from the right-hand side internal/fusefrontend/xattr.go:26:1: comment on exported method FS.GetXAttr should be of the form "GetXAttr ..." internal/syscallcompat/sys_common.go:9:7: exported const PATH_MAX should have comment or be unexported
This commit is contained in:
parent
009cc0ae8b
commit
1bab400fca
@ -440,7 +440,7 @@ func (fs *FS) Symlink(target string, linkName string, context *fuse.Context) (co
|
||||
return fuse.ToStatus(err)
|
||||
}
|
||||
defer dirfd.Close()
|
||||
var cTarget string = target
|
||||
cTarget := target
|
||||
if !fs.args.PlaintextNames {
|
||||
// Symlinks are encrypted like file contents (GCM) and base64-encoded
|
||||
cTarget = fs.encryptSymlinkTarget(target)
|
||||
|
@ -23,7 +23,7 @@ var xattrNameIV = []byte("xattr_name_iv_xx")
|
||||
// encrypted original name.
|
||||
var xattrStorePrefix = "user.gocryptfs."
|
||||
|
||||
// GetXAttr: read the value of extended attribute "attr".
|
||||
// GetXAttr reads the value of extended attribute "attr".
|
||||
// Implements pathfs.Filesystem.
|
||||
func (fs *FS) GetXAttr(path string, attr string, context *fuse.Context) ([]byte, fuse.Status) {
|
||||
if fs.isFiltered(path) {
|
||||
|
@ -6,7 +6,9 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const PATH_MAX = 4096 // not defined on Darwin
|
||||
// PATH_MAX is the maximum allowed path length on Linux.
|
||||
// It is not defined on Darwin, so we use the Linux value.
|
||||
const PATH_MAX = 4096
|
||||
|
||||
// Readlinkat exists both in Linux and in MacOS 10.10+. We may add an
|
||||
// emulated version for users on older MacOS versions if there is
|
||||
|
Loading…
Reference in New Issue
Block a user