cmd/compile: trying to call init() from a different file should give a more specific error message #23963
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?go1.8.3 linux/amd64
Does this issue reproduce with the latest release?
I don't know.
What operating system and processor architecture are you using (
go env
)?amd64
What did you do?
I tried to call an
init()
function from a different go file but within the same package.What did you expect to see?
I expected more specific feedback about what I did wrong.
What did you see instead?
It just told me that init() wasn't defined. Which was very confusing because I had other lowercase functions I was able to call package-wide no problem. I now know that lowercase
init()
is a special function but it wasn't obvious from the error message.The text was updated successfully, but these errors were encountered: