From b466f0f6639264ceecb4059ecc554695d320f1c8 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Thu, 28 Oct 2021 15:13:50 +0800 Subject: [PATCH] update --- core/init.go | 3 +++ core/test.go | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/core/init.go b/core/init.go index 127ef2a..5684233 100644 --- a/core/init.go +++ b/core/init.go @@ -47,4 +47,7 @@ func init() { api_key := time.Now().UnixNano() sillyGirl.Set("api_key", api_key) } + if sillyGirl.Get("uuid") == "" { + sillyGirl.Set("uuid", GetUUID()) + } } diff --git a/core/test.go b/core/test.go index 1dfbe8b..a596ee2 100644 --- a/core/test.go +++ b/core/test.go @@ -394,6 +394,13 @@ Alias=sillyGirl.service` return nil }, }, + { + Rules: []string{"^机器码$"}, + Admin: true, + Handle: func(s Sender) interface{} { + return OttoFuncs["machineId"]("") + }, + }, }) }