Skip to content

Commit

Permalink
Merge pull request NebulousLabs#1366 from NebulousLabs/cobra
Browse files Browse the repository at this point in the history
fix cobra UsageFunc
  • Loading branch information
lukechampine authored Jul 17, 2016
2 parents 1a414ee + d4dbebf commit 2856326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion siac/hostcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func hostannouncecmd(cmd *cobra.Command, args []string) {
case 1:
err = post("/host/announce", "netaddress="+args[0])
default:
cmd.UsageFunc()
cmd.UsageFunc()(cmd)
os.Exit(exitCodeUsage)
}
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion siac/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func wrap(fn interface{}) func(*cobra.Command, []string) {

return func(cmd *cobra.Command, args []string) {
if len(args) != fnType.NumIn() {
cmd.UsageFunc()
cmd.UsageFunc()(cmd)
os.Exit(exitCodeUsage)
}
argVals := make([]reflect.Value, fnType.NumIn())
Expand Down

0 comments on commit 2856326

Please sign in to comment.