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

Function ExampleChinese

cli/ctl/common/table/table_test.go:45–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func ExampleChinese() {
46 data := [][]string{
47 {"mars-1", "192.168.3.1", "系统默认", "true"},
48 {"mars-2-default", "192.168.3.2", "default", "false"},
49 {"测试", "192.168.3.3", "default", "true"},
50 }
51 table := New()
52 resetOSWriter(table)
53 table.SetHeader([]string{"NAME", "IP", "REGION", "IS_MASTER_REGION"})
54 table.AppendBulk(data)
55 table.Render()
56
57 // Output:
58 // NAME IP REGION IS_MASTER_REGION
59 // mars-1 192.168.3.1 系统默认 true
60 // mars-2-default 192.168.3.2 default false
61 // 测试 192.168.3.3 default-region true
62
63}

Callers

nothing calls this directly

Calls 5

resetOSWriterFunction · 0.85
SetHeaderMethod · 0.80
AppendBulkMethod · 0.80
RenderMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected