Documentation ¶
Overview ¶
Package ioz provides various utilities for working with input/output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustReadAll ¶
MustReadAll is like io.ReadAll, but panics on error.
func MustReadAllAndClose ¶
func MustReadAllAndClose(r io.ReadCloser) []byte
MustReadAllAndClose is like MustReadAll but also always closes the ReadCloser.
func MustReadAllAndCloseString ¶
func MustReadAllAndCloseString(r io.ReadCloser) string
MustReadAllAndCloseString is like MustReadAllAndClose, but returns a string.
func MustReadAllString ¶
MustReadAllString is like MustReadAll, but returns a string.
Types ¶
type CountingReader ¶
type CountingReader struct {
// contains filtered or unexported fields
}
CountingReader implements a io.Reader that counts bytes.
func NewCountingReader ¶
func NewCountingReader(r io.Reader) *CountingReader
NewCountingReader initializes a new *CountingReader.
func (*CountingReader) Count ¶
func (c *CountingReader) Count() int64
Count returns the number of bytes read.
Click to show internal directories.
Click to hide internal directories.