MCPcopy Create free account
hub / github.com/deepflowio/deepflow / tableVpc

Function tableVpc

cli/ctl/genesis.go:200–213  ·  view source on GitHub ↗
(response *simplejson.Json, table *tablewriter.Table)

Source from the content-addressed store, hash-verified

198}
199
200func tableVpc(response *simplejson.Json, table *tablewriter.Table) {
201 table.SetHeader([]string{"NAME"})
202
203 tableItems := [][]string{}
204 for i := range response.Get("DATA").MustArray() {
205 data := response.Get("DATA").GetIndex(i)
206 tableItem := []string{}
207 tableItem = append(tableItem, data.Get("NAME").MustString())
208 tableItems = append(tableItems, tableItem)
209 }
210
211 table.AppendBulk(tableItems)
212 table.Render()
213}
214
215func tableHost(response *simplejson.Json, table *tablewriter.Table) {
216 table.SetHeader([]string{"HOSTNAME", "IP"})

Callers 1

syncInfoFunction · 0.85

Calls 4

SetHeaderMethod · 0.80
AppendBulkMethod · 0.80
RenderMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected