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

Function DecodeFriendList

client/util.go:74–80  ·  view source on GitHub ↗

DecodeFriendList 把json数据解析成FriendList

(data []byte)

Source from the content-addressed store, hash-verified

72
73// DecodeFriendList 把json数据解析成FriendList
74func DecodeFriendList(data []byte) (*FriendList, error) {
75 friendList := &FriendList{}
76 if err := json.Unmarshal(data, &friendList); err != nil {
77 return nil, fmt.Errorf("Decode FriendList error:%v", err.Error())
78 }
79 return friendList, nil
80}
81
82// DecodeGroupList 把json数据解析成GroupList
83func DecodeGroupList(data []byte) (*GroupList, error) {

Callers 1

TestLoadFriendListFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by 1

TestLoadFriendListFunction · 0.68