whoami.myr 248 B

12345678910111213141516171819
  1. use std
  2. use "dispatch"
  3. const whoami = {params
  4. var user
  5. std.put("whoami called\n")
  6. match std.getenv("USER")
  7. | `std.Some d: user = d
  8. | `std.None: user = ""
  9. ;;
  10. std.put("{}\n",user)
  11. }
  12. const __init__ = {
  13. dispatch.register("whoami",whoami)
  14. }