MCPcopy Index your code
hub / github.com/dearcode/candy / createGroup

Function createGroup

candy.go:293–309  ·  view source on GitHub ↗
(c *candy.CandyClient, reader *bufio.Reader)

Source from the content-addressed store, hash-verified

291}
292
293func 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
311func loadGroupList(c *candy.CandyClient, reader *bufio.Reader) {
312 fmt.Println("---------------加载群组列表--------------------")

Callers 1

mainFunction · 0.85

Calls 3

endSectionFunction · 0.85
CreateGroupMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected