A new version 0.4.0 of gore, a Go language REPL, is released today 🎉.
Recently I’ve become the new maintainer of gore after some conversations with the original author motemen. The first work was to merge some pull requests. And then I fixed some small bugs, added Makefile, refined CI configs. I also added some new features.
To upgrade or install gore, try go get -u github.com/motemen/gore/cmd/gore
.
Bug fixes
- Fix
Evaluated but not used
error for some cases (evaluatinglen(fmt.Sprint(1))
twice emits no error) - Report token errors (
foo # bar
reportsinvalid token: "#"
)
New features
- Support function declarations
- Add :type command to see the type of an expression (like ghci)
- Add :clear command to clear the code in the current session
- Command name abbreviations (:i for :import, :t for :type, :q for :quit, etc.)
Improvements
- Support Go 1.12 (be sure to upgrade gocode and godoc, too)
- Add Makefile
- Move main package to cmd/gore/
- Print header on startup to stdout (like python)
- Improve temporary directory (add gore- prefix, remove on exit)
- Filter out temporary filenames from compile errors
- and more small improvements
Here’s a screenshot of new version of gore.
If you notice some problems, feel free to submit an issue report to https://github.com/motemen/gore/issues. I’m going to improve gore more and more! Thank you!