The interactive environment is VERY helpful for a programmer. However, it seems Go does not provide it. Is my understanding correct?
If you're a Vim user, the vim-go plugin (https://github.com/fatih/vim-go) provides a command (GoRun) to run and print the output of the current buffer. You still have to include all the boilerplate code of a main Go file, but it still provides a convenient way to quickly test code snippets in your local environment.
HTH
Go code can be run in a REPL-like way in Visual Studio Code with the Go extension and Code Runner extension. Click the Run triangle ▶ which is marked by the mouse cursor in the below screenshot to run the code and show the results in the Output pane at the bottom of Visual Studio Code.
When programming with Go Visual Studio Code will suggest additional Go extensions that can be installed to extend Visual Studio Code's functionality.
You also have a recent (March 2013) project called gore from Sriram Srinivasan, which can be useful:
gore is a command-line evaluator for golang code -- a REPL without a loop, if you will.
It is a replacement for the go playground, while making it much easier to interactively try out bits of code: gore automatically supplies boiler-plate code such as import and package declarations and a main function wrapper.
Also, since it runs on your own computer, no code is rejected on security grounds (unlike go playground's safe sandbox mode).
Have you tried the Go Playground?
About the Go Playground
The Go Playground is a web service that runs on golang.org's servers. The service receives a Go program, compiles, links, and runs the program inside a sandbox, then returns the output.
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
https://github.com/motemen/gore
You may also like to try https://github.com/haya14busa/goplay This enables you to run go code files from your terminal directly to the Go Playground