From e75f77992c2c08c3aa7c0c0866bfd1d1aef8f024 Mon Sep 17 00:00:00 2001 From: RyosukeCla Date: Thu, 13 Apr 2023 19:10:48 +0900 Subject: [PATCH] fix --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index a1f2c11..0409823 100644 --- a/main.go +++ b/main.go @@ -79,9 +79,10 @@ type flags struct { } func parseFlags() flags { - output := flag.String("output", "", "output file") + defaultCredential := os.Getenv("GOOGLE_APPLICATION_CREDENTIALS") + output := flag.String("output", "", "output file (default: stdout)") help := flag.Bool("help", false, "show help") - credential := flag.String("credential", "~/.config/gcloud/application_default_credentials.json", "gcp credential file") + credential := flag.String("credential", defaultCredential, "gcp credential file") flag.Parse() flag.Usage = func() {