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") }