package main
import (
"golang.org/x/tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
ss := strings.Fields(s)
result := make(map[string]int)
for i1 := range ss {
var counter int
for i2 := range ss {
if ss[i1] == ss[i2] {
counter += 1
}
}
result[ss[i1]] = counter
}
return result
}
func main() {
wc.Test(WordCount)
}
On a system with GnuPG installed, do this by downloading the ISO PGP signature (under Checksums in the page Download) to the ISO directory, and verifying it with: