This commit is contained in:
cdle
2023-06-06 13:50:35 +08:00
parent 7bbf2e6ba1
commit 10f300626a
5 changed files with 62 additions and 22 deletions
+18
View File
@@ -0,0 +1,18 @@
package core
func Script(uuid string) map[string]interface{} {
su := &ScriptUtils{
script: plugins.GetString(uuid),
}
var o = map[string]interface{}{
"get": su.GetValue,
"save": func() {
plugins.Set(uuid, su.script)
},
}
o["set"] = func(key, value string) map[string]interface{} {
su.SetValue(key, value)
return o
}
return o
}