fix golint warnings/errors on pkg/system
and pkg/stdcopy
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
732af35366
commit
d846b54292
27 changed files with 126 additions and 86 deletions
|
@ -5,6 +5,8 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
// LUtimesNano is used to change access and modification time of the specified path.
|
||||
// It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm.
|
||||
func LUtimesNano(path string, ts []syscall.Timespec) error {
|
||||
var _path *byte
|
||||
_path, err := syscall.BytePtrFromString(path)
|
||||
|
@ -19,6 +21,8 @@ func LUtimesNano(path string, ts []syscall.Timespec) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// UtimesNano is used to change access and modification time of the specified path.
|
||||
// It can't be used for symbol link file.
|
||||
func UtimesNano(path string, ts []syscall.Timespec) error {
|
||||
return syscall.UtimesNano(path, ts)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue