Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/cli/cli
/ Hosts
Method
Hosts
internal/gh/gh.go:132–132 ·
view source on GitHub ↗
Hosts retrieves a list of known hosts.
()
Source
from the content-addressed store, hash-verified
130
131
// Hosts retrieves a list of known hosts.
132
Hosts() []string
133
134
// DefaultHost retrieves the default host.
135
DefaultHost() (host string, source string)
Callers
11
CheckAuth
Function · 0.65
Resolver
Method · 0.65
setupGitRun
Function · 0.65
switchRun
Function · 0.65
refreshRun
Function · 0.65
statusRun
Function · 0.65
logoutRun
Function · 0.65
mightBeGHESUser
Function · 0.65
TestHostsIncludesEnvVar
Function · 0.65
TestLoginAddsHostIfNotAlreadyAdded
Function · 0.65
TestHostsWorksRightAfterMigration
Function · 0.65
Implementers
1
AuthConfig
internal/config/config.go
Calls
no outgoing calls
Tested by
3
TestHostsIncludesEnvVar
Function · 0.52
TestLoginAddsHostIfNotAlreadyAdded
Function · 0.52
TestHostsWorksRightAfterMigration
Function · 0.52