Skip to content

Instantly share code, notes, and snippets.

Created Feb 24, 2015
What would you like to do?
package main
import (
func WordCount(s string) map[string]int {
words := strings.Fields(s)
counter := map[string]int{}
for _, word := range words {
return counter
func main() {
fmt.Println(WordCount("João e João"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment