diff options
Diffstat (limited to 'clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go')
-rw-r--r-- | clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go b/clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go index 93c1b3e..7ae94c9 100644 --- a/clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go +++ b/clover/cloverctl/src/cloverctl/cmd/get_docker_registry.go @@ -11,7 +11,7 @@ import ( "fmt" "strings" "encoding/json" - + "os" "gopkg.in/resty.v1" "github.com/spf13/cobra" ) @@ -31,6 +31,7 @@ func init() { } func getdocker() { + checkControllerIP() url := controllerIP + "/halyard/account" var provider = map[string]string{"name": "dockerRegistry"} @@ -44,7 +45,8 @@ func getdocker() { SetBody(out_json). Get(url) if err != nil { - panic(err.Error()) + fmt.Printf("Cannot connect to controller: %v\n", err) + os.Exit(1) } if resp.StatusCode() != 200 { fmt.Printf("\n%v\n", resp) |