Add env var to help

This commit is contained in:
Balakrishnan Balasubramanian 2023-04-10 12:17:42 -04:00
parent 0de7f06195
commit 8eeca16d99

View File

@ -87,15 +87,14 @@ func selectRecordsToDelete(recs []libdns.Record) []libdns.Record {
return return
}() }()
} }
} }
func main() { func main() {
ctx := context.TODO() ctx := context.TODO()
flag.StringVar(&domain, "d", domain, "Domain name, e.g. example.com") flag.StringVar(&domain, "d", domain, "Domain name, e.g. example.com. env var: DOMAIN")
flag.StringVar(&sub, "s", sub, "Subdomain, e.g. blog. Use @ for root") flag.StringVar(&sub, "s", sub, "Subdomain, e.g. blog. Use @ for root")
flag.StringVar(&token, "a", token, "Cloudflare API Token") flag.StringVar(&token, "a", token, "Cloudflare API Token. env var: CF_TOKEN")
flag.TextVar(&ip, "i", ip, "IP address") flag.TextVar(&ip, "i", ip, "IP address")
flag.StringVar(&cname, "c", cname, "CNAME target") flag.StringVar(&cname, "c", cname, "CNAME target")
flag.StringVar(&path, "o", path, "Path to save all records as json, e.g. ./records.json") flag.StringVar(&path, "o", path, "Path to save all records as json, e.g. ./records.json")