Skip to content

Commit 723fd11

Browse files
#651 fixing hardcoded help text
1 parent 4ba605e commit 723fd11

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plugin/plugin.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ func cobraToCLIMeta(topCommand *cobra.Command, namespace string) []plugin.Comman
214214
func getTopCobraCommand(ui terminal.UI, session *session.Session) *cobra.Command {
215215

216216
slCommand := metadata.NewSoftlayerCommand(ui, session)
217+
helpFlag := false;
217218
cobraCmd := &cobra.Command{
218219
Use: "sl",
219220
Short: T("Manage Classic infrastructure services"),
@@ -233,6 +234,8 @@ func getTopCobraCommand(ui terminal.UI, session *session.Session) *cobra.Command
233234

234235
// Persistent Flags
235236
cobraCmd.PersistentFlags().Var(slCommand.OutputFlag, "output", T("Specify output format, only JSON is supported now."))
237+
// This is needed so we can translate the help text
238+
cobraCmd.PersistentFlags().BoolVarP(&helpFlag, "help", "h", false, T("Usage information."))
236239

237240
// Commands
238241
cobraCmd.AddCommand(callapi.NewCallAPICommand(slCommand).Command) // single command

0 commit comments

Comments
 (0)