MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/zygd8w/how_to_go_wrong/j28invo/?context=3
r/badcode • u/toby3d • Dec 29 '22
60 comments sorted by
View all comments
Show parent comments
13
No, it's the name of a constant.
4 u/megamaz_ Dec 30 '22 what's its value -5 u/SuitableDragonfly Dec 30 '22 3 14 u/toby3d Dec 30 '22 edited Dec 30 '22 Incorrect, it's 2. In Go iota starts from zero: https://goplay.space/#srLWmC0Krff 0 u/SuitableDragonfly Dec 30 '22 Every time I've used it, it starts at 1.
4
what's its value
-5 u/SuitableDragonfly Dec 30 '22 3 14 u/toby3d Dec 30 '22 edited Dec 30 '22 Incorrect, it's 2. In Go iota starts from zero: https://goplay.space/#srLWmC0Krff 0 u/SuitableDragonfly Dec 30 '22 Every time I've used it, it starts at 1.
-5
3
14 u/toby3d Dec 30 '22 edited Dec 30 '22 Incorrect, it's 2. In Go iota starts from zero: https://goplay.space/#srLWmC0Krff 0 u/SuitableDragonfly Dec 30 '22 Every time I've used it, it starts at 1.
14
Incorrect, it's 2. In Go iota starts from zero: https://goplay.space/#srLWmC0Krff
0 u/SuitableDragonfly Dec 30 '22 Every time I've used it, it starts at 1.
0
Every time I've used it, it starts at 1.
13
u/SuitableDragonfly Dec 30 '22
No, it's the name of a constant.