Documentation ¶
Index ¶
Constants ¶
View Source
const RefreshRate = time.Millisecond * 100
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile downloads file from the internet, based on the uri. based on the https://golangcode.com/download-a-file-with-progress/ and comments
Types ¶
type WriteCounter ¶ added in v0.1.2
type WriteCounter struct { Total int // bytes read so far // contains filtered or unexported fields }
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
func NewWriteCounter ¶ added in v0.1.2
func NewWriteCounter(total int) *WriteCounter
func (*WriteCounter) Finish ¶ added in v0.1.2
func (wc *WriteCounter) Finish()
func (*WriteCounter) Start ¶ added in v0.1.2
func (wc *WriteCounter) Start()
Click to show internal directories.
Click to hide internal directories.