MCPcopy Create free account
hub / github.com/google/pprof / isBoolConfig

Function isBoolConfig

internal/driver/config.go:270–281  ·  view source on GitHub ↗

isBoolConfig returns true if name is either name of a boolean config field, or a valid value for a multi-choice config field.

(name string)

Source from the content-addressed store, hash-verified

268// isBoolConfig returns true if name is either name of a boolean config field,
269// or a valid value for a multi-choice config field.
270func isBoolConfig(name string) bool {
271 f, ok := configFieldMap[name]
272 if !ok {
273 return false
274 }
275 if name != f.name {
276 return true // name must be one possible value for the field
277 }
278 var cfg config
279 _, ok = cfg.fieldPtr(f).(*bool)
280 return ok
281}
282
283// completeConfig returns the list of configurable names starting with prefix.
284func completeConfig(prefix string) []string {

Callers 1

interactiveFunction · 0.85

Calls 1

fieldPtrMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…