| Abhay Kumar | a61c522 | 2025-11-10 07:32:50 +0000 | [diff] [blame^] | 1 | package pb |
| 2 | |
| 3 | var ( |
| 4 | // Full - preset with all default available elements |
| 5 | // Example: 'Prefix 20/100 [-->______] 20% 1 p/s ETA 1m Suffix' |
| 6 | Full ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }} {{speed . }} {{rtime . "ETA %s"}}{{with string . "suffix"}} {{.}}{{end}}` |
| 7 | |
| 8 | // Default - preset like Full but without elapsed time |
| 9 | // Example: 'Prefix 20/100 [-->______] 20% 1 p/s Suffix' |
| 10 | Default ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }} {{speed . }}{{with string . "suffix"}} {{.}}{{end}}` |
| 11 | |
| 12 | // Simple - preset without speed and any timers. Only counters, bar and percents |
| 13 | // Example: 'Prefix 20/100 [-->______] 20% Suffix' |
| 14 | Simple ProgressBarTemplate = `{{with string . "prefix"}}{{.}} {{end}}{{counters . }} {{bar . }} {{percent . }}{{with string . "suffix"}} {{.}}{{end}}` |
| 15 | ) |