可以看后边消息
我的错误信息是
level=warning msg="[runner] Can't run linter goanalysis_metalinter: goimports: error computing diff: exec: \"diff\": executable file not found in %PATH%"
level=error msg="Running error: can't run linter goanalysis_metalinter\ngoimports: error computing diff: exec: \"diff\": executable file not found in %PATH%"
\"diff\": executable file not found in %PATH%"
应该是找不到diff文件,因为window不存在
参考https://stackoverflow.com/questions/6877238/what-is-the-windows-equivalent-of-the-diff-command
可以发现git有diff文件
将C:\Program Files\Git\usr\bin\添加到path环境变量中即可