Go-YAML Field Names
I wasted away a good thirty minutes trying to figure out why I couldn’t parse my YAML config file this morning using go-yaml. package main import ( "fmt" "log" "gopkg.in/yaml.v2" ) var configText = ` Message: Welcome UpdateInterval: 5 EmailAddresses: - john.doe@example.com - jane.doe@example.com` type Config struct { Message string UpdateInterval int EmailAddresses []string } func main() { var c Config if err := yaml.Unmarshal([]byte(configText), &c); err != nil { log....