I'm noob in golang. I want to break or continue in GoRoutine which is included in for loop.
Below is my code
for i, m := range something {
go func(i int, m someModel){
if m.Name == "AAA" {
continue; // Here occurs error
}
// Do something
// which is very long....
}
}
In vsCode, the error says that "continue not in for statement".
I know that it can be easily solved by (if ~ else) statements,
but the 'else' part in my code is too long, which makes the code looks dirty.
I just want to know if there are other ways to solve this.
Thanks.