README ¶ Progress Bar See the example: package main import ( "crypto/rand" "io" "io/ioutil" "log" "github.com/cheggaaa/pb/v3" ) func main() { var limit int64 = 1024 * 1024 * 500 // we will copy 200 Mb from /dev/rand to /dev/null reader := io.LimitReader(rand.Reader, limit) writer := ioutil.Discard // start new bar bar := pb.Full.Start64(limit) // create proxy reader barReader := bar.NewProxyReader(reader) // copy from proxy reader if _, err := io.Copy(writer, barReader); err != nil { log.Fatal(err) } // finish bar bar.Finish() } How to resovle the following question? How to get the progress, last speed and remain duration? How to stop the goroutine based on first question? How to stop the upload progress with graceful shutdown? Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Directories ¶ Show internal Expand all Path Synopsis solution01 solution02 solution03 solution04 Click to show internal directories. Click to hide internal directories.