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

Method GetUserInfoByID

client/candy.go:200–212  ·  view source on GitHub ↗

GetUserInfoByID 根据用户ID获取用户信息 TODO 需要把返回字符串修改成对应的类型

(userID int64)

Source from the content-addressed store, hash-verified

198// GetUserInfoByID 根据用户ID获取用户信息
199//TODO 需要把返回字符串修改成对应的类型
200func (c *CandyClient) GetUserInfoByID(userID int64) (string, error) {
201 userInfo, err := c.getUserInfoByID(userID)
202 if err != nil {
203 return emptyString, err
204 }
205
206 data, err := encodeJSON(userInfo)
207 if err != nil {
208 return emptyString, err
209 }
210
211 return string(data), nil
212}
213
214func (c *CandyClient) getUserInfoByID(userID int64) (*UserInfo, error) {
215 req := &meta.GateGetUserInfoRequest{Type: 1, UserID: userID}

Callers 2

getUserInfoByIDFunction · 0.80
TestUpdateUserInfoFunction · 0.80

Calls 2

getUserInfoByIDMethod · 0.95
encodeJSONFunction · 0.85

Tested by 1

TestUpdateUserInfoFunction · 0.64