No, Go does not provide a REPL(read–eval–print loop).

However, as already mentioned, Go Playground is very handy. The Go Authors are also thinking about adding a feature-rich editor to it.

If you want something local, consider installing hsandbox. Running it simply with hsandbox go will split your terminal screen (with screen) where you can write code at the top and see its execution output at the bottom on every save.

There was a gotry among standard Go commands, which used to evaluate expressions (with an optional package name), and could be run like gotry 1+2 and gotry fmt 'Println("hello")' from shell. It is no longer available because not many people actually used it.

I have also seen third party projects for building a REPL for Go, but now I can only find links to two of them: igo and go-repl. How well do they work I don't know.

My two cents: Speed of compilation makes writing a REPL possible for Go, as it has also helped building the tools mentioned here, but the same speed makes REPL less necessary. Every time I want to test something in Go that I can't run in Playground I open a simple .go file and start coding and simply run the code. This will be even easier when the go command in Go 1 makes one-command build process possible and way easier.

UPDATE: Latest weekly release of Go added go command which can be used to very easily build a file: write your prog.go file and run go build prog.go && ./prog

UPDATE 2: With Go 1 you can directly run go programs with go run filename.go

UPDATE 3: gore is a new project which seems interesting.

Answer from Mostafa on Stack Overflow
🌐
Replit
replit.com › languages › go
Go Online Compiler & Interpreter - Replit
Write and run Go code using our Go online compiler & interpreter. You can build, share, and host applications right from your browser!
🌐
Go
go.dev › play
Go Playground - The Go Programming Language
Common problems companies solve with Go · Stories about how and why companies use Go
Discussions

read eval print loop - Does Go provide a REPL? - Stack Overflow
The interactive environment is VERY helpful for a programmer. However, it seems Go does not provide it. Is my understanding correct? More on stackoverflow.com
🌐 stackoverflow.com
Interactive Go REPL
Or is it again a "recompile and rerun everything after each new line is added and pretend to be a REPL"? Or is it maybe something inbetween · It's something inbetween. Pretty much the way it works is it dynamically inserts references to all objects/packages/functions in scope at compile time. More on news.ycombinator.com
🌐 news.ycombinator.com
36
211
July 15, 2017
[deleted by user]
The standard Go compiler and the go tool. REPLs do not work well and your learning will be very limited because Go's expressions are basically trivial and mostly equivalent to C's, etc. while Go's strength and "complicated" stuff like concurrency with channels and select simply cannot be done on a REPL at all. More on reddit.com
🌐 r/golang
5
2
November 18, 2022
Go REPL?
Learn to use the debugger. Not only can you step through the code, but there's a debug console where you can execute expressions while the program's in a certain state. That comes standard with the VSCode Go plugin and in Goland. More on reddit.com
🌐 r/golang
8
12
June 9, 2025
🌐
GitHub
github.com › d4l3k › go-pry
GitHub - d4l3k/go-pry: An interactive REPL for Go that allows you to drop into your code at any point. · GitHub
An interactive REPL for Go that allows you to drop into your code at any point. - d4l3k/go-pry
Starred by 3K users
Forked by 63 users
Languages   Go 94.9% | HTML 3.6%
Top answer
1 of 14
217

No, Go does not provide a REPL(read–eval–print loop).

However, as already mentioned, Go Playground is very handy. The Go Authors are also thinking about adding a feature-rich editor to it.

If you want something local, consider installing hsandbox. Running it simply with hsandbox go will split your terminal screen (with screen) where you can write code at the top and see its execution output at the bottom on every save.

There was a gotry among standard Go commands, which used to evaluate expressions (with an optional package name), and could be run like gotry 1+2 and gotry fmt 'Println("hello")' from shell. It is no longer available because not many people actually used it.

I have also seen third party projects for building a REPL for Go, but now I can only find links to two of them: igo and go-repl. How well do they work I don't know.

My two cents: Speed of compilation makes writing a REPL possible for Go, as it has also helped building the tools mentioned here, but the same speed makes REPL less necessary. Every time I want to test something in Go that I can't run in Playground I open a simple .go file and start coding and simply run the code. This will be even easier when the go command in Go 1 makes one-command build process possible and way easier.

UPDATE: Latest weekly release of Go added go command which can be used to very easily build a file: write your prog.go file and run go build prog.go && ./prog

UPDATE 2: With Go 1 you can directly run go programs with go run filename.go

UPDATE 3: gore is a new project which seems interesting.

2 of 14
67

Try motemen/gore

Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

https://github.com/motemen/gore

