range after slices and maps

This commit is contained in:
Mark McGranaghan 2012-10-03 09:50:46 -07:00
parent f6ecd99639
commit 66ad9b0d13
6 changed files with 5 additions and 2 deletions

View File

@ -18,3 +18,6 @@ func main() {
}
fmt.Println(total / float64(len(x)))
}
// todo: comment on maps
// todo: comment on channels

View File

@ -13,9 +13,9 @@ for
if-else
switch
arrays
range
slices
maps
range
functions
multiple-return-values
varadic-functions

View File

@ -41,7 +41,7 @@ func sha1Sum(s string) string {
var cacheDir = "/tmp/gbe-book-cache"
func mustReadFile(path string) {
func mustReadFile(path string) string {
bytes, err := ioutil.ReadFile(path)
check(err)
return string(bytes)