(c *candy.CandyClient, reader *bufio.Reader)
| 291 | } |
| 292 | |
| 293 | func createGroup(c *candy.CandyClient, reader *bufio.Reader) { |
| 294 | fmt.Println("----------------创建群组-----------------------") |
| 295 | defer endSection() |
| 296 | |
| 297 | fmt.Println("请输入群组名称:") |
| 298 | data, _, _ := reader.ReadLine() |
| 299 | groupName := string(data) |
| 300 | |
| 301 | gid, err := c.CreateGroup(groupName) |
| 302 | if err != nil { |
| 303 | e := candy.ErrorParse(err.Error()) |
| 304 | log.Errorf("createGroup code:%v error:%v", e.Code, e.Msg) |
| 305 | return |
| 306 | } |
| 307 | |
| 308 | log.Debugf("createGroup success, groupName:%v groupID:%v", groupName, gid) |
| 309 | } |
| 310 | |
| 311 | func loadGroupList(c *candy.CandyClient, reader *bufio.Reader) { |
| 312 | fmt.Println("---------------加载群组列表--------------------") |
no test coverage detected