Sorry if this was asked before, but I could not find any relevant posts.
Any reason why this struct literal (made up of fields that can be declared
const) is not allowed?
const UnknownPos = scanner.Position{"", -1, -1, -1}
error: const initializer scanner.Position literal is not a constant.
Currently, I declare it as a variable, so that I can do things like
if pos == UnknownPos {
...
}
Cheers,
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.