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

Method applyURL

internal/driver/config.go:326–340  ·  view source on GitHub ↗

applyURL updates *cfg based on params.

(params url.Values)

Source from the content-addressed store, hash-verified

324
325// applyURL updates *cfg based on params.
326func (cfg *config) applyURL(params url.Values) error {
327 for _, f := range configFields {
328 var value string
329 if f.urlparam != "" {
330 value = params.Get(f.urlparam)
331 }
332 if value == "" {
333 continue
334 }
335 if err := cfg.set(f, value); err != nil {
336 return fmt.Errorf("error setting config field %s: %v", f.name, err)
337 }
338 }
339 return nil
340}
341
342// makeURL returns a URL based on initialURL that contains the config contents
343// as parameters. The second result is true iff a parameter value was changed.

Callers 3

TestParseConfigFunction · 0.80
makeReportMethod · 0.80
setConfigFunction · 0.80

Calls 1

setMethod · 0.95

Tested by 1

TestParseConfigFunction · 0.64