// Print creates a new print job printing to p with the given job information.
// The data is the raw PDF to print.
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
}
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())
}
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)
		}
	}
}
1061712
func Print(a ...interface{}) (n int, errno error) {
	return fmt.Print(wrap(a, true)...)
}
935469
func (p LogPrinter) Print(logger *Logger, a ...interface{}) {
	b := make([]interface{}, 1)
	b[0] = logger.Color(logger.Name)
	a = append(b, a...)
	log.Print(a...)
}
154446
func (r *readlineUI) Print(args ...interface{}) {
	text := fmt.Sprint(args...)
	if !strings.HasSuffix(text, "\n") {
		text += "\n"
	}
	fmt.Fprint(r.rl.Stderr(), text)
}
61066
func (schema DatabaseSchema) Print(w io.Writer) {
	fmt.Fprintf(w, "%s, (%s)\n", schema.Name, schema.Version)
	for table, tableSchema := range schema.Tables {
		fmt.Fprintf(w, "\t %s\n", table)
		for column, columnSchema := range tableSchema.Columns {
			fmt.Fprintf(w, "\t\t %s => %v\n", column, columnSchema)
		}
	}
}
984356
func Print(a ...interface{}) (int, error) {
	return fmt.Print(compile(fmt.Sprint(a...)))
}
1166572
func Print(v ...interface{}) {
	if Severity >= LevelInfo {
		std.Output(5, fmt.Sprint(v...), LevelInfo)
	}
}
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
}
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")
}
496650
func (p *VersionedColumnPrinter) Print(out interface{}) ([]string, []byte, error) {
	var output []byte
	if obj, ok := out.(runtime.Object); ok {
		converted, err := p.convertor.ConvertToVersion(obj, p.version)
		if err != nil {
			if !runtime.IsNotRegisteredError(err) {
				return nil, nil, err
			}
			converted = obj
		}
		data, err := json.Marshal(converted)
		if err != nil {
			return nil, nil, err
		}
		output = data
		out = map[string]interface{}{}
		if err := json.Unmarshal(data, &out); err != nil {
			return nil, nil, err
		}
	}
	args, _, err := p.printer.Print(out)
	return args, output, err
}
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...)
}
71914
func (p *printer) Printf(format string, a ...interface{}) {
	if p.Err == nil {
		_, p.Err = fmt.Fprintf(&p.Out, format, a...)
	}
}
1147681
func handlePrint(r *Request) (interface{}, error) {
	return fmt.Print(r.Args.One().MustString())
}
1310062
func (d *Dataset) Printf(format string) *Dataset {
	return d.Fprintf(os.Stdout, format)
}
899133
func (c *Chan) Print() {
	c.Do(func(path Path) { fmt.Printf("path %s\n", path.String()) })
}