fix: output an error if not cloudflare token provided
This commit is contained in:
@@ -15,8 +15,13 @@ func main() {
|
||||
log.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Init Cloudflare client
|
||||
cloudflareApiToken := os.Getenv("CLOUDFLARE_TOKEN")
|
||||
if len(cloudflareApiToken) == 0 {
|
||||
log.Println("Error: you need to provide a Cloudflare API token")
|
||||
os.Exit(1)
|
||||
}
|
||||
cf := cloudflare.NewApiClient(cloudflareApiToken)
|
||||
|
||||
for _, c := range configs {
|
||||
|
||||
Reference in New Issue
Block a user