()
| 43 | } |
| 44 | |
| 45 | func 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 | } |
nothing calls this directly
no test coverage detected