You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I put my struct type definition into separate file named shema.go and added this typeswitch statement:
switchvalue:=payload.(type) {
caseCustomerLead: // <-- this is my struct type// do somethingdefault:
log.Printf("Don't know what to do with %v", value)
}
And if I run gocritic as gocritic check file-with-switch.go as a result I got an error
caseOrder: type is not defined CustomerLead
I don't wanna put all my code in one file 😸 Have any ideas how it can be fixed?
The text was updated successfully, but these errors were encountered:
I put my struct type definition into separate file named
shema.go
and added this typeswitch statement:And if I run gocritic as
gocritic check file-with-switch.go
as a result I got an errorcaseOrder: type is not defined CustomerLead
I don't wanna put all my code in one file 😸 Have any ideas how it can be fixed?
The text was updated successfully, but these errors were encountered: