Skip to content

Commit

Permalink
Progress bars, yay
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobilpadde committed Jun 17, 2016
1 parent 1070aab commit ba359d2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"encoding/json"

"github.com/Collinux/GoHue"
"github.com/gosuri/uiprogress"
)

type Conf struct{
Expand Down Expand Up @@ -50,7 +51,13 @@ func Generate(){
bridge := bridges[0]

fmt.Println("Please authorize this program, by linking it on your bridge now; you've got 15 seconds.")
time.Sleep(15000 * time.Millisecond)

uiprogress.Start()
bar := uiprogress.AddBar(15000 / 100).AppendCompleted().PrependElapsed()
for bar.Incr() {
time.Sleep(100 * time.Millisecond)
}

hueser, err = bridge.CreateUser(mail)
checkErr(err)
cfg.Hueser = hueser
Expand Down

0 comments on commit ba359d2

Please sign in to comment.