您可以根据 GoLand 检查您的代码来自定义规则。
打开设置 &shortcut:ShowSettings; 并导航到 Editor | Inspections。选择要在代码检查期间应用的规则。或者,如果要忽略规则,请清除复选框。