Documentation
¶
Overview ¶
Package zio implements some I/O utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangedFrom ¶
Newer reports if the file's mtime is more recent than base.
func DumpReader ¶
func DumpReader(b io.ReadCloser) (r1, r2 io.ReadCloser, err error)
DumpReader reads all of b to memory and then returns two equivalent ReadClosers which will yield the same bytes.
This is useful if you want to read data from an io.Reader more than once.
It returns an error if the initial reading of all bytes fails. It does not attempt to make the returned ReadClosers have identical error-matching behavior.
This is based on httputil.DumpRequest, see zio.DumpBody() for an example usage.
Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file: https://golang.org/LICENSE