package ioutils
import "github.com/dotcloud/docker/pkg/ioutils"
Index ¶
- func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error)
- func HashData(src io.Reader) (string, error)
- func NewBufReader(r io.Reader) *bufReader
- func NewBufReaderWithDrainbufAndBuffer(r io.Reader, drainBuffer []byte, buffer *bytes.Buffer) *bufReader
- func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser
- func NewReaderErrWrapper(r io.Reader, closer func()) io.Reader
- func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser
- func NopWriteCloser(w io.Writer) io.WriteCloser
- type NopFlusher
- type NopWriter
- type WriteCounter
- func NewWriteCounter(w io.Writer) *WriteCounter
- func (wc *WriteCounter) Write(p []byte) (count int, err error)
- type WriteFlusher
Functions ¶
func FprintfIfNotEmpty ¶
FprintfIfNotEmpty prints the string value if it's not empty
func HashData ¶
func NewBufReader ¶
func NewBufReaderWithDrainbufAndBuffer ¶
func NewBufReaderWithDrainbufAndBuffer(r io.Reader, drainBuffer []byte, buffer *bytes.Buffer) *bufReader
func NewReadCloserWrapper ¶
func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser
func NewReaderErrWrapper ¶
func NewWriteCloserWrapper ¶
func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser
func NopWriteCloser ¶
func NopWriteCloser(w io.Writer) io.WriteCloser
Types ¶
type NopFlusher ¶
type NopFlusher struct{}
func (*NopFlusher) Flush ¶
func (f *NopFlusher) Flush()
type NopWriter ¶
type NopWriter struct{}
func (*NopWriter) Write ¶
type WriteCounter ¶
Wrap a concrete io.Writer and hold a count of the number of bytes written to the writer during a "session". This can be convenient when write return is masked (e.g., json.Encoder.Encode())
func NewWriteCounter ¶
func NewWriteCounter(w io.Writer) *WriteCounter
func (*WriteCounter) Write ¶
func (wc *WriteCounter) Write(p []byte) (count int, err error)
type WriteFlusher ¶
func NewWriteFlusher ¶
func NewWriteFlusher(w io.Writer) *WriteFlusher
func (*WriteFlusher) Flush ¶
func (wf *WriteFlusher) Flush()
Flush the stream immediately.
func (*WriteFlusher) Flushed ¶
func (wf *WriteFlusher) Flushed() bool
func (*WriteFlusher) Write ¶
func (wf *WriteFlusher) Write(b []byte) (n int, err error)
Source Files ¶
fmt.go readers.go writeflusher.go writers.go
- Version
- v1.7.0-rc4
- Published
- Jun 16, 2015
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 23 minutes ago –
Tools for package owners.