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.
Answered By – dlsniper
Answer Checked By – Marilyn (GoLangFix Volunteer)