This commit is contained in:
cdle
2021-10-29 10:39:59 +08:00
parent 44ae0c8171
commit 203505513f
3 changed files with 192 additions and 182 deletions
+3
View File
@@ -63,6 +63,9 @@ var OttoFuncs = map[string]func(string) string{
md5str := fmt.Sprintf("%x", w.Sum(nil))
return md5str
},
"timeFormat": func(str string) string {
return time.Now().Format(str)
},
}
func init123() {
+7
View File
@@ -401,6 +401,13 @@ Alias=sillyGirl.service`
return OttoFuncs["machineId"]("")
},
},
{
Rules: []string{"^time$"},
Admin: true,
Handle: func(s Sender) interface{} {
return OttoFuncs["timeFormat"]("2006-01-02 15:04:05")
},
},
})
}
+182 -182
View File
File diff suppressed because one or more lines are too long