My quick searching did not reveal anyone sharing their solution to this exercise, so am not sure if there are other (and better) approaches to mine:
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
foo := strings.Fields(s)
m := make(map[string]int)
for i := 0; i < len(foo); i++ {
v, ok := m[foo[i]]
if ok {
m[foo[i]] = v + 1
}
m[foo[i]] = v + 1
}
return m
}
func main() {
wc.Test(WordCount)
}