Skip to content

Commit 1a91a7d

Browse files
author
Quentin Perez
committed
cmd_help: remove unreachable code
1 parent 535fdd1 commit 1a91a7d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/cli/cmd_help.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@ func runHelp(cmd *Command, rawArgs []string) error {
6767
}
6868
}
6969
return fmt.Errorf("Unknown help topic `%s`. Run 'scw help'.", name)
70-
} else {
71-
t := template.New("top")
72-
template.Must(t.Parse(helpTemplate))
73-
ctx := cmd.GetContext(rawArgs)
74-
return t.Execute(ctx.Stdout, Commands)
7570
}
76-
return nil
71+
t := template.New("top")
72+
template.Must(t.Parse(helpTemplate))
73+
ctx := cmd.GetContext(rawArgs)
74+
return t.Execute(ctx.Stdout, Commands)
7775
}

0 commit comments

Comments
 (0)