如果不想在每次修改 go.mod 后运行 go list ,请按 &shortcut:ShowSettings; 打开设置,并导航至 Build, Execution, Deployment | Build Tools 。清除 Reload project after changes in the build scripts 复选框。

默认情况下,go.mod 文件发生任何变化后 GoLand 都会重新加载项目。但是如果选择 External changes 选项,则在 IDE 中编辑文件时 go list 不会自动执行。这种情况下,您将看到“加载 Go 模块变更”图标。完成编辑并点击该图标以加载变更。

Disable go list on modification of go.mod