This commit is contained in:
cdle
2021-10-01 21:01:16 +08:00
parent ae0c71b490
commit 2a068262cf
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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
View File
@@ -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() + "。")