func createTree(persist p.Controller) { for _, p := range []string{"nodes", "containers/nodes", "containers/master", "links"} { exists, err := persist.Exists(PREFIX + "/" + p) if err != nil { log.Fatalf(err.Error()) } if !exists { _, err := persist.CreatePath(PREFIX + "/" + p) if err != nil { log.Fatalf(err.Error()) } } } }