//---------------------------------------------------- func ListKnownData(cmd *cobra.Command, args []string) { if err := data.ListKnown(do); err != nil { return } // https://www.reddit.com/r/television/comments/2755ow/hbos_silicon_valley_tells_the_most_elaborate/ datasToManipulate := do.Result for _, s := range strings.Split(datasToManipulate, "||") { fmt.Println(s) } }
//TODO make output pretty func ListAllExisting() { if err := srv.ListExisting(do); err != nil { return } if err := chns.ListExisting(do); err != nil { return } //`data ls` calls this func, hence the confusing semantics //should it be renamed? if err := data.ListKnown(do); err != nil { return } // https://www.reddit.com/r/television/comments/2755ow/hbos_silicon_valley_tells_the_most_elaborate/ datasToManipulate := do.Result for _, s := range strings.Split(datasToManipulate, "||") { fmt.Printf("Data Containers:\n%s \n", s) } }