Skip to content

Commit

Permalink
Couple small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Aug 4, 2018
1 parent c6598a9 commit 25ba33b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Formats:
`)
}
flags.BoolVar(&opts.debug, "debug", false, "enabled debug")
flags.StringVar(&opts.format, "format",
flags.StringVarP(&opts.format, "format", "f",
lookEnvWithDefault("GOTESTSUM_FORMAT", "short"),
"print format of test input")
flags.BoolVar(&opts.rawCommand, "raw-command", false,
Expand All @@ -75,7 +75,7 @@ Formats:
}

func lookEnvWithDefault(key, defValue string) string {
if value, ok := os.LookupEnv(key); ok {
if value := os.Getenv(key); value != "" {
return value
}
return defValue
Expand Down

0 comments on commit 25ba33b

Please sign in to comment.