From dfc6dbb934bdc9482a9ad182093949ab60527a70 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 6 Jul 2018 15:15:06 -0700 Subject: [PATCH] make error messages consistent --- drone/deploy/deploy.go | 4 ++-- drone/internal/util.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drone/deploy/deploy.go b/drone/deploy/deploy.go index f91dd4d..395b7e5 100644 --- a/drone/deploy/deploy.go +++ b/drone/deploy/deploy.go @@ -85,7 +85,7 @@ func deploy(c *cli.Context) error { } } if number == 0 { - return fmt.Errorf("Cannot deploy failure build") + return fmt.Errorf("Cannot deploy failure build.") } } else { number, err = strconv.Atoi(buildArg) @@ -96,7 +96,7 @@ func deploy(c *cli.Context) error { env := c.Args().Get(2) if env == "" { - return fmt.Errorf("Please specify the target environment (ie production)") + return fmt.Errorf("Error: Please specify the target environment (e.g. production).") } params := internal.ParseKeyPair(c.StringSlice("param")) diff --git a/drone/internal/util.go b/drone/internal/util.go index 9106da2..efa91da 100644 --- a/drone/internal/util.go +++ b/drone/internal/util.go @@ -79,7 +79,7 @@ func NewAutoscaleClient(c *cli.Context) (drone.Client, error) { } autoscaler := c.GlobalString("autoscaler") if autoscaler == "" { - return nil, fmt.Errorf("Please provide the autoscaler address") + return nil, fmt.Errorf("Please provide the autoscaler address.") } client.SetAddress( strings.TrimSuffix(autoscaler, "/"), @@ -91,7 +91,7 @@ func NewAutoscaleClient(c *cli.Context) (drone.Client, error) { func ParseRepo(str string) (user, repo string, err error) { var parts = strings.Split(str, "/") if len(parts) != 2 { - err = fmt.Errorf("Error: Invalid or missing repository. eg octocat/hello-world.") + err = fmt.Errorf("Error: Invalid or missing repository (e.g. octocat/hello-world).") return } user = parts[0]