code: func Generate(w io.Writer, rpt *Report, obj plugin.ObjTool) error {
  	o := rpt.options
  
  	switch o.OutputFormat {
  	case Dot:
  		return printDOT(w, rpt)
  	case Tree:
  		return printTree(w, rpt)
  	case Text:
  		return printText(w, rpt)
  	case JSON:
  		return printJSON(w, rpt)
  	case Raw:
  		fmt.Fprint(w, rpt.prof.String())
  		return nil
  	case Tags:
  		return printTags(w, rpt)
  	case Proto:
  		return rpt.prof.Write(w)
  	case Dis:
  		return printAssembly(w, rpt, obj)
  	case List:
  		return printSource(w, rpt)
  	case WebList:
  		return printWebSource(w, rpt, obj)
  	case Callgrind:
  		return printCallgrind(w, rpt)
  	}
  	return fmt.Errorf("unexpected output format")
  }
docs: // Generate generates a report as directed by the Report.