Commit ad5ad912 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

refactor(ipfs2/main) use guard

parent 74b38cb6
......@@ -148,17 +148,16 @@ func handleHelpOption(req cmds.Request, root *cmds.Command) (helpTextDisplayed b
if err != nil {
return false, err
}
if help {
helpText, err := cmdsCli.HelpText("ipfs", root, req.Path())
if err != nil {
return false, err
}
fmt.Println(helpText)
return true, nil
if !help {
return false, nil
}
helpText, err := cmdsCli.HelpText("ipfs", root, req.Path())
if err != nil {
return false, err
}
fmt.Println(helpText)
return false, nil
return true, nil
}
func callCommand(req cmds.Request, root *cmds.Command) (cmds.Response, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment