don't init screen before it's necessary

master
WO 3 years ago
parent 6d11d55e03
commit 6e2e4edd03
  1. 6
      cmd/mop/main.go

@ -130,9 +130,6 @@ loop:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
func main() { func main() {
screen := mop.NewScreen()
defer screen.Close()
usr, err := user.Current() usr, err := user.Current()
if err != nil { if err != nil {
panic(err) panic(err)
@ -141,6 +138,9 @@ func main() {
profileName := flag.String("profile", path.Join(usr.HomeDir, defaultProfile), "path to profile") profileName := flag.String("profile", path.Join(usr.HomeDir, defaultProfile), "path to profile")
flag.Parse() flag.Parse()
screen := mop.NewScreen()
defer screen.Close()
profile := mop.NewProfile(*profileName) profile := mop.NewProfile(*profileName)
mainLoop(screen, profile) mainLoop(screen, profile)
profile.Save() profile.Save()

Loading…
Cancel
Save