DecodeGroupList 把json数据解析成GroupList
(data []byte)
| 81 | |
| 82 | // DecodeGroupList 把json数据解析成GroupList |
| 83 | func DecodeGroupList(data []byte) (*GroupList, error) { |
| 84 | groupList := &GroupList{} |
| 85 | if err := json.Unmarshal(data, &groupList); err != nil { |
| 86 | return nil, fmt.Errorf("Decode GroupList error:%v", err.Error()) |
| 87 | } |
| 88 | return groupList, nil |
| 89 | } |
| 90 | |
| 91 | // CheckUserName - 用户名校验, 用户名目前只支持邮箱, 长度至少6位 |
| 92 | func CheckUserName(name string) (int32, error) { |