fix lints: error strings should not be capitalized or end with punctuation or a newline

This commit is contained in:
Kyoichiro Yamada 2017-04-13 21:50:35 +09:00
parent ca9ec15e70
commit 104e4698eb
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

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