Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
(Screencast taken with cho45/KeyCast)
After a prompt is shown, enter any Go expressions/statements/functions or commands described below.
To quit the session, type
Some functionalities are provided as commands in the REPL:
:import Import package :type Print the type of expression :print Show current source :write  Write out current source to file :clear Clear the codes :doc Show document :help List commands :quit Quit the session
Only the latest major version.
The gore command requires Go tool-chains on runtime, so standalone binary is not distributed.
go get -u github.com/motemen/gore/cmd/gore
$GOPATH/binis in your
go get -u github.com/mdempsky/gocode # for code completion
Or you can use Docker:
git clone https://github.com/motemen/gore.git cd gore docker build -t gore . docker run -it --rm gore
go runfor each input. All the inputted lines are evaluated again and again so you can't bind the evaluated time by
time.Now(), for example. If you don't like this behavior, you may want to use yaegi.
go getto check the usage of a remote repository,
:import github.com/...will automatically download that module. Also, you don't need to
go getthe pretty print module anymore. If you want to load a local code from
$GOPATH, you need to create the modules file (
go mod init ...) and then start gore at the project directory.
motemen <[email protected]>