MCPcopy
hub / github.com/digitalocean/doctl / GetBoolPtr

Method GetBoolPtr

doit.go:380–386  ·  view source on GitHub ↗

GetBoolPtr returns a config value as a bool pointer.

(ns, key string)

Source from the content-addressed store, hash-verified

378
379// GetBoolPtr returns a config value as a bool pointer.
380func (c *LiveConfig) GetBoolPtr(ns, key string) (*bool, error) {
381 if !c.IsSet(key) {
382 return nil, nil
383 }
384 val := viper.GetBool(nskey(ns, key))
385 return &val, nil
386}
387
388// GetInt returns a config value as an int.
389func (c *LiveConfig) GetInt(ns, key string) (int, error) {

Callers

nothing calls this directly

Calls 3

IsSetMethod · 0.95
nskeyFunction · 0.85
GetBoolMethod · 0.65

Tested by

no test coverage detected