MCPcopy
hub / github.com/FloatTech/ZeroBot-Plugin / saveIdiomJSON

Function saveIdiomJSON

plugin/handou/baiAPI.go:173–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171var mu sync.Mutex
172
173func saveIdiomJSON() error {
174 mu.Lock()
175 defer mu.Unlock()
176 f, err := os.Create(idiomFilePath)
177 if err != nil {
178 return err
179 }
180 defer f.Close()
181 return json.NewEncoder(f).Encode(&idiomInfoMap)
182}

Callers 1

newHandouGameFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected