I'm new to Golang, I want to learn by practicing Golang codes in my shell, is there an interpreter and auto-complete tool like ptpython
for golang?
There isn't an interpreter (it's a compiled language) or REPL for Go, but there is the go playground https://play.golang.org/ for trying out code.
And for autocomplete, there is a variety of tools out there depending on your editor; I use emacs:
M-x package install go-autocomplete:
(ac-config-default)
(require 'auto-complete-config)
(require 'go-autocomplete)
If you want a REPL and/with autocomplete, the best I can point you towards is an extension for the go play ground (if you using chrome): Better Go Playground
It advertises:
- Golang syntax highlighting
- Replaces the built in with the Ace editor
- Mark lines with syntax errors when running your code
- Auto-completion + Snippets
- Auto-save to local storage
- Dark/Light theme toggle
all in a REPL like environment (you can't do networking stuff though)