// TODO: unify print directives
326453
func (s *state) visitPrint(node *ast.PrintNode) {
	var escape = s.autoescape
	var directives []*ast.PrintDirectiveNode
	for _, dir := range node.Directives {
		var directive, ok = PrintDirectives[dir.Name]
		if !ok {
			s.errorf("Print directive %q not found", dir.Name)
		}
		if directive.CancelAutoescape {
			escape = ast.AutoescapeOff
		}
		switch dir.Name {
		case "id", "noAutoescape":
			// no implementation, they just serve as a marker to cancel autoescape.
		default:
			directives = append(directives, dir)
			if impt := s.options.Formatter.Directive(directive); impt != "" {
				s.funcsCalled[dir.Name] = impt
			}
		}
	}
	if escape != ast.AutoescapeOff {
		directives = append([]*ast.PrintDirectiveNode{{0, "escapeHtml", nil}}, directives...)
	}

	s.indent()
	s.js(s.bufferName, " += ")
	for _, dir := range directives {
		s.js(PrintDirectives[dir.Name].Name, "(")
	}
	s.walk(node.Arg)
	for i := range directives {
		var dir = directives[len(directives)-1-i]
		for _, arg := range dir.Args {
			s.js(",")
			s.walk(arg)
		}
		// soy specifies truncate adds ellipsis by default, so we have to pass
		// doAddEllipsis = true to soy.$$truncate
		if dir.Name == "truncate" && len(dir.Args) == 1 {
			s.js(",true")
		}
		s.js(")")
	}
	s.js(";\n")
}
1352741
func (m *Module) PrintConsolidatedConfig() {
	for _, typ := range m.configDefs {
		if typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct {
			typ = typ.Elem()
		}
		m.printFieldsWithTags(typ, 0)
	}
}
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
}
243663
func PrintDefaults() {
	fmt.Fprintln(errorWriter, "The commands are:")
	for _, c := range subcommands {
		if c.Name == defaultSubcommand.Name {
			fmt.Fprintf(errorWriter, "   [%s] - %s (*default)\n", c.Name, c.Description)
		} else {
			fmt.Fprintf(errorWriter, "   %s - %s\n", c.Name, c.Description)
		}
	}
}
1358221
func PrintFlags(flags *pflag.FlagSet) {
	flags.VisitAll(func(flag *pflag.Flag) {
		klog.V(1).Infof("FLAG: --%s=%q", flag.Name, flag.Value)
	})
}
596017
func (l *Logger) Print(args ...interface{}) {
	l.logf(l.app, logLevelNotice, "", true, args...)
}
522730
func (h *Histogram) Print(w io.Writer) {
	h.h.RLock()
	defer h.h.RUnlock()
	fmt.Fprintf(w, h.h.String())
}
1340033
func (c Colorize) Print(v ...interface{}) (int, error) {
	return Print(c.Foreground, c.Background, v...)
}
1349674
func (t *Tree) Print(w io.Writer, f IterateFunc, itemSiz int) {

	fmt.Fprintf(w, "treeNode-+-Left \t / Left High\n")
	fmt.Fprintf(w, "     |      \t = Equal\n")
	fmt.Fprintf(w, "     +-Right\t \\ Right High\n\n")

	maxHeight := t.Height()

	if f != nil && t.root != nil {
		d := &printData{0, itemSiz, make([]byte, maxHeight), 0, f, w}
		d.printer(t.root)
	}
}
633183
func (i *installCmd) printRelease(rel *release.Release) {
	if rel == nil {
		return
	}
	// TODO: Switch to text/template like everything else.
	fmt.Fprintf(i.out, "NAME:   %s\n", rel.Name)
	if settings.Debug {
		printRelease(i.out, rel)
	}
}
772323
func (f *PrintFlags) ToPrinter() (printers.ResourcePrinter, error) {
	outputFormat := ""
	if f.OutputFormat != nil {
		outputFormat = *f.OutputFormat
	}

	noHeaders := false
	if f.NoHeaders != nil {
		noHeaders = *f.NoHeaders
	}
	f.HumanReadableFlags.NoHeaders = noHeaders
	f.CustomColumnsFlags.NoHeaders = noHeaders

	// for "get.go" we want to support a --template argument given, even when no --output format is provided
	if f.TemplateFlags.TemplateArgument != nil && len(*f.TemplateFlags.TemplateArgument) > 0 && len(outputFormat) == 0 {
		outputFormat = "go-template"
	}

	if p, err := f.TemplateFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
		return p, err
	}

	if f.TemplateFlags.TemplateArgument != nil {
		f.CustomColumnsFlags.TemplateArgument = *f.TemplateFlags.TemplateArgument
	}

	if p, err := f.JSONYamlPrintFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
		return p, err
	}

	if p, err := f.HumanReadableFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
		return p, err
	}

	if p, err := f.CustomColumnsFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
		return p, err
	}

	if p, err := f.NamePrintFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
		return p, err
	}

	return nil, genericclioptions.NoCompatiblePrinterError{OutputFormat: &outputFormat, AllowedFormats: f.AllowedFormats()}
}
916257
func print(thread *Thread, fn *Builtin, args Tuple, kwargs []Tuple) (Value, error) {
	var buf bytes.Buffer
	path := make([]Value, 0, 4)
	sep := ""
	for _, v := range args {
		buf.WriteString(sep)
		if s, ok := AsString(v); ok {
			buf.WriteString(s)
		} else {
			writeValue(&buf, v, path)
		}
		sep = " "
	}
	for _, pair := range kwargs {
		buf.WriteString(sep)
		buf.WriteString(string(pair[0].(String)))
		buf.WriteString("=")
		if s, ok := AsString(pair[1]); ok {
			buf.WriteString(s)
		} else {
			writeValue(&buf, pair[1], path)
		}
		sep = " "
	}

	if thread.Print != nil {
		thread.Print(thread, buf.String())
	} else {
		fmt.Fprintln(os.Stderr, &buf)
	}
	return None, nil
}
114283
func (f *Flags) PrintHelp() {
	fmt.Fprintf(f.writer, "Usage of %s:\n", f.appName)
	fmt.Fprintf(f.writer, "%s\n", helpMessage)
	fmt.Fprintf(f.writer, "FLAGS\n")
	f.flagSet.PrintDefaults()
}
934184
func (t *PairTree) Print(w io.Writer, f PairIterateFunc, itemSiz int) {
	t.ObjectTree.Print(w, func(v interface{}) bool { return f(v.(Pair)) }, itemSiz)
}
188967
func (tp *TabPrinter) Print(arg interface{}) {
	if tp.current > 0 {
		if (tp.current % tp.max) == 0 {
			fmt.Fprintln(tp.w, "")
			tp.w.Flush()
			tp.current = 0
		} else {
			fmt.Fprint(tp.w, "\t")
		}
	}

	tp.current++
	fmt.Fprint(tp.w, arg)
}
709279
func printPodTolerationsMultiline(w PrefixWriter, title string, tolerations []corev1.Toleration) {
	printTolerationsMultilineWithIndent(w, "", title, "\t", tolerations)
}
1002721
func (l *Slog) Print(v ...interface{}) {
	l = l.copy()
	l.Log.di(fnLevelDi)
	l.Log.Message(fmt.Sprint(v...))
	l.commit()
}