Goland 从按钮单击运行/重新运行命令

标签 go goland

我正在使用 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/

相关文章:

ruby - Golang 中 Ruby 的 "methods"方法的等价物是什么?

debugging - 有没有办法在 Go 中获取源代码文件名和行号?

GoLand 文件缓存冲突

go - 列出服务

go - 尝试使用 interface{} slice 来选择随机元素

android - 使用 go-gcm 发送 XMPP 推送通知时正确的错误处理?

debugging - 戈格兰 : debugging has redundant parameter '--'

intellij-idea - 如何使用 Goland 发送自定义信号来终止正在运行的进程?

intellij-idea - 如何查看项目中的所有错误

go - 运行测试时“无法创建临时输出文件”