internal/main.go
func process(in io.Reader, out io.Writer, p *Palette, s stack.Similarity, fullPath, parse, rebase bool, html string, filter, match *regexp.Regexp) error {
	c, err := stack.ParseDump(in, out, rebase)
	if c == nil || err != nil {
		return err
	}
	if rebase {
		log.Printf("GOROOT=%s", c.GOROOT)
		log.Printf("GOPATH=%s", c.GOPATHs)
	}
	needsEnv := len(c.Goroutines) == 1 && showBanner()
	if parse {
		stack.Augment(c.Goroutines)
	}
	buckets := stack.Aggregate(c.Goroutines, s)
	if html == "" {
		return writeToConsole(out, p, buckets, fullPath, needsEnv, filter, match)
	}
	return writeToHTML(html, buckets, needsEnv)
}
func process(in io.Reader, out io.Writer, p *Palette, s stack.Similarity, fullPath, parse, rebase bool, html string, filter, match *regexp.Regexp) error {
	c, err := stack.ParseDump(in, out, rebase)
	if c == nil || err != nil {
		return err
	}
	if rebase {
		log.Printf("GOROOT=%s", c.GOROOT)
		log.Printf("GOPATH=%s", c.GOPATHs)
	}
	needsEnv := len(c.Goroutines) == 1 && showBanner()
	if parse {
		stack.Augment(c.Goroutines)
	}
	buckets := stack.Aggregate(c.Goroutines, s)
	if html == "" {
		return writeToConsole(out, p, buckets, fullPath, needsEnv, filter, match)
	}
	return writeToHTML(html, buckets, needsEnv)
}
func process ( in io . Reader , out io . Writer , p * Palette , s stack . Similarity , fullPath , parse , rebase bool , html string , filter , match * regexp . Regexp ) error { c , err := stack . ParseDump ( in , out , rebase ) if c == nil || err != nil { return err } if rebase { log . Printf ( " " , c . GOROOT ) log . Printf ( " " , c . GOPATHs ) } needsEnv := len ( c . Goroutines ) == 1 && showBanner ( ) if parse { stack . Augment ( c . Goroutines ) } buckets := stack . Aggregate ( c . Goroutines , s ) if html == " " { return writeToConsole ( out , p , buckets , fullPath , needsEnv , filter , match ) } return writeToHTML ( html , buckets , needsEnv ) }
// process copies stdin to stdout and processes any "panic: " line found.
//
// If html is used, a stack trace is written to this file instead.
process copies stdin to stdout and processes any panic : line found . If html is used a stack trace is written to this file instead .