9 //ReadJSON reads the content of a give file and returns as a string
10 // used for small config files only.
11 func ReadJSON(path string) string {
12 slogger := GetLoggerInstance()
13 jsonFile, err := os.Open(path)
16 slogger.Errorf("Unable to open file: %s", path)
17 slogger.Errorf("Error::: %s", err)
20 slogger.Infof("Successfully opened config.json")
23 defer jsonFile.Close()
24 byteValue, _ := ioutil.ReadAll(jsonFile)
25 s := string(byteValue)