// Writef formats according to a format specifier and writes to the response.
//
// Returns the number of bytes written and any write error encountered.
334256
func (w *ResponseRecorder) Writef(format string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(w, format, a...)
}
997551
func WriteBytes(w io.Writer, data []byte, offset int, count int) error {

	_, err := w.Write(data[offset : offset+count])
	if err != nil {
		return err
	}
	return nil
}
554489
func Errorf(format string, a ...interface{}) *Error {
	return New(fmt.Errorf(format, a...), 1)
}
778435
func (w *responseWriter) WriteString(s string) (int, error) {
	w.tryWriteHeader()
	n, err := io.WriteString(w.ResponseWriter, s)
	w.written += n
	return n, err
}
333561
func Errorf(format string, a ...interface{}) error {
	return New(fmt.Sprintf(format, a...))
}
1237602
func (o *OutResponse) Write(data []byte) (int, error) {
	return o.response.GetWriter().Write(data)
}
412499
func (r *Response) Write(bytes []byte) (int, error) {
	written, err := r.ResponseWriter.Write(bytes)
	r.contentLength += written
	return written, err
}
445767
func (f *fifo) Write(b []byte) (int, error) {
	if f.flag&(syscall.O_WRONLY|syscall.O_RDWR) == 0 {
		return 0, errors.New("writing to read-only fifo")
	}
	select {
	case <-f.opened:
		return f.file.Write(b)
	default:
	}
	select {
	case <-f.opened:
		return f.file.Write(b)
	case <-f.closed:
		return 0, errors.New("writing to a closed fifo")
	}
}
157531
func Errorf(format string, args ...interface{}) error {
	return &fundamental{
		msg:   fmt.Sprintf(format, args...),
		stack: callers(),
	}
}
926253
func Fprintf(w io.Writer, format string, a ...interface{}) (n int, error error) {
	return fmt.Fprintf(w, format, wrap(a, false)...)
}
1185030
func (rrw *RecordingResponseWriter) Write(d []byte) (int, error) {
	n, err := rrw.w.Write(d)
	rrw.BytesWritten += int64(n)
	return n, err
}
21581
func (c *C) Errorf(format string, args ...interface{}) {
	c.logCaller(1)
	c.logString(fmt.Sprintf("Error: "+format, args...))
	c.logNewLine()
	c.Fail()
}
1037296
func (r *ResponseReverter) Write(buf []byte) (int, error) {
	n, err := r.ResponseWriter.Write(buf)
	return n, err
}
474538
func Printf(format string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(out, format, formatAll(a)...)
}
68596
func (w *GzipResponseWriter) Writef(format string, a ...interface{}) (n int, err error) {
	n, err = fmt.Fprintf(w, format, a...)
	if err == nil {
		if w.ResponseWriter.Header()[ContentTypeHeaderKey] == nil {
			w.ResponseWriter.Header().Set(ContentTypeHeaderKey, ContentTextHeaderValue)
		}
	}

	return
}
666238
func (s *BytesWriter) Write(buf []byte) (int, error) {
	return s.writer.Write(buf)
}
448841
func Errorf(format string, args ...interface{}) error {
	return &fundamental{
		msg:   fmt.Sprintf(format, args...),
		Stack: stack.New(1),
	}
}