MCPcopy Index your code
hub / github.com/FloatTech/ZeroBot-Plugin / load

Method load

plugin/baiduaudit/model.go:119–130  ·  view source on GitHub ↗

加载JSON配置文件

(filename string)

Source from the content-addressed store, hash-verified

117
118// 加载JSON配置文件
119func (kc *keyConfig) load(filename string) error {
120 if file.IsNotExist(filename) {
121 return nil
122 }
123 f, err := os.Open(filename)
124 if err != nil {
125 return err
126 }
127 kc.mu.Lock()
128 defer kc.mu.Unlock()
129 return json.NewDecoder(f).Decode(kc)
130}
131
132func (kc *keyConfig) isgroupexist(ctx *zero.Ctx) (ok bool) {
133 kc.mu.Lock()

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected