// p prints the text, unless there was an error before.
776673
func (s *sanitizer) p(safeMarkup string) {
	if s.err == nil {
		_, s.err = s.sw.WriteString(safeMarkup)
	}
}
307136
func (p HTMLPrinter) Print(w io.Writer, kind Kind, tokText string) error {
	if p.AsOrderedList {
		if i := strings.Index(tokText, "\n"); i > -1 {
			if err := p.Print(w, kind, tokText[:i]); err != nil {
				return err
			}
			w.Write([]byte("</li>\n<li>"))
			if err := p.Print(w, kind, tokText[i+1:]); err != nil {
				return err
			}
			return nil
		}
	}

	class := ((HTMLConfig)(p)).Class(kind)
	if class != "" {
		_, err := w.Write([]byte(`<span class="`))
		if err != nil {
			return err
		}
		_, err = io.WriteString(w, class)
		if err != nil {
			return err
		}
		_, err = w.Write([]byte(`">`))
		if err != nil {
			return err
		}
	}
	template.HTMLEscape(w, []byte(tokText))
	if class != "" {
		_, err := w.Write([]byte(`</span>`))
		if err != nil {
			return err
		}
	}
	return nil
}
341742
func Print(err error, out io.Writer) {
	switch specific := err.(type) {
	case *HereError:
		out.Write([]byte(" from: " + specific.FullLocation() + "\n"))
		Print(specific.error, out)
	case *CauseError:
		Print(specific.error, out)
		out.Write([]byte("cause: " + specific.cause.Error() + "\n"))

		if cause, ok := specific.cause.(*CauseError); ok {
			for {
				out.Write([]byte("cause: " + cause.cause.Error() + "\n"))

				if sub, ok := cause.cause.(*CauseError); ok {
					cause = sub
				} else {
					break
				}
			}
		}
	case *TraceError:
		Print(specific.error, out)
		out.Write([]byte("trace:\n" + specific.trace))

	default:
		out.Write([]byte("error: " + err.Error() + "\n"))
	}
}
715309
func (p *printer) f(format string, args ...interface{}) {
	if p.Err != nil {
		return
	}
	if _, err := fmt.Fprintf(&p.indent, format, args...); err != nil && err != io.ErrShortWrite {
		p.Err = err
	}
}
419328
func (l Lorem) Paragraph(v reflect.Value) (interface{}, error) {
	return l.paragraph(), nil
}
419948
func Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string {
	return paragraphGenerator(paragrapOptions{paragraphCount, sentenceCount, wordCount, separator}, Sentence)
}
1171068
func (p *Parser) Text() bool {

	s, b := p.TemplateText()

	if b {
		p.ev.Add(s)
		return true
	}
	return false
}
1061712
func Print(a ...interface{}) (n int, errno error) {
	return fmt.Print(wrap(a, true)...)
}
20600
func (resp *Response) Text() (string, error) {
	b, err := resp.Content()
	s := string(b)
	return s, err
}
363060
func (p Point) String() string {
	return fmt.Sprintf("(%f, %f)", p.x, p.y)
}
984356
func Print(a ...interface{}) (int, error) {
	return fmt.Print(compile(fmt.Sprint(a...)))
}
83238
func (c *Command) Printf(format string, i ...interface{}) {
	c.Print(fmt.Sprintf(format, i...))
}
58415
func (p *printer) spec(spec ast.Spec, n int, doIndent bool, multiLine *bool) {
	switch s := spec.(type) {
	case *ast.ImportSpec:
		p.setComment(s.Doc)
		if s.Name != nil {
			p.expr(s.Name, multiLine)
			p.print(blank)
		}
		p.expr(s.Path, multiLine)
		p.setComment(s.Comment)

	case *ast.ValueSpec:
		if n != 1 {
			p.internalError("expected n = 1; got", n)
		}
		p.setComment(s.Doc)
		p.identList(s.Names, doIndent, multiLine) // always present
		if s.Type != nil {
			p.print(blank)
			p.expr(s.Type, multiLine)
		}
		if s.Values != nil {
			p.print(blank, token.ASSIGN)
			p.exprList(token.NoPos, s.Values, 1, blankStart|commaSep, multiLine, token.NoPos)
		}
		p.setComment(s.Comment)

	case *ast.TypeSpec:
		p.setComment(s.Doc)
		p.expr(s.Name, multiLine)
		if n == 1 {
			p.print(blank)
		} else {
			p.print(vtab)
		}
		p.expr(s.Type, multiLine)
		p.setComment(s.Comment)

	default:
		panic("unreachable")
	}
}
726367
func (s *Scanner) errorpf(p ast.Pos, f string, args ...interface{}) {
	s.error(p, fmt.Errorf(f, args...))
}
1218068
func (p *httpStreamPair) printError(s string) {
	p.lock.RLock()
	defer p.lock.RUnlock()
	if p.errorStream != nil {
		fmt.Fprint(p.errorStream, s)
	}
}
1034471
func Printf(format string, a ...interface{}) (n int, errno error) {
	return fmt.Printf(format, wrap(a, false)...)
}
643573
func Print(program string) string {
	m := map[string]string{
		"program":   program,
		"version":   Version,
		"revision":  Revision,
		"branch":    Branch,
		"buildUser": BuildUser,
		"buildDate": BuildDate,
		"goVersion": GoVersion,
	}
	t := template.Must(template.New("version").Parse(versionInfoTmpl))

	var buf bytes.Buffer
	if err := t.ExecuteTemplate(&buf, "version", m); err != nil {
		panic(err)
	}
	return strings.TrimSpace(buf.String())
}