main.go 430 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "fmt"
  4. "github/runnignwater/monkey/repl"
  5. "os"
  6. _user "os/user"
  7. )
  8. /**
  9. * @Author: simon
  10. * @Author: ynwdlxm@163.com
  11. * @Date: 2022/10/2 上午10:55
  12. * @Desc:
  13. */
  14. func main() {
  15. user, err := _user.Current()
  16. if err != nil {
  17. panic(err)
  18. }
  19. fmt.Printf("Hello %s! This is the Monkey programming language!\n", user.Username)
  20. fmt.Printf("Feel free to type in commands\n")
  21. repl.Start(os.Stdin, os.Stdout)
  22. }