In GoLand I had to remove all .idea files with rm .idea -rf and reopen the project to make this error disappear.