Documentation
¶
Overview ¶
Package ioutil implements some I/O utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProgressWriter ¶ added in v1.2.0
type ProgressWriter struct {
// contains filtered or unexported fields
}
func NewProgressWriter ¶ added in v1.2.0
func NewProgressWriter(w io.Writer) *ProgressWriter
NewProgressWriter wraps io.Writer with total written size and a status channel.
func (*ProgressWriter) Close ¶ added in v1.2.0
func (pw *ProgressWriter) Close()
Close sends total written size to the blocking channel and then closes the channel. Only the sender should close a channel, never the receiver.
func (*ProgressWriter) Size ¶ added in v1.2.0
func (pw *ProgressWriter) Size() int
Size returns total written size of io.Writer.
func (*ProgressWriter) Status ¶ added in v1.2.0
func (pw *ProgressWriter) Status() chan int
Status returns the status channel. Total written size will be sent to the status channel without blocking after every write operation.
func (*ProgressWriter) Write ¶ added in v1.2.0
func (pw *ProgressWriter) Write(p []byte) (n int, err error)
Write implements the standard io.Writer interface.
func (*ProgressWriter) WriteString ¶ added in v1.2.0
func (pw *ProgressWriter) WriteString(s string) (n int, err error)
WriteString implements the standard io.StringWriter interface.
Click to show internal directories.
Click to hide internal directories.