Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am vrecan on github.
  • I am vrecan (https://keybase.io/vrecan) on keybase.
  • I have a public key ASB1HP6JP61vAV2tAJualgI5H8RsLEYbcCW0ebnUUzeuEQo

To claim this, I am signing this object:

@vrecan
vrecan / go yaml example
Last active August 29, 2015 14:13
go code to handle yaml with struct
type Conf struct {
ReportSeconds int32 `yaml:"reportSeconds"`
Monitor []string `yaml:"monitor"`
}
func GetConf(path string) (c Conf, err error) {
data, err := ioutil.ReadFile(path)
if nil != err {
return c, err
}
reportSeconds: 30
monitor:
- maintenance
- dispatch
- elasticsearch
- cassandra
- columbo
- heartThrob
- carpenter