I am trying to parse a YAML data into a string:
package main import ( \"fmt\" \"log\" \"gopkg.in/yaml.v2\" ) type Config struct { foo_bar s
The capital matters:
foo_bar --> Foo_bar
Your struct's fields are unexported. Export them and it'll work.
type Config struct { FooBar string `yaml:"foo_bar"` }