diff options
Diffstat (limited to 'init.go')
-rw-r--r-- | init.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/init.go b/init.go index ee76f01..60530ea 100644 --- a/init.go +++ b/init.go @@ -9,6 +9,7 @@ import ( "time" "github.com/fsnotify/fsnotify" + "github.com/getwtxt/registry" "github.com/spf13/pflag" "github.com/spf13/viper" ) @@ -28,6 +29,9 @@ var closelog = make(chan bool, 1) // templates var tmpls *template.Template +// registry index +var twtxtCache = registry.NewIndex() + func init() { checkFlags() titleScreen() @@ -156,10 +160,12 @@ func watchForInterrupt() { if !confObj.stdoutLogging { // signal to close the log file closelog <- true - time.Sleep(20 * time.Millisecond) } close(closelog) + + // Let everything catch up + time.Sleep(30 * time.Millisecond) os.Exit(0) } }() |