Documentation ¶
Index ¶
- func Disable()
- func Wait()
- type File
- func (f *File) Close() error
- func (f *File) Finish()
- func (f *File) Read(p []byte) (int, error)
- func (f *File) ReadFrom(r io.Reader) (int64, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Write(p []byte) (int, error)
- func (f *File) WriteAt(b []byte, offset int64) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
File is a wrapper around a file which updates a progress bar as it's read.
func Create ¶
Create is identical to os.Create except that file is wrapped in a progress bar that updates as you write to it.
func Open ¶
Open is identical to os.Open except that file is wrapped in a progress bar that updates as you read from it .
func Stdin ¶
func Stdin() *File
Stdin returns os.Stdin except that it's wrapped in a progress bar that updates as you read from it.
func (*File) Finish ¶
func (f *File) Finish()
Finish finishes the progress bar without closing the wrapped file, this should be used if the wrapped file is something you don't want to close (for example stdin), but you don't want future reads to be printed as progress.
func (*File) Read ¶
Read reads bytes from wrapped file and adds amount of bytes read to the progress bar
func (*File) ReadFrom ¶
ReadFrom writes the contents of r to f and adds the amount of bytes written to the progress bar