package cmpSnipper import ( "encoding/json" ) func (app *App) LeftMenuSnip(parm any) (any, error) { // app.Log("Read data") mainMenuFile, err := app.ConfGetStr("mainMenuFile") if err != nil { app.Log("Can't get config.mainMenuFile") return nil, err } data, err := app.FileReadLimit(mainMenuFile, 1048576) if err != nil { app.Log("Can't read file '%s'", mainMenuFile) return nil, err } var res = map[string]interface{}{} err = json.Unmarshal(data, &res) if err != nil { return nil, err } return res, nil }