code: func parseOptions(f *flags) (o *report.Options, p commands.PostProcessor, err error) {
  
  	if *f.flagDivideBy == 0 {
  		return nil, nil, fmt.Errorf("zero divisor specified")
  	}
  
  	o = &report.Options{
  		CumSort:        *f.flagCum,
  		CallTree:       *f.flagCallTree,
  		PrintAddresses: *f.flagAddresses,
  		DropNegative:   *f.flagDropNegative,
  		Ratio:          1 / *f.flagDivideBy,
  
  		NodeCount:    *f.flagNodeCount,
  		NodeFraction: *f.flagNodeFraction,
  		EdgeFraction: *f.flagEdgeFraction,
  		OutputUnit:   *f.flagDisplayUnit,
  	}
  
  	for cmd, b := range f.flagCommands {
  		if *b {
  			pcmd := f.commands[cmd]
  			o.OutputFormat = pcmd.Format
  			return o, pcmd.PostProcess, nil
  		}
  	}
  
  	for cmd, rx := range f.flagParamCommands {
  		if *rx != "" {
  			pcmd := f.commands[cmd]
  			if o.Symbol, err = regexp.Compile(*rx); err != nil {
  				return nil, nil, fmt.Errorf("parsing -%s regexp: %v", cmd, err)
  			}
  			o.OutputFormat = pcmd.Format
  			return o, pcmd.PostProcess, nil
  		}
  	}
  
  	return nil, nil, fmt.Errorf("no output format selected")
  }
docs: // parseOptions parses the options into report.Options
  // Returns a function to postprocess the report after generation.