MakeWebList returns an annotated source listing of rpt. rpt.prof should contain inlined call info.
(rpt *Report, obj plugin.ObjTool, maxFiles int)
| 241 | // MakeWebList returns an annotated source listing of rpt. |
| 242 | // rpt.prof should contain inlined call info. |
| 243 | func MakeWebList(rpt *Report, obj plugin.ObjTool, maxFiles int) (WebListData, error) { |
| 244 | sourcePath := rpt.options.SourcePath |
| 245 | if sourcePath == "" { |
| 246 | wd, err := os.Getwd() |
| 247 | if err != nil { |
| 248 | return WebListData{}, fmt.Errorf("could not stat current dir: %v", err) |
| 249 | } |
| 250 | sourcePath = wd |
| 251 | } |
| 252 | sp := newSourcePrinter(rpt, obj, sourcePath) |
| 253 | if len(sp.interest) == 0 { |
| 254 | return WebListData{}, fmt.Errorf("no matches found for regexp: %s", rpt.options.Symbol) |
| 255 | } |
| 256 | defer sp.close() |
| 257 | return sp.generate(maxFiles, rpt), nil |
| 258 | } |
| 259 | |
| 260 | func newSourcePrinter(rpt *Report, obj plugin.ObjTool, sourcePath string) *sourcePrinter { |
| 261 | sp := &sourcePrinter{ |
searching dependent graphs…