stack/context.go
func parseDump(r io.Reader, out io.Writer) ([]*Goroutine, error) {
	scanner := bufio.NewScanner(r)
	scanner.Split(scanLines)
	s := scanningState{}
	for scanner.Scan() {
		line, err := s.scan(scanner.Text())
		if line != "" {
			_, _ = io.WriteString(out, line)
		}
		if err != nil {
			return s.goroutines, err
		}
	}
	return s.goroutines, scanner.Err()
}
func parseDump(r io.Reader, out io.Writer) ([]*Goroutine, error) {
	scanner := bufio.NewScanner(r)
	scanner.Split(scanLines)
	s := scanningState{}
	for scanner.Scan() {
		line, err := s.scan(scanner.Text())
		if line != "" {
			_, _ = io.WriteString(out, line)
		}
		if err != nil {
			return s.goroutines, err
		}
	}
	return s.goroutines, scanner.Err()
}
func parseDump ( r io . Reader , out io . Writer ) ( [ ] * Goroutine , error ) { scanner := bufio . NewScanner ( r ) scanner . Split ( scanLines ) s := scanningState { } for scanner . Scan ( ) { line , err := s . scan ( scanner . Text ( ) ) if line != " " { _ , _ = io . WriteString ( out , line ) } if err != nil { return s . goroutines , err } } return s . goroutines , scanner . Err ( ) }
// Private stuff.
Private stuff .