Documentation
¶
Overview ¶
A multi-progressbar solution. Supports I/O operations only at this point in development
Example ¶
package main
import (
"io"
"net/http"
"os"
"github.com/ItzAfroBoy/mbar"
)
func main() {
mb := mbar.NewMBar(mbar.Config{ShowTime: true, ShowSpeed: true, ShowSize: true})
res, err := http.Get("https://ash-speed.hetzner.com/100MB.bin")
if err != nil {
panic(err)
}
defer res.Body.Close()
bar := mb.Add("100MB.bin", int(res.ContentLength))
file, err := os.Create("100MB.bin")
if err != nil {
panic(err)
}
io.Copy(io.MultiWriter(file, bar), res.Body)
mb.Finish("Done")
}
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bar ¶
type MBar ¶
type MBar struct {
// Number of bars
NumBars int
// Config for the displaying of info to the bar
Config Config
// contains filtered or unexported fields
}
Notes ¶
Bugs ¶
Fonts with ligitures enabled may have unexpected behaviour
Click to show internal directories.
Click to hide internal directories.