MCPcopy
hub / github.com/eatmoreapple/openwechat / String

Method String

user.go:59–71  ·  view source on GitHub ↗

implement fmt.Stringer

()

Source from the content-addressed store, hash-verified

57
58// implement fmt.Stringer
59func (u *User) String() string {
60 format := "User"
61 if u.IsSelf() {
62 format = "Self"
63 } else if u.IsFriend() {
64 format = "Friend"
65 } else if u.IsGroup() {
66 format = "Group"
67 } else if u.IsMP() {
68 format = "MP"
69 }
70 return fmt.Sprintf("<%s:%s>", format, u.NickName)
71}
72
73// GetAvatarResponse 获取用户头像
74func (u *User) GetAvatarResponse() (resp *http.Response, err error) {

Callers 15

PushLoginMethod · 0.45
BuildPushLoginRequestMethod · 0.45
BuildPushLoginRequestMethod · 0.45
GetRandomDeviceIdFunction · 0.45
AddFriendsIntoGroupMethod · 0.45
CheckLoginMethod · 0.45
GetLoginInfoMethod · 0.45
WebInitMethod · 0.45
WebWxStatusNotifyMethod · 0.45

Calls 4

IsSelfMethod · 0.95
IsFriendMethod · 0.95
IsGroupMethod · 0.95
IsMPMethod · 0.95

Tested by 1