20 lines
337 B
Go
20 lines
337 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"os"
|
||
|
|
"os/user"
|
||
|
|
|
||
|
|
"code.jmug.me/jmug/interpreter-in-go/pkg/repl"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
user, err := user.Current()
|
||
|
|
if err != nil {
|
||
|
|
panic(err)
|
||
|
|
}
|
||
|
|
fmt.Printf("Hello %s, this is the Monkey programming language!\n", user.Username)
|
||
|
|
fmt.Println("Go ahead, type something :)")
|
||
|
|
repl.Start(os.Stdin, os.Stdout)
|
||
|
|
}
|