MCPcopy Index your code
hub / github.com/coder/coder / Format

Method Format

cli/cliui/output.go:155–161  ·  view source on GitHub ↗

Format implements OutputFormat.

(_ context.Context, data any)

Source from the content-addressed store, hash-verified

153
154// Format implements OutputFormat.
155func (f *tableFormat) Format(_ context.Context, data any) (string, error) {
156 headers := make(table.Row, len(f.allColumns))
157 for i, header := range f.allColumns {
158 headers[i] = header
159 }
160 return renderTable(data, f.sort, headers, f.columns)
161}
162
163type jsonFormat struct{}
164

Callers

nothing calls this directly

Calls 1

renderTableFunction · 0.85

Tested by

no test coverage detected