Documentation ¶
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
- type WriteFlusher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FprintfIfNotEmpty ¶ added in v1.7.0
FprintfIfNotEmpty prints the string value if it's not empty
func NewBufReader ¶
func NewReadCloserWrapper ¶
func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser
func NewWriteCloserWrapper ¶
func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser
func NopWriteCloser ¶
func NopWriteCloser(w io.Writer) io.WriteCloser
Types ¶
type WriteCounter ¶ added in v1.7.0
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 ¶ added in v1.7.0
func NewWriteCounter(w io.Writer) *WriteCounter
type WriteFlusher ¶ added in v1.7.0
func NewWriteFlusher ¶ added in v1.7.0
func NewWriteFlusher(w io.Writer) *WriteFlusher
func (*WriteFlusher) Flush ¶ added in v1.7.0
func (wf *WriteFlusher) Flush()
Flush the stream immediately.
func (*WriteFlusher) Flushed ¶ added in v1.7.0
func (wf *WriteFlusher) Flushed() bool
Click to show internal directories.
Click to hide internal directories.