The Documentation ommits how to load the yaml/json file into a string,
Here's how I did it:
file, readErr := ioutil.ReadFile("config.yaml")
if readErr != nil {
fmt.Println("Could not read config.yaml:", readErr)
// Maybe exit the program?
}
yamlConfig := string(file)
// parse the file etc
This would be useful to include in the docs. Also putting some of the documentation's example code into the README.md would be great.
The Documentation ommits how to load the yaml/json file into a string,
Here's how I did it:
This would be useful to include in the docs. Also putting some of the documentation's example code into the README.md would be great.