goland doesn't understand nil type
got an odd issue, for one of my projects goland inspector complains about nil for simple things such as
client, err := bigquery.NewClient(ctx, "project-name")
if err != nil {
return nil, err
}
on err != nil it complains "Invalid operation: err!= nil (mismatched types error and Type) it's as if it doesn't know what built in nil type is.
same code in another project, no issue, not sure if I some how flipped some setting or what, tried to recreate repo and workspace same issue. can build and run project without issues.


Please sign in to leave a comment.
What's the message that the IDE displays when you place your cursor on the `error` part of the return values in the function signature?
It looks suspicious that it's highlighted with yellow.
it's error from builtin. It had something to do with some setting for this workspace. I found all directories that GoLand uses under ~/Libraries wiped them out and everything is back to normal. Not something from the project itself...
even simple error "example" such as one below had the same issue
Thanks!
Well, if you wiped everything there's nothing we can do now since it's likely we can't recover any logs from the IDE. So does this work now or not?
I should've made a copy instead of deleting. Yes it is working fine now.
Thank you!