Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Bad Kata and Bad Description.
I don't know if it's the best practice or not but I meet the strings.Builder concept, thanks
In Golang we don't even have char.
"char" you created in your loop, represents a rune (an int32 value) of the string, not a byte or character. A rune is a code point in the Unicode character set.
When it checks char < '5' it compares the rune values
for example:
0 represents: 48
1 represents: 49
...
It compare with them like that
So your solution is correct but your fundamentals are wrong.