()
| 282 | } |
| 283 | |
| 284 | func (a *AvatarInfo) GetURL() string { |
| 285 | switch a.Type { |
| 286 | case constant.AvatarTypeGravatar: |
| 287 | return a.Gravatar |
| 288 | case constant.AvatarTypeCustom: |
| 289 | return a.Custom |
| 290 | default: |
| 291 | return "" |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | func CustomAvatar(url string) *AvatarInfo { |
| 296 | return &AvatarInfo{ |
no outgoing calls
no test coverage detected