MCPcopy Create free account
hub / github.com/cli/cli / displayName

Function displayName

pkg/cmd/issue/artifact/view/view.go:321–326  ·  view source on GitHub ↗

displayName returns a user's login for the terminal. A null user shows as ghost, like a deleted user in gh pr view, so callers use it only when the user's action has a time.

(u *client.Actor)

Source from the content-addressed store, hash-verified

319// ghost, like a deleted user in gh pr view, so callers use it only when the
320// user's action has a time.
321func displayName(u *client.Actor) string {
322 if u == nil {
323 return "ghost"
324 }
325 return u.Login
326}
327
328// login returns a user's login, or an empty string for a null user.
329func login(u *client.Actor) string {

Callers 2

metadataLineFunction · 0.70
printEditHistoryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected