File: main.go

package info (click to toggle)
golang-github-liamg-clinch 1.5.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,576 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main

import (
	"time"

	"github.com/liamg/clinch/loading"
)

func main() {

	messages := []string{
		"Ruining...",
		"Running: rm -rf /",
		"Wasting time...",
		"Executing pointless task...",
	}

	bar := loading.NewBar()
	defer bar.Close()
	for i := 0.0; i <= 100; i++ {
		bar.Log(messages[int(i)%len(messages)])
		bar.SetPercent(i)
		time.Sleep(time.Millisecond * 100)
	}

}