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

Method get

internal/driver/config.go:210–222  ·  view source on GitHub ↗

get returns the value of field f in cfg.

(f configField)

Source from the content-addressed store, hash-verified

208
209// get returns the value of field f in cfg.
210func (cfg *config) get(f configField) string {
211 switch ptr := cfg.fieldPtr(f).(type) {
212 case *string:
213 return *ptr
214 case *int:
215 return fmt.Sprint(*ptr)
216 case *float64:
217 return fmt.Sprint(*ptr)
218 case *bool:
219 return fmt.Sprint(*ptr)
220 }
221 panic(fmt.Sprintf("unsupported config field type %v", f.field.Type))
222}
223
224// set sets the value of field f in cfg to value.
225func (cfg *config) set(f configField, value string) error {

Callers 12

makeURLMethod · 0.95
checkValueFunction · 0.45
TestInteractiveCommandsFunction · 0.45
printCurrentOptionsFunction · 0.45
initFunction · 0.45
setHrefParamFunction · 0.45
urlPivotsFunction · 0.45
partitionPlacesFunction · 0.45
addElemFunction · 0.45
toggleClassFunction · 0.45
setNodeHighlightFunction · 0.45
updaterFunction · 0.45

Calls 1

fieldPtrMethod · 0.95

Tested by 2

checkValueFunction · 0.36
TestInteractiveCommandsFunction · 0.36