HasGitHubID checks if the authenticated user matches a specific GitHub integer ID. It handles the necessary string-to-int64 conversion safely.
(in int64)
| 31 | // HasGitHubID checks if the authenticated user matches a specific GitHub integer ID. |
| 32 | // It handles the necessary string-to-int64 conversion safely. |
| 33 | func (u User) HasGitHubUserID(in int64) bool { |
| 34 | if u.GitHubUserID == nil { |
| 35 | return false |
| 36 | } |
| 37 | |
| 38 | return *u.GitHubUserID == strconv.FormatInt(in, 10) |
| 39 | } |
no outgoing calls