コード例 #1
0
ファイル: go_tour.go プロジェクト: xingyuli/godemo
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)
}
コード例 #2
0
func main() {
	wc.Test(WordCount)
}
コード例 #3
0
ファイル: exercise-maps.go プロジェクト: jrevillas/go-tour-es
func main() {
	wc.Test(ContadorPalabras)
}
コード例 #4
0
ファイル: maps.go プロジェクト: rochacon/learning-go
func main() {
	wc.Test(WordCount)
	print("\n")
}
コード例 #5
0
ファイル: wordcount.go プロジェクト: frenata/personal
func main() {
	mytest := "my test one one two test three two one two"
	fmt.Println(WordCount(mytest))
	wc.Test(WordCount)
}
コード例 #6
0
ファイル: exercise3.go プロジェクト: jlubawy/gotour
func Exercise3() {
	wc.Test(wordCount)
}