Many projects define their options in a struct { ... }, and then parse a 
YAML config file into that struct.  See for example:
https://github.com/rorycl/sshagentca/blob/master/util/settings.go#L26
https://github.com/QubitProducts/exporter_exporter/blob/master/config.go#L30

Aside: I believe there's currently an issue with yaml.v3 which makes it 
hard to error-out when unexpected fields are seen:
https://github.com/go-yaml/yaml/issues/460

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5fe7d257-9a74-41af-bd7d-b5335723ef9c%40googlegroups.com.

Reply via email to