github.com/solo-io/cue@v0.4.7/doc/tutorial/kubernetes/quick/services/ls_tool.cue (about) 1 package kube 2 3 import ( 4 "text/tabwriter" 5 "tool/cli" 6 "tool/file" 7 ) 8 9 command: ls: { 10 task: print: cli.Print & { 11 text: tabwriter.Write([ 12 for x in objects { 13 "\(x.kind) \t\(x.metadata.labels.component) \t\(x.metadata.name)" 14 } 15 ]) 16 } 17 18 task: write: file.Create & { 19 filename: "foo.txt" 20 contents: task.print.text 21 } 22 }