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

Method saveto

plugin/baiduaudit/model.go:160–169  ·  view source on GitHub ↗

保存配置文件

(filename string)

Source from the content-addressed store, hash-verified

158
159// 保存配置文件
160func (kc *keyConfig) saveto(filename string) error {
161 kc.mu.Lock()
162 defer kc.mu.Unlock()
163 f, err := os.Create(filename)
164 if err != nil {
165 return err
166 }
167 defer f.Close()
168 return json.NewEncoder(f).Encode(kc)
169}
170
171type group struct {
172 mu sync.Mutex

Callers 2

auditMethod · 0.80
initFunction · 0.80

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected