exercism/go/word-count
Brian Buller 50f4a86fd8 Initial Commit 2016-08-13 18:20:14 -05:00
..
README.md Initial Commit 2016-08-13 18:20:14 -05:00
cases_test.go Initial Commit 2016-08-13 18:20:14 -05:00
word_count.go Initial Commit 2016-08-13 18:20:14 -05:00
word_count_test.go Initial Commit 2016-08-13 18:20:14 -05:00

README.md

Word Count

Write a program that given a phrase can count the occurrences of each word in that phrase.

For example for the input "olly olly in come free"

olly: 2
in: 1
come: 1
free: 1

To run the tests simply run the command go test in the exercise directory.

If the test suite contains benchmarks, you can run these with the -bench flag:

go test -bench .

For more detailed info about the Go track see the help page.

Source

This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour. view source