1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

Replace Critical{,f} with Error{,f}

Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-06-12 04:36:25 +07:00
parent 6bc9086b4c
commit 78b6cc5f2d
9 changed files with 12 additions and 15 deletions

View File

@ -462,10 +462,10 @@ func (dir *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDi
return err
}
case *File:
log.Critical("Cannot move node into a file!")
log.Error("Cannot move node into a file!")
return fuse.EPERM
default:
log.Critical("Unknown node type for rename target dir!")
log.Error("Unknown node type for rename target dir!")
return errors.New("Unknown fs node type!")
}
return nil