package folders import ( "git.jcg.re/jcgruenhage/borgocli/generate/authorized_keys" "gopkg.in/yaml.v2" "os" "fmt" ) func Run(data []byte) { var hosts authorized_keys.HostList err := yaml.Unmarshal(data, &hosts) check(err) fmt.Println("Backup Paths:") for i := 0; i < len(hosts.Hosts); i++ { os.MkdirAll(hosts.TotalPath(i), os.ModePerm) fmt.Print(" " + hosts.TotalPath(i)) } } func check(e error) { if e != nil { panic(e) } }