Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
parent
f023195a1e
commit
2026dbd41d
5 changed files with 5 additions and 10 deletions
|
@ -20,8 +20,7 @@ func fromStatT(s *syscall.Stat_t) (*Stat_t, error) {
|
|||
// Throws an error if the file does not exist
|
||||
func Stat(path string) (*Stat_t, error) {
|
||||
s := &syscall.Stat_t{}
|
||||
err := syscall.Stat(path, s)
|
||||
if err != nil {
|
||||
if err := syscall.Stat(path, s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return fromStatT(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue