1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

auto-updates

This commit is contained in:
Jesse Duffield
2018-08-25 15:55:49 +10:00
parent f24c95aede
commit 21f6e9ba87
14 changed files with 359 additions and 166 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"strings"
"time"
"github.com/fatih/color"
)
@ -81,3 +82,11 @@ func GetProjectRoot() string {
}
return strings.Split(dir, "lazygit")[0] + "lazygit"
}
func Loader() string {
characters := "|/-\\"
now := time.Now()
nanos := now.UnixNano()
index := nanos / 50000000 % int64(len(characters))
return characters[index : index+1]
}