我正在使用 go run
命令手动执行我的 go 文件。
运行main.go
文件在 web
目录:go run ./cmd/web
任何更改后:Ctrl + C 然后 go run ./cmd/web
再次
有没有办法从 Goland 的按钮中做到这一点?或者可能在代码更改时自动发生?
最佳答案
您可以阅读the help article关于如何直接从 IDE 运行应用程序/测试,而无需键入 go run
命令。
作为快速引用:
In the left gutter of the editor, click the Run application icon the Run Application icon and select Run < method_name > in < file_name >.
关于Goland 从按钮单击运行/重新运行命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58385923/