1
0
mirror of https://github.com/beego/bee.git synced 2025-06-11 03:10:40 +00:00
go simple
golint
structcheck
staticcheck
unused
unconvert
This commit is contained in:
Sergey Lanzman
2017-03-11 10:57:06 +02:00
parent 3d5b13d84e
commit feea8877c0
11 changed files with 71 additions and 86 deletions

View File

@ -28,7 +28,7 @@ func Notify(text, title string) {
}
func osxNotify(text, title string) {
cmd := &exec.Cmd{}
var cmd *exec.Cmd
if existTerminalNotifier() {
cmd = exec.Command("terminal-notifier", "-title", appName, "-message", text, "-subtitle", title)
} else if MacOSVersionSupport() {
@ -53,13 +53,9 @@ func existTerminalNotifier() bool {
err := cmd.Start()
if err != nil {
return false
} else {
err = cmd.Wait()
if err != nil {
return false
}
}
return true
err = cmd.Wait()
return err != nil
}
func MacOSVersionSupport() bool {

View File

@ -320,7 +320,7 @@ func CheckEnv(appname string) (apppath, packpath string, err error) {
apppath = path.Join(gosrcpath, appname)
if _, e := os.Stat(apppath); !os.IsNotExist(e) {
err = fmt.Errorf("Cannot create application without removing '%s' first.", apppath)
err = fmt.Errorf("Cannot create application without removing '%s' first", apppath)
beeLogger.Log.Errorf("Path '%s' already exists", apppath)
return
}