github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/website/table.go (about) 1 package websiteTable 2 3 import ( 4 "strings" 5 6 structureSpec "github.com/taubyte/go-specs/structure" 7 websiteLib "github.com/taubyte/tau-cli/lib/website" 8 ) 9 10 func getTableData(website *structureSpec.Website, showId bool) (toRender [][]string) { 11 if showId { 12 toRender = [][]string{ 13 {"ID", website.Id}, 14 } 15 } 16 17 toRender = append(toRender, [][]string{ 18 {"Name", website.Name}, 19 {"Description", website.Description}, 20 {"Tags", strings.Join(website.Tags, ", ")}, 21 {"Paths", strings.Join(website.Paths, ", ")}, 22 {"Domains", strings.Join(website.Domains, ", ")}, 23 }...) 24 25 toRender = append(toRender, [][]string{ 26 {"Repository", websiteLib.GetRepositoryUrl(website)}, 27 {"\tName", website.RepoName}, 28 {"\tID", website.RepoID}, 29 {"\tProvider", website.Provider}, 30 {"\tBranch", website.Branch}, 31 }...) 32 33 return toRender 34 }