aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-10-29 16:44:23 -0400
committerBobby <[email protected]>2023-10-29 16:44:23 -0400
commite2049d8b44ac97d3a47f8de8ad89f473214938d1 (patch)
tree9cd66fd87ce50b73c8617f2fc8a53f484f484232 /main.go
parentabb94bc7da02ac69ade9a747a8a205741c96d35b (diff)
downloadmana-e2049d8b44ac97d3a47f8de8ad89f473214938d1.tar.xz
mana-e2049d8b44ac97d3a47f8de8ad89f473214938d1.zip
Added REPL and main function
Diffstat (limited to 'main.go')
-rw-r--r--main.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..deba212
--- /dev/null
+++ b/main.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "fmt"
+ "os"
+ "os/user"
+ "mana/repl"
+)
+
+func main() {
+ user, err := user.Current()
+
+ if err != nil {
+ panic(err)
+ }
+
+ fmt.Printf("Hello %s! Welcome to Mana REPL!\n", user.Username)
+ repl.Start(os.Stdin, os.Stdout)
+}