Documentation ¶
Index ¶
- Variables
- func ByteHead()
- func CloseReaderIf(r io.Reader) error
- func CloseWriterIf(w io.Writer) error
- func FprintGzip(w io.Writer, r io.Reader) (n int64, err error)
- func Head(r io.Reader, n int) ([]byte, error)
- func PrintGzip(r io.Reader) (n int64, err error)
- func ReadCloser(filename string) (io.ReadCloser, error)
- func ReadGzip(dst io.Writer, src io.Reader) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultHeadLength int = 5 ReplacementChar rune = unicode.ReplacementChar )
Functions ¶
func CloseReaderIf ¶
CloseReaderIf checks a reader to see if it also has a close method. If so, it calls r.Close(). Useful for places where any io.Reader can be used, but a file (or other ReadCloser that requires closing) may be substituted.
func CloseWriterIf ¶
CloseWriterIf checks a writer to see if it also has a close method. If so, it calls r.Close(). Useful for places where any io.Writer can be used, but a file (or other WriteCloser that requires closing) may be substituted.
func ReadCloser ¶
func ReadCloser(filename string) (io.ReadCloser, error)
ReadCloser returns an io.ReadCloser from a file. The caller is responsible for closing the file when finished with it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.