In addition to the above answers given, here are my two cents to why Go needed rune.
- Strings in GoLang are byte arrays with each character being represented as a single byte. Thus GoLang has a very high-performance advantage when compared to other languages
- But since we need a way to represent UTF-8 codepoints which cannot be represented with an 8bit range, we use the rune to represent them.
- Why int32 and why not uint32? you may ask. This is made deliberately to detect overflows while doing operations on strings.
this article talks all these in much more details