🌐
GitHub
github.com › x-motemen › gore
GitHub - x-motemen/gore: Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. · GitHub
You don't need to go get to check the usage of a remote repository, :import github.com/... will automatically download that module. Also, you don't need to go get the 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.
Starred by 5.5K users
Forked by 151 users
Languages   Go 97.9% | Makefile 1.8% | Dockerfile 0.3%
🌐
Openrepl
openrepl.com
Learn Programming languages like C/C++, Go with Online REPL/Interpreter
OpenREPL is an Online platform for checking code snippets in REPLs for various languages like C/C++, go, python and more.
🌐
Hacker News
news.ycombinator.com › item
Interactive Go REPL | Hacker News
July 15, 2017 - Or is it again a "recompile and rerun everything after each new line is added and pretend to be a REPL"? Or is it maybe something inbetween · It's something inbetween. Pretty much the way it works is it dynamically inserts references to all objects/packages/functions in scope at compile time.
Find elsewhere
🌐
GitHub
github.com › vito › go-repl
GitHub - vito/go-repl: A Go REPL. Builds up a source .go file over time, compiles it for output. · GitHub
Welcome to the Go REPL! Enter '?' for a list of commands. > ? Commands: ? help + (pkg) import package - (pkg) remove package -[dpc] pop last (declaration|package|code) ~ reset : (...) add persistent code ! inspect source > a := 6 > b := 7 > println(a * b) 42 > + fmt !
Starred by 208 users
Forked by 25 users
Languages   Go
🌐
Reddit
reddit.com › r/golang › [deleted by user]
Best local Golang REPL for learning?
November 18, 2022 - I've used https://github.com/traefik/yaegi REPL combined with rlwrap for nicer readline experience. But sadly no completion. $ rlwrap yaegi > s := "ab" : ab > len(s) : 2 > strings.Repeat(s, 3) : ababab > ^D $ ... I'd say just get GoLand the IDE.
🌐
Medium
erik-engheim.medium.com › repl-development-in-go-with-gore-730ece0f3c3b
REPL Development in Go with Gore. A Julia developer setting up a Julia… | by Erik Engheim | Medium
February 19, 2020 - Rather than looking up all sorts of info in the documentation about what types a function returns and what you can do with it, you can simply try it out in the REPL. For instance, maybe you wonder whether 5.6 is a float64 or float32. Instead of figuring out what term to search for in the Go manual, you can just write:
🌐
Medium
medium.com › @den.isidoro › quick-prototyping-with-a-golang-repl-547703885bd8
Quick prototyping with a Golang REPL | by Denis Isidoro | Medium
June 2, 2020 - I miss a REPL when coding in Golang. It turns out we can have a Go REPL connected to our IDE of choice.
🌐
Reddit
reddit.com › r/golang › go repl?
r/golang on Reddit: Go REPL?
June 9, 2025 -

I’m new to go, but one of my go to things with python, ruby is to drop into a repl and be able to step by step walk through and inspect code flow and especially object types (again a put with dynamic languages, 1/2 the bugs is you have no clue what someone passed in)

I’m fine with doing prints to console for debugging, but miss the power of being able to come into complicated code base as and just walk through the code and get a mental mapping of how things work and where to go next.

With java there was InteliJ for step by step debugging, but that’s not as powerful because I’m not able to modify the object mid flight and try to call a method or a function again to see how it changes things.

Just wondering, how do you as more seasoned go Devs approach debugging in Go?

🌐
Desmondcheong
desmondcheong.com › blog › 2021 › 05 › 05 › writing-a-simple-repl-in-go
Writing a simple REPL in Go | Desmond Cheong
May 5, 2021 - In this post I wanted to share a simple read-eval-print-loop (REPL) that I wrote as part of following cstacks' clone of sqlite. I'd done this once in C++, but this time I was writing it in Go. What inspired me to write this post was my amazement at how effortless the whole process was.
🌐
GitHub
github.com › golobby › repl
GitHub - golobby/repl: Golang REPL, Prototype as fast as possible · GitHub
Golang REPL, Prototype as fast as possible. Contribute to golobby/repl development by creating an account on GitHub.
Starred by 84 users
Forked by 2 users
Languages   Go
🌐
JDoodle
jdoodle.com › execute-go-online
Online Go Lang Compiler
JDoodle's online GO compiler allows you to write, run & share Go lang code. Online Go Lang IDE
🌐
OneCompiler
onecompiler.com › go
Go (Go Lang) Online Compiler
Write, Run & Share Go code online using OneCompiler's Go online compiler for free. It's one of the robust, feature-rich online compilers for Go language, running on Go 1.22. Getting started with the OneCompiler's Go compiler is simple and pretty fast.
🌐
DEV Community
dev.to › toxicwaste › repl-in-go-real-on-go-4kda
REPL in Go? Real on Go! - DEV Community
May 30, 2025 - For this, I needed a handy REPL-like ... online for such tools, I couldn’t find anything that suited my needs. Well... time to make my own! To solve this, I wrote a package (well, a module, but I call them packages) called Replyme — a tool for building REPLs in Golang...