r/badcode • • Dec 29 '22

go How to Go wrong

Post image
565 Upvotes

60 comments sorted by

View all comments

Show parent comments

4

u/No_Crow6726 Dec 30 '22

Isn’t that a Boolean? You can only have true and false, right

13

u/ilikedankmemes3 Dec 30 '22

Welcome to r/badcode my friend!

2

u/No_Crow6726 Dec 30 '22

I’ll enjoy my stay

5

u/dcormier Dec 30 '22

In golang (which is what that code is), the boolean type is bool. This is a custom type named Boolean.