Skip to content

Instantly share code, notes, and snippets.

@aesteve aesteve/maps.go
Created Jan 20, 2016

What would you like to do?
Go Map exercise
package main
import (
func WordCount(s string) map[string]int {
count := make(map[string]int)
words := strings.Fields(s)
for _, word := range words {
return count
func main() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.