From b70ef4594d1b8b4b5d91b2035cc0dc3fd406626c Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 21 Feb 2017 00:07:17 +0000 Subject: [PATCH] Improve cli error messages --- cli/setup.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/setup.go b/cli/setup.go index 60bb378f..3c7adca0 100644 --- a/cli/setup.go +++ b/cli/setup.go @@ -55,7 +55,7 @@ func setup() { if opts.DB.Path != "memory" { if ok, _ := regexp.MatchString(`^(s3|gcs|logr|file|rixxdb|dendrodb)://(.+)$`, opts.DB.Path); !ok { - log.Fatal("Specify a valid data store configuration path") + log.Fatal("Invalid path %s. Specify a valid data store configuration path", opts.DB.Path) } } @@ -177,12 +177,12 @@ func setup() { // Ensure port number is valid if opts.Port.Web < 0 || opts.Port.Web > 65535 { - log.Fatal("Please specify a valid port number for --port-web") + log.Fatalf("Invalid port %d. Please specify a valid port number for --port-web", opts.Port.Web) } // Ensure port number is valid if opts.Port.Tcp < 0 || opts.Port.Tcp > 65535 { - log.Fatal("Please specify a valid port number for --port-tcp") + log.Fatalf("Invalid port %d. Please specify a valid port number for --port-tcp", opts.Port.Tcp) } // Store the ports in host:port string format