Skip to content

Commit

Permalink
Merge 07c1f45 into 6e97279
Browse files Browse the repository at this point in the history
  • Loading branch information
astj committed Dec 26, 2018
2 parents 6e97279 + 07c1f45 commit 60b6ea5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mackerel-plugin-redash/lib/redash.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,8 @@ func Do() {
optTempfile := flag.String("tempfile", "", "Temp file name")
flag.Parse()

if *apiKey == "" {
logger.Errorf("api-key is required")
flag.PrintDefaults()
os.Exit(1)
} else {
// We recommend using -api-key option, but it's still possible specify ?api_key=XXX directly in -uri option.
if *apiKey != "" {
u, _ := url.Parse(*optURI)
query := u.Query()
query.Set("api_key", *apiKey)
Expand Down

0 comments on commit 60b6ea5

Please sign in to comment.