So I have this code
token := NextToken()
switch token.Typ {
case tokenEOF:
return nil
case tokenMentionTargetedControl:
# do stuff
default:
return nil
}
my tokentype is a enum
my golinter is throwing this error:
missing cases in switch of type parsing.tokenType: parsing.tokenControl, parsing.tokenLinkControl, parsing.tokenMailtoControl, parsing.tokenMentionControl, parsing.tokenChannelControl, parsing.tokenText (exhaustive)
I don't want to create a case for each scenario, since I have the default clause, how to I avoid this?