Authentication returns the single AuthConfig instance associated with this config. A single instance is returned so that dependencies supplied after construction, such as the token refresher, remain visible to every caller. All of its read methods are safe to share, and the few write methods are onl
()
| 124 | // that dependencies supplied after construction, such as the token refresher, remain visible to every caller. All of |
| 125 | // its read methods are safe to share, and the few write methods are only used within the auth command set. |
| 126 | func (c *cfg) Authentication() gh.AuthConfig { |
| 127 | if c.auth == nil { |
| 128 | c.auth = &AuthConfig{cfg: c.cfg} |
| 129 | } |
| 130 | return c.auth |
| 131 | } |
| 132 | |
| 133 | func (c *cfg) AccessibleColors(hostname string) gh.ConfigEntry { |
| 134 | // Intentionally panic if there is no user provided value or default value (which would be a programmer error) |
nothing calls this directly
no outgoing calls
no test coverage detected