What is a rune?
What is a rune in Go? I've been googling but Golang only says in one line: rune is an alias for int32 . But how come integers are used all around like swapping cases? The following is a function swapcase. What is all the <= and - ? And why doesn't switch have any arguments? && should mean and but what is r <= 'z' ? func SwapRune(r rune) rune { switch { case 'a' <= r && r <= 'z': return r - 'a' + 'A' case 'A' <= r && r <= 'Z': return r - 'A' + 'a' default: return r } } Most of them are from http://play.golang.org/p/H6wjLZj6lW func SwapCase(str string) string { return strings.Map(SwapRune, str)