From 104e4698eb58dca3e88c47e8baeabd425a92d27c Mon Sep 17 00:00:00 2001 From: Kyoichiro Yamada Date: Thu, 13 Apr 2017 21:50:35 +0900 Subject: [PATCH] fix lints: error strings should not be capitalized or end with punctuation or a newline --- server/open.go | 7 ++++--- watcher/cmd.go | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/open.go b/server/open.go index 22ba233..25a436c 100644 --- a/server/open.go +++ b/server/open.go @@ -2,7 +2,7 @@ package server import ( "bytes" - "errors" + "fmt" "io" "os/exec" "runtime" @@ -22,9 +22,10 @@ func init() { // Open a url in the default browser func Open(url string) (io.Writer, error) { - open, err := cmd[runtime.GOOS] + goos := runtime.GOOS + open, err := cmd[goos] if !err { - return nil, errors.New("This operating system is not supported.") + return nil, fmt.Errorf("operating system %q is not supported", goos) } cmd := exec.Command(open, url) cmd.Stderr = &stderr diff --git a/watcher/cmd.go b/watcher/cmd.go index b168a0d..46214c7 100644 --- a/watcher/cmd.go +++ b/watcher/cmd.go @@ -81,7 +81,7 @@ func (h *Blueprint) Remove(p *cli.Context) error { return nil } } - return errors.New("No project found.") + return errors.New("no project found") } // List of all the projects @@ -144,5 +144,5 @@ func (h *Blueprint) check() error { h.Clean() return nil } - return errors.New("There are no projects. The config file is empty.") + return errors.New("there are no projects") }