This commit is contained in:
cdle
2021-10-26 06:56:08 +08:00
parent b0096e86c1
commit 4c638e2c2d
2 changed files with 15 additions and 5 deletions
+5
View File
@@ -42,4 +42,9 @@ func init() {
initSys()
Duration = time.Duration(sillyGirl.GetInt("duration", 5)) * time.Second
sillyGirl.Set("started_at", time.Now().Format("2006-01-02 15:04:05"))
api_key := sillyGirl.Get("api_key")
if api_key == "" {
api_key := time.Now().UnixNano()
sillyGirl.Set("api_key", api_key)
}
}