From df41366c43b7881f422b18f13feedb44cd680885 Mon Sep 17 00:00:00 2001 From: Ryan SVIHLA Date: Thu, 10 Feb 2022 20:00:10 +0100 Subject: [PATCH] better logging --- pkg/authenticated_client.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/authenticated_client.go b/pkg/authenticated_client.go index 0016a4a..0f67499 100644 --- a/pkg/authenticated_client.go +++ b/pkg/authenticated_client.go @@ -167,14 +167,19 @@ func apiURL() string { if env.Verbose { log.Printf("env is %v", Env) } + var url string switch Env { case "dev": - return "https://api.dev.cloud.datastax.com" + url = "https://api.dev.cloud.datastax.com" case "test": - return "https://api.test.cloud.datastax.com" + url = "https://api.test.cloud.datastax.com" default: - return "https://api.astra.datastax.com" + url = "https://api.astra.datastax.com" } + if env.Verbose { + log.Printf("api url is %v", url) + } + return url } func dbURL() string {