Skip to content

Commit

Permalink
Merge pull request #23 from dnephin/minor-improvements
Browse files Browse the repository at this point in the history
Couple small improvements
  • Loading branch information
dnephin committed Aug 4, 2018
2 parents 0267de5 + 25ba33b commit 8fced02
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 @@ -62,7 +62,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 @@ -80,7 +80,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 8fced02

Please sign in to comment.