mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
⚡️ 使用 json-iterator 替换 encoding/json 进行一些序列化/反序列化操作
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
"github.com/robfig/cron/v3"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -29,5 +29,5 @@ type Cron struct {
|
||||
}
|
||||
|
||||
func (c *Cron) AfterFind(tx *gorm.DB) error {
|
||||
return json.Unmarshal([]byte(c.ServersRaw), &c.Servers)
|
||||
return utils.Json.Unmarshal([]byte(c.ServersRaw), &c.Servers)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user