DEV Community


Discussion on: A Simple Slack Bot in Go - The Bot

vicentdev profile image

Why did you use label "loop" instead of boolean condition for breaking the loop? I'm pretty noob with golang and I don't know a lot of about performance with this language -.-'

shindakun profile image
Steve Layton Author

In this case, it's so we can break all the way out of the for/select/switch blocks all in one go and it keeps the code a tad more readable I think. Bill Kennedy has a good post about this over on Ardan Labs.

Forem Open with the Forem app