fix golint warnings/errors on pkg/system and pkg/stdcopy

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei 2015-07-29 00:13:12 +08:00
parent 732af35366
commit d846b54292
27 changed files with 126 additions and 86 deletions

View file

@ -5,7 +5,9 @@ import (
"unsafe"
)
// Returns a nil slice and nil error if the xattr is not set
// Lgetxattr retrieves the value of the extended attribute identified by attr
// and associated with the given path in the file system.
// It will returns a nil slice and nil error if the xattr is not set.
func Lgetxattr(path string, attr string) ([]byte, error) {
pathBytes, err := syscall.BytePtrFromString(path)
if err != nil {
@ -36,6 +38,8 @@ func Lgetxattr(path string, attr string) ([]byte, error) {
var _zero uintptr
// Lsetxattr sets the value of the extended attribute identified by attr
// and associated with the given path in the file system.
func Lsetxattr(path string, attr string, data []byte, flags int) error {
pathBytes, err := syscall.BytePtrFromString(path)
if err != nil {