MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / writeJSONFile

Function writeJSONFile

internal/telemetry/telemetry.go:263–269  ·  view source on GitHub ↗
(path string, recs []Record)

Source from the content-addressed store, hash-verified

261}
262
263func writeJSONFile(path string, recs []Record) error {
264 data, err := json.Marshal(recs)
265 if err != nil {
266 return fmt.Errorf("marshal: %w", err)
267 }
268 return util.WriteFile(path, data, 0644)
269}
270
271func rebuildIndex() {
272 index = make(map[string]int, len(records))

Callers 2

LoadFunction · 0.85
SaveFunction · 0.85

Calls 1

WriteFileFunction · 0.92

Tested by

no test coverage detected