summaryrefslogtreecommitdiff
path: root/update.go
diff options
context:
space:
mode:
Diffstat (limited to 'update.go')
-rw-r--r--update.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/update.go b/update.go
index 892ebfb..060f879 100644
--- a/update.go
+++ b/update.go
@@ -1,21 +1,21 @@
package repostatus
import (
+ "errors"
"fmt"
"time"
- "errors"
"go.wit.com/log"
)
func (rs *RepoStatus) Update() {
- if ! rs.Ready() {
+ if !rs.Ready() {
log.Log(WARN, "can't update yet. ready is false")
log.Error(errors.New("Update() is not ready yet"))
return
}
log.Log(WARN, "Update() START")
- duration := timeFunction(func () {
+ duration := timeFunction(func() {
// do things that are safe even if the git tree is dirty
log.Warn("path.SetText()")
rs.path.SetText(rs.repopath)
@@ -67,9 +67,9 @@ func (rs *RepoStatus) setSpeed(duration time.Duration) {
}
rs.speedActual.SetText(s)
- if (duration > 500 * time.Millisecond ) {
+ if duration > 500*time.Millisecond {
rs.speed.SetText("SLOW")
- } else if (duration > 100 * time.Millisecond ) {
+ } else if duration > 100*time.Millisecond {
rs.speed.SetText("OK")
} else {
rs.speed.SetText("FAST")