Skip to content

Commit

Permalink
minor: 🚑 Fix flag parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
MeneDev committed Jul 10, 2018
1 parent a09500b commit 5b0e14d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,15 @@ type Options struct {
func main() {
var opts Options

args, err := flags.Parse(&opts)
args, err := flags.NewParser(&opts, flags.HelpFlag | flags.PassDoubleDash).Parse()
if opts.ShowVersion {
showVersion()
os.Exit(0)
}

if err != nil {
panic(err)
fmt.Printf("%s", err)
os.Exit(1)
}

fmt.Println(args)
Expand Down

0 comments on commit 5b0e14d

Please sign in to comment.