MCPcopy
hub / github.com/pterm/pterm / DefaultTableFromStructSlice

Function DefaultTableFromStructSlice

putils/tabledata-from-struct-slice.go:69–71  ·  view source on GitHub ↗

DefaultTableFromStructSlice will be populate the pterm.DefaultTable with the values of the structs. The header will be set to the structs field name. Use .WithHasHeader() to color the header. The function will return the populated pterm.TablePrinter.

(structSlice any)

Source from the content-addressed store, hash-verified

67// Use .WithHasHeader() to color the header.
68// The function will return the populated pterm.TablePrinter.
69func DefaultTableFromStructSlice(structSlice any) *pterm.TablePrinter {
70 return TableFromStructSlice(pterm.DefaultTable, structSlice)
71}

Callers

nothing calls this directly

Calls 1

TableFromStructSliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…