MCPcopy Create free account
hub / github.com/SpectoLabs/hoverfly / drawTable

Function drawTable

hoverctl/cmd/utils.go:75–91  ·  view source on GitHub ↗
(data [][]string, header bool)

Source from the content-addressed store, hash-verified

73}
74
75func drawTable(data [][]string, header bool) {
76 table := tablewriter.NewWriter(os.Stdout)
77 if header {
78 headerData := make([]any, len(data[0]))
79 for i, v := range data[0] {
80 headerData[i] = v
81 }
82 table.Header(headerData...)
83 data = data[1:]
84 }
85
86 for _, v := range data {
87 table.Append(v)
88 }
89 fmt.Print("\n")
90 table.Render()
91}
92
93func getContentShorthand(content string) string {
94 if content != "" {

Callers 7

journalindex.goFile · 0.85
postserveaction.goFile · 0.85
start.goFile · 0.85
status.goFile · 0.85
targets.goFile · 0.85
version.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected