// Chapter 34 example: a small package to test. // // Run its tests from this folder: // cd exercises/34/examples/01-first-test // go test package words import "strings" // Count returns the number of words in s. Words are separated by spaces, // tabs or line endings. func Count(s string) int { return len(strings.Fields(s)) } // Shout returns s in upper case with "!" added. func Shout(s string) string { return strings.ToUpper(s) + "!" }