NAT archiveController handle running commands by key

This commit is contained in:
2021-08-29 13:51:36 -06:00
parent c0d6c79225
commit 0e86eff5fa
2 changed files with 14 additions and 5 deletions

View File

@@ -10,9 +10,7 @@
(Sys.print ">> ")
(let [command
(.trim (.toString (.readLine (Sys.stdin))))]
(if (controller.commands.exists command)
(controller.runCommand (dictGet controller.commands command))
(Sys.println "$command is not a valid command")))))
(controller.tryRunCommand command))))
(defNew [])