I am trying to do this sample, but GoLand could not find reference of NewRGBA function which is annoying, although it executes it correctly. I already tried this solution.
3 Answers
It seems that you accidentally marked the image.go
file as plain text, which is why the IDE does not recognize anything defined in it correctly.
To fix this, go to Settings/Preferences | Editor | File Types
and search in the file types list for Text
. There you should see the list of all files/extensions marked as plain text. Remove image.go
from the list and see if this works correctly. Additionally, make sure that file file is not listed in the Ignore files and folders
input, in the same section.

- 7,188
- 1
- 35
- 44
-
Thanks, after a few hours of searching this helped me! – Mantas Astra Aug 15 '20 at 15:17
I had a similar issue for gin.WrapH
function utils.go. Tried the Override File Type
option for utils.go in local module path which changed the file as a Go file but had a little cross sign where a tooltip marked that the file is excluded from compilation. The error Unresolved reference
only went away when I selected the file, navigated to File -> File Properties -> Associate with File Type -> Register new file type association
, and chose Go files

- 3,477
- 1
- 24
- 24
restoring the IDE setting solved the problem for me. I tried removing it from the text file association list but yet it wasn't solved

- 299
- 2
- 11