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
|
@ -6,21 +6,17 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
// Some explanation for my own sanity, and hopefully maintainers in the
|
||||
// future.
|
||||
//
|
||||
// Lstat calls os.Lstat to get a fileinfo interface back.
|
||||
// This is then copied into our own locally defined structure.
|
||||
// Note the Linux version uses fromStatT to do the copy back,
|
||||
// but that not strictly necessary when already in an OS specific module.
|
||||
|
||||
func Lstat(path string) (*Stat_t, error) {
|
||||
func Lstat(path string) (*StatT, error) {
|
||||
fi, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Stat_t{
|
||||
return &StatT{
|
||||
name: fi.Name(),
|
||||
size: fi.Size(),
|
||||
mode: fi.Mode(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue