funccount(str string)(wordCount, spaceCount, numberCount, otherCount int) { t := []rune(str) for _, v := range t { switch { case v >= 'a' && v <= 'z': fallthrough case v >= 'A' && v <= 'Z': wordCount++ case v == ' ': spaceCount++ case v >= '0' && v <= '9': numberCount++ default: otherCount++ } } return }
v1.5.2