e.g. https://github.com/spf13/cobra/blob/master/command_test.go
(t *testing.T)
| 24 | |
| 25 | // e.g. https://github.com/spf13/cobra/blob/master/command_test.go |
| 26 | func TestMain(t *testing.T) { |
| 27 | bs := []byte{} |
| 28 | fmt.Print("response:" + string(bs)) |
| 29 | |
| 30 | // 基本的测试,查看命令是否可以正常跑起来 |
| 31 | main() |
| 32 | } |