mirror of
https://github.com/beego/bee.git
synced 2025-06-11 03:10:40 +00:00
go vet
go simple golint structcheck staticcheck unused unconvert
This commit is contained in:
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user