MCPcopy Create free account
hub / github.com/auth0/auth0-cli / writeTable

Function writeTable

internal/display/display.go:252–270  ·  view source on GitHub ↗
(w io.Writer, header []string, data [][]string)

Source from the content-addressed store, hash-verified

250}
251
252func writeTable(w io.Writer, header []string, data [][]string) {
253 table := tablewriter.NewWriter(w)
254 table.SetHeader(header)
255
256 table.SetAutoWrapText(false)
257 table.SetAutoFormatHeaders(true)
258 table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
259 table.SetAlignment(tablewriter.ALIGN_LEFT)
260 table.SetCenterSeparator("")
261 table.SetColumnSeparator("")
262 table.SetRowSeparator("")
263 table.SetHeaderLine(false)
264 table.SetBorder(false)
265
266 for _, v := range data {
267 table.Append(v)
268 }
269 table.Render()
270}
271
272func writeCSV(w io.Writer, header []string, data [][]string) error {
273 sheet := csv.NewWriter(w)

Callers 2

ResultsMethod · 0.85
ResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected