▲ 6 ▼ go-pry - an interactive REPL for Go
An interactive REPL for Go that allows you to drop into your code at any point.
Register to comment or vote on this story
An interactive REPL for Go that allows you to drop into your code at any point.
Just came here to post this, thanks for posting. I've moved some text into the description because the title was too long. This looks really interesting, the description of how it works is pretty scary, requiring inserting code into your file and modifying the file in place (why not a copy?), but I guess you'd use it to explore possibilities in existing code.
This looks crazy - so it writes whatever you type into your file at the pry.Pry() placeholder and executes it? Not sure I completely understand how it works.
This is fun to play around with, given the very fast compile times of go though I haven't found it a huge problem to just write the code I want then iterate by running it quickly all at once - having to import a lirbary in order to get an interactive repl and change the code on the fly seems a little gross, though it is a really fun interesting hack.