Add a yaml based configuration option.
Example of an older config
type DevLogConfig struct {
Questions []string `yaml:"questions"`
Other []string `yaml:"other_section"`
}
func (c *DevLogConfig) getConfig(configFilePath string) *DevLogConfig {
logPath := getLogContentPath(templateFilePath)
if len(logPath) >=1 {
yamlFile, err := ioutil.ReadFile(logPath)
handleError(err)
err = yaml.Unmarshal(yamlFile, c)
handleError(err)
return c
}
err := yaml.UnmarshalStrict([]byte(getDefaultQuestions()), c)
handleError(err)
return c
}