update
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -23,7 +24,7 @@ type Function struct {
|
||||
Cron string
|
||||
}
|
||||
|
||||
var pname = string(sillyGirl)
|
||||
var pname = regexp.MustCompile(`/([^/\s]+)`).FindStringSubmatch(os.Args[0])[1]
|
||||
|
||||
var name = func() string {
|
||||
return sillyGirl.Get("name", "傻妞")
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ func GitPull(filename string) (bool, error) {
|
||||
func CompileCode() error {
|
||||
|
||||
cmd := exec.Command("sh", "-c", "cd "+ExecPath+" && go build -o "+pname)
|
||||
NotifyMasters("cd " + ExecPath + " && go build -o " + pname)
|
||||
NotifyMasters(os.Args[0])
|
||||
_, err := cmd.Output()
|
||||
if err != nil {
|
||||
return errors.New("编译失败:" + err.Error() + "。")
|
||||
|
||||
Reference in New Issue
Block a user