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

Method Error

client/util.go:38–45  ·  view source on GitHub ↗

Error - implement error interface

()

Source from the content-addressed store, hash-verified

36
37// Error - implement error interface
38func (e *Error) Error() string {
39 data, err := json.Marshal(e)
40 if err != nil {
41 return err.Error()
42 }
43
44 return string(data)
45}
46
47func encodeJSON(data interface{}) ([]byte, error) {
48 body, err := json.Marshal(data)

Callers 15

registerFunction · 0.45
loginFunction · 0.45
logoutFunction · 0.45
updateUserInfoFunction · 0.45
getUserInfoByNameFunction · 0.45
getUserInfoByIDFunction · 0.45
findUserFunction · 0.45
addFriendFunction · 0.45
confirmFriendFunction · 0.45
newMessageFunction · 0.45
createGroupFunction · 0.45
loadGroupListFunction · 0.45

Calls

no outgoing calls

Tested by 10

TestMainFunction · 0.36
initFunction · 0.36
TestFileDBFunction · 0.36
initFunction · 0.36
TestUserDBFunction · 0.36
TestUserLastMessageFunction · 0.36
TestUserMessageFunction · 0.36
TestUserMessageReverseFunction · 0.36
initFunction · 0.36
TestMessageDBFunction · 0.36