diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-25 15:55:49 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-25 17:32:34 +1000 |
commit | 21f6e9ba87e3513973a62b81e67de253dc8afcde (patch) | |
tree | 6cf786783de0fd38ecd014f04cb33aef5541433b /pkg/utils/utils.go | |
parent | f24c95aedec785985dfcd98ff3997152c193bd3e (diff) |
auto-updates
Diffstat (limited to 'pkg/utils/utils.go')
-rw-r--r-- | pkg/utils/utils.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 511de1af1..62706559e 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -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] +} |