作者:xingyul
项目:godem
func page40_Exercise_Maps() {
WordCount := func(s string) map[string]int {
dict := make(map[string]int)
for _, word := range strings.Fields(s) {
dict[word] = dict[word] + 1
}
return dict
}
wc.Test(WordCount)
}
作者:hakober
项目:a-tour-of-g
func main() {
wc.Test(WordCount)
}
作者:jrevilla
项目:go-tour-e
func main() {
wc.Test(ContadorPalabras)
}
作者:rochaco
项目:learning-g
func main() {
wc.Test(WordCount)
print("\n")
}
作者:frenat
项目:persona
func main() {
mytest := "my test one one two test three two one two"
fmt.Println(WordCount(mytest))
wc.Test(WordCount)
}
作者:jlubaw
项目:gotou
func Exercise3() {
wc.Test(wordCount)
}