github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/smartops/table.go (about) 1 package smartopsTable 2 3 import ( 4 "strings" 5 6 commonSchema "github.com/taubyte/go-project-schema/common" 7 structureSpec "github.com/taubyte/go-specs/structure" 8 ) 9 10 func getTableData(smartops *structureSpec.SmartOp, showId bool) (toRender [][]string) { 11 if showId { 12 toRender = [][]string{ 13 {"ID", smartops.Id}, 14 } 15 } 16 17 toRender = append(toRender, [][]string{ 18 {"Name", smartops.Name}, 19 {"Description", smartops.Description}, 20 {"Tags", strings.Join(smartops.Tags, ", ")}, 21 {"Timeout", commonSchema.TimeToString(smartops.Timeout)}, 22 {"Memory", commonSchema.UnitsToString(smartops.Memory)}, 23 {"Source", smartops.Source}, 24 {"Call", smartops.Call}, 25 }...) 26 27 return toRender 28 }