MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / saveMapToJSONFile

Function saveMapToJSONFile

src/toolchain.go:264–280  ·  view source on GitHub ↗
(file string, tmpMap interface{})

Source from the content-addressed store, hash-verified

262}
263
264func saveMapToJSONFile(file string, tmpMap interface{}) error {
265
266 var filename = getPlatformFile(file)
267 jsonString, err := json.MarshalIndent(tmpMap, "", " ")
268
269 if err != nil {
270 return err
271 }
272
273 os.Create(filename)
274 err = os.WriteFile(filename, []byte(jsonString), 0644)
275 if err != nil {
276 return err
277 }
278
279 return nil
280}
281
282func loadJSONFileToMap(file string) (tmpMap map[string]interface{}, err error) {
283 f, err := os.Open(getPlatformFile(file))

Callers 13

conditionalUpdateChangesFunction · 0.85
setValueForUUIDFunction · 0.85
buildXEPGFunction · 0.85
createXEPGDatabaseFunction · 0.85
mappingFunction · 0.85
createM3UFileFunction · 0.85
cleanupXEPGFunction · 0.85
getLineupFunction · 0.85
getGuideNumberPMSFunction · 0.85
saveXEpgMappingFunction · 0.85
enablePPVFunction · 0.85
disablePPVFunction · 0.85

Calls 1

getPlatformFileFunction · 0.70

Tested by

no test coverage detected