---
cachedir: '/var/cache/g10k'
git:
provider: 'rugged'
private_key: '/root/coro'
username: 'git'
sources:
core:
remote: 'https://github.com/puppet-community/puppet-corosync.git'
basedir: '/var/data/g10k/core/'
prefix: true
// ConfigSettings contains the key value pairs from the g10k config file
type ConfigSettings struct {
CacheDir string `yaml:"cachedir"`
Git struct {
PrivateKey string `yaml:"private_key"`
Username string
}
Sources map[string]Source
}
type Source struct {
Remote string
Basedir string
Prefix bool
}
func main() {
var config ConfigSettings
err = yaml.Unmarshal(data, &config)
if err != nil {
log.Fatalf("error: %v", err)
}
log.Printf("--- config:\n%v\n\n", config)
for k, v := range config.Sources {
log.Print(k)
log.Print(v.Remote)
}
}