()
| 292 | } |
| 293 | |
| 294 | func (author Author) MarshalJSON() ([]byte, error) { |
| 295 | if author.ID == "" { |
| 296 | return json.Marshal(map[string]any{ |
| 297 | "is_bot": true, |
| 298 | "login": "app/" + author.Login, |
| 299 | }) |
| 300 | } |
| 301 | return json.Marshal(map[string]any{ |
| 302 | "is_bot": false, |
| 303 | "login": author.Login, |
| 304 | "id": author.ID, |
| 305 | "name": author.Name, |
| 306 | }) |
| 307 | } |
| 308 | |
| 309 | type CommentAuthor struct { |
| 310 | Login string `json:"login"` |
nothing calls this directly
no outgoing calls
no test coverage detected