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

Method get

internal/config/config.go:62–76  ·  view source on GitHub ↗
(hostname, key string)

Source from the content-addressed store, hash-verified

60}
61
62func (c *cfg) get(hostname, key string) o.Option[string] {
63 if hostname != "" {
64 val, err := c.cfg.Get([]string{hostsKey, hostname, key})
65 if err == nil {
66 return o.Some(val)
67 }
68 }
69
70 val, err := c.cfg.Get([]string{key})
71 if err == nil {
72 return o.Some(val)
73 }
74
75 return o.None[string]()
76}
77
78func (c *cfg) GetOrDefault(hostname, key string) o.Option[gh.ConfigEntry] {
79 if val := c.get(hostname, key); val.IsSome() {

Callers 15

GetOrDefaultMethod · 0.95
VersionMethod · 0.95
GetImageDigestMethod · 0.80
rigFunction · 0.80
github.test.tsFile · 0.80
requestFunction · 0.80
harness.test.tsFile · 0.80
mainFunction · 0.80
commands.test.tsFile · 0.80
onceMethod · 0.80
setFunction · 0.80
persistentWaitFunction · 0.80

Calls 1

GetMethod · 0.65

Tested by 2

rigFunction · 0.64
requestFunction · 0.64