Merge pull request #38399 from thaJeztah/fix_govet_issues

Fix some go_vet issues
This commit is contained in:
Vincent Demeester 2018-12-20 08:32:56 +01:00 committed by GitHub
commit 170ed8d7e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View file

@ -53,7 +53,6 @@ func mount(device, target, mType string, flags uintptr, data string) error {
flags: flags & pflags,
err: err,
}
return err
}
}

View file

@ -14,7 +14,7 @@ import (
func Lstat(path string) (*StatT, error) {
s := &syscall.Stat_t{}
if err := syscall.Lstat(path, s); err != nil {
return nil, &os.PathError{"Lstat", path, err}
return nil, &os.PathError{Op: "Lstat", Path: path, Err: err}
}
return fromStatT(s)
}

View file

@ -60,7 +60,7 @@ func (s StatT) IsDir() bool {
func Stat(path string) (*StatT, error) {
s := &syscall.Stat_t{}
if err := syscall.Stat(path, s); err != nil {
return nil, &os.PathError{"Stat", path, err}
return nil, &os.PathError{Op: "Stat", Path: path, Err: err}
}
return fromStatT(s)
}