<分区>
我刚接触Golang,我想通过在我的shell中练习Golang代码来学习,有没有像ptpython这样的解释器和自动完成工具
用于 golang?
标签 go
<分区>
我刚接触Golang,我想通过在我的shell中练习Golang代码来学习,有没有像ptpython这样的解释器和自动完成工具
用于 golang?
最佳答案
Go 没有解释器(它是一种编译语言)或 REPL,但是有 go playground https://play.golang.org/用于试用代码。
对于自动完成,有多种工具可供使用,具体取决于您的编辑器;我使用 emacs:
M-x package install go-autocomplete:
(ac-config-default)
(require 'auto-complete-config)
(require 'go-autocomplete)
如果你想要一个 REPL and/ autocomplete,我能给你指出的最好的方法是go play ground 的扩展(如果你使用 chrome): Better Go Playground
它宣传:
- 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
都在类似 REPL 的环境中(虽然你不能做网络的事情)
关于go - 有没有类似ptpython的golang解释器和自动补全工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41171070/