// Print heading information
778322
func (t *Table) printHeading() {
	// Check if headers is available
	if len(t.headers) < 1 {
		return
	}

	// Identify last column
	end := len(t.cs) - 1

	// Get pad function
	padFunc := pad(t.hAlign)

	// Checking for ANSI escape sequences for header
	is_esc_seq := false
	if len(t.headerParams) > 0 {
		is_esc_seq = true
	}

	// Maximum height.
	max := t.rs[headerRowIdx]

	// Print Heading
	for x := 0; x < max; x++ {
		// Check if border is set
		// Replace with space if not set
		fmt.Fprint(t.out, ConditionString(t.borders.Left, t.pColumn, SPACE))

		for y := 0; y <= end; y++ {
			v := t.cs[y]
			h := ""
			if y < len(t.headers) && x < len(t.headers[y]) {
				h = t.headers[y][x]
			}
			if t.autoFmt {
				h = Title(h)
			}
			pad := ConditionString((y == end && !t.borders.Left), SPACE, t.pColumn)

			if is_esc_seq {
				fmt.Fprintf(t.out, " %s %s",
					format(padFunc(h, SPACE, v),
						t.headerParams[y]), pad)
			} else {
				fmt.Fprintf(t.out, " %s %s",
					padFunc(h, SPACE, v),
					pad)
			}
		}
		// Next line
		fmt.Fprint(t.out, t.newLine)
	}
	if t.hdrLine {
		t.printLine(true)
	}
}
507024
func (c *Client) Print(p *Printer, info *JobInfo, data []byte) (*Job, error) {
	var mr multipartRequest
	mr.init()
	mr.WriteField("printerid", p.ID)
	mr.WriteField("title", info.Title)
	mr.WriteField("contentType", "application/pdf")
	for _, tag := range info.Tags {
		mr.WriteField("tag", tag)
	}
	cap := info.Capabilities
	if cap == nil {
		cap = []byte(`{"capabilities":[]}`)
	}
	w, _ := mr.CreateFormFile("capabilities", "capabilities")
	w.Write(cap)
	w, _ = mr.CreateFormFile("content", "x.pdf")
	w.Write(data)

	var resp submitResponse
	err := jsonRPC(&c.auth, "POST", cloudprintURL+"/submit", &mr, &resp)
	if err != nil {
		return nil, fmt.Errorf("Print: %v", err)
	}

	return resp.Job.Job(), nil
}
443700
func (db *MemDB) Print() {
	db.mtx.Lock()
	defer db.mtx.Unlock()

	for key, value := range db.db {
		fmt.Printf("[%X]:\t[%X]\n", []byte(key), value)
	}
}
921209
func (a *OutputAdapters) Print(print func(v interface{})) io.Writer {
	return &printAdapter{
		print: print,
	}
}
897711
func (g *Group) Print(args ...Code) *Statement {
	s := Print(args...)
	g.items = append(g.items, s)
	return s
}
899133
func (c *Chan) Print() {
	c.Do(func(path Path) { fmt.Printf("path %s\n", path.String()) })
}
618917
func (t *Table) printFooter() {
	// Check if headers is available
	if len(t.footers) < 1 {
		return
	}

	// Only print line if border is not set
	if !t.borders.Bottom {
		t.printLine(true)
	}

	// Identify last column
	end := len(t.cs) - 1

	// Get pad function
	padFunc := pad(t.fAlign)

	// Checking for ANSI escape sequences for header
	is_esc_seq := false
	if len(t.footerParams) > 0 {
		is_esc_seq = true
	}

	// Maximum height.
	max := t.rs[footerRowIdx]

	// Print Footer
	erasePad := make([]bool, len(t.footers))
	for x := 0; x < max; x++ {
		// Check if border is set
		// Replace with space if not set
		fmt.Fprint(t.out, ConditionString(t.borders.Bottom, t.pColumn, SPACE))

		for y := 0; y <= end; y++ {
			v := t.cs[y]
			f := ""
			if y < len(t.footers) && x < len(t.footers[y]) {
				f = t.footers[y][x]
			}
			if t.autoFmt {
				f = Title(f)
			}
			pad := ConditionString((y == end && !t.borders.Top), SPACE, t.pColumn)

			if erasePad[y] || (x == 0 && len(f) == 0) {
				pad = SPACE
				erasePad[y] = true
			}

			if is_esc_seq {
				fmt.Fprintf(t.out, " %s %s",
					format(padFunc(f, SPACE, v),
						t.footerParams[y]), pad)
			} else {
				fmt.Fprintf(t.out, " %s %s",
					padFunc(f, SPACE, v),
					pad)
			}

			//fmt.Fprintf(t.out, " %s %s",
			//	padFunc(f, SPACE, v),
			//	pad)
		}
		// Next line
		fmt.Fprint(t.out, t.newLine)
		//t.printLine(true)
	}

	hasPrinted := false

	for i := 0; i <= end; i++ {
		v := t.cs[i]
		pad := t.pRow
		center := t.pCenter
		length := len(t.footers[i][0])

		if length > 0 {
			hasPrinted = true
		}

		// Set center to be space if length is 0
		if length == 0 && !t.borders.Right {
			center = SPACE
		}

		// Print first junction
		if i == 0 {
			if length > 0 && !t.borders.Left {
				center = t.pRow
			}
			fmt.Fprint(t.out, center)
		}

		// Pad With space of length is 0
		if length == 0 {
			pad = SPACE
		}
		// Ignore left space as it has printed before
		if hasPrinted || t.borders.Left {
			pad = t.pRow
			center = t.pCenter
		}

		// Change Center end position
		if center != SPACE {
			if i == end && !t.borders.Right {
				center = t.pRow
			}
		}

		// Change Center start position
		if center == SPACE {
			if i < end && len(t.footers[i+1][0]) != 0 {
				if !t.borders.Left {
					center = t.pRow
				} else {
					center = t.pCenter
				}
			}
		}

		// Print the footer
		fmt.Fprintf(t.out, "%s%s%s%s",
			pad,
			strings.Repeat(string(pad), v),
			pad,
			center)

	}

	fmt.Fprint(t.out, t.newLine)
}
1096214
func (ld Loader) PrintHelp(cfg interface{}) {
	w := bufio.NewWriter(os.Stderr)
	ld.fprintHelp(w, cfg, stderr())
	w.Flush()
}
1273900
func print(w io.Writer, v interface{}) {
	if s, ok := v.(fmt.Stringer); ok {
		fmt.Fprint(w, s.String())
	} else {
		switch v.(type) {
		case string:
			fmt.Fprintf(w, "%s", v)
		case int, uint, int8, uint8, int16, uint16, int32, uint32, int64, uint64:
			fmt.Fprintf(w, "%d", v)
		case float32, float64:
			fmt.Fprintf(w, "%g", v)
		default:
			fmt.Fprintf(w, "%v", v)
		}
	}
}
589888
func Print(a ...interface{}) (n int, err error) {
	return fmt.Fprint(out, formatAll(a)...)
}
984356
func Print(a ...interface{}) (int, error) {
	return fmt.Print(compile(fmt.Sprint(a...)))
}
733428
func (p *Progress) Print(optionals ...bool) {
	stream := os.Stderr
	if len(optionals) > 0 {
		if optionals[0] {
			stream = os.Stdout
		}
	}
	f := bufio.NewWriter(stream)
	defer f.Flush()
	f.WriteString(fmt.Sprintf("% *s\r", p.sOutput, ""))
	f.WriteString(p.String() + "\r")
}
318288
func (n *node) print(w io.Writer, level int) {
	fmt.Fprintf(w, "%sNODE:%v\n", strings.Repeat("  ", level), n.items)
	for _, c := range n.children {
		c.print(w, level+1)
	}
}
523278
func (n *LevelLogger) Print(v ...interface{}) {
	if !n.Enabled() {
		return
	}
	n.mu.RLock()
	n.logger.Output(callDepth, fmt.Sprint(v...))
	n.mu.RUnlock()
}
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)
}
1076458
func (t *Tree) Print(w io.Writer) {
	allMethods := [...]string{
		http.MethodConnect,
		http.MethodDelete,
		http.MethodGet,
		http.MethodHead,
		http.MethodOptions,
		http.MethodPatch,
		http.MethodPost,
		http.MethodPut,
		http.MethodTrace,
	}
	t.root.walk(false, func(n *node) {
		var methods []string
		for _, m := range allMethods {
			if r := n.getRoute(m); r != nil && r.handler != nil {
				methods = append(methods, m)
			}
		}

		if len(methods) > 0 {
			fmt.Fprintln(w, n.path, methods)
		} else {
			fmt.Fprintln(w, n.path)
		}
	})
}
397736
func (p FmtPrinter) Print(logger *Logger, a ...interface{}) {
	b := make([]interface{}, 1)
	b[0] = logger.Color(logger.Name)
	a = append(b, a...)
	fmt.Fprint(os.Stderr, a...)
}