package main import ( "strings" "code.google.com/p/go-tour/wc" ) func WordCount(s string) map[string]int { words := strings.Fields(s) wordCount := make(map[string]int) for i := range words { wordCount[words[i]]++ } return wordCount } func main() { wc.Test(WordCount) } [download]
www.com | www.net | www.org
Hashes Built-in memory management Autovivification Regexes DWIM The CPAN The cool testing infrastructure The community / conferences Other feature (comment below)
Results (53 votes). Check out past polls.