I'm trying to build a code example and I get the following error:
cannot use FuncName (type func()) as type func() error in field value
What does the wrapping parenthesis mean?
I'm trying to build a code example and I get the following error:
cannot use FuncName (type func()) as type func() error in field value
What does the wrapping parenthesis mean?
There is no difference but you're misinterpreting the error message. What it's saying is that type FuncName
which is func()
cannot be used as func() error
because it doesn't return an error.