June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package main import ( "bufio" "fmt" "io" "os" ) // WordCount takes a file and returns a map // with each word as a key and it's number of // appearances as a value func WordCount(f io.Reader) map[string]int { result := make(map[string]int) // make a scanner to work on the file // io.Reader interface scanner := bufio.NewScanner(f) scanner.Split(bufio.ScanWords) ...Read now
Unlock full access