Skip to content
Myr

Merge pull request #5 from mcuadros/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes in example

authored by Steve Francia · committed by Steve Francia · parents 5618542, 1378a36 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:README.md+2 added-2 removed
149 unmodified lines
150We have only defined one flag for a single command.151152More documentation about flags is available at https://github.com/spf13/pflag153154 Import(154 import(155 "github.com/spf13/cobra"156 "fmt"157 "strings"158 )
35 unmodified lines
194 }195 },196 }197198 cmdTimes().Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")198 cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")199200 var rootCmd = &cobra.Command{Use: "app"}201 rootCmd.AddCommand(cmdPrint, cmdEcho)202 cmdEcho.AddCommand(cmdTimes)
174 unmodified lines