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

Function outputFormat

internal/driver/cli.go:277–295  ·  view source on GitHub ↗
(bcmd map[string]*bool, acmd map[string]*string)

Source from the content-addressed store, hash-verified

275}
276
277func outputFormat(bcmd map[string]*bool, acmd map[string]*string) (cmd []string, err error) {
278 for n, b := range bcmd {
279 if *b {
280 if cmd != nil {
281 return nil, errors.New("must set at most one output format")
282 }
283 cmd = []string{n}
284 }
285 }
286 for n, s := range acmd {
287 if *s != "" {
288 if cmd != nil {
289 return nil, errors.New("must set at most one output format")
290 }
291 cmd = []string{n, *s}
292 }
293 }
294 return cmd, nil
295}
296
297var usageMsgHdr = `usage:
298

Callers 1

parseFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…