文件名称:progress:io.Reader和io.Writer以及进度和剩余时间估计
文件大小:11KB
文件格式:ZIP
更新时间:2024-05-13 05:08:52
golang io machinebox Go
progress io.Reader和io.Writer以及进度和剩余时间估计。 用法 ctx := context . Background () // get a reader and the total expected number of bytes s := `Now that's what I call progress` size := len ( s ) r := progress . NewReader ( strings . NewReader ( s )) // Start a goroutine printing progress go func () { ctx := context . Background () progressChan := progress . NewTicker ( ctx , r , size , 1 * time . Secon
【文件预览】:
progress-master
----.travis.yml(85B)
----reader.go(792B)
----reader_test.go(709B)
----example()
--------download()
----progress_test.go(3KB)
----writer.go(797B)
----progress.go(4KB)
----writer_test.go(631B)
----LICENSE(11KB)
----.gitignore(275B)
----README.md(1KB)