MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / HasGitHubUserID

Method HasGitHubUserID

lib/auth/types.go:33–39  ·  view source on GitHub ↗

HasGitHubID checks if the authenticated user matches a specific GitHub integer ID. It handles the necessary string-to-int64 conversion safely.

(in int64)

Source from the content-addressed store, hash-verified

31// HasGitHubID checks if the authenticated user matches a specific GitHub integer ID.
32// It handles the necessary string-to-int64 conversion safely.
33func (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}

Callers 2

PingUserMethod · 0.80
TestUser_HasGitHubUserIDFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestUser_HasGitHubUserIDFunction · 0.64