range after slices and maps
This commit is contained in:
parent
f6ecd99639
commit
66ad9b0d13
@ -18,3 +18,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
fmt.Println(total / float64(len(x)))
|
fmt.Println(total / float64(len(x)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: comment on maps
|
||||||
|
// todo: comment on channels
|
@ -13,9 +13,9 @@ for
|
|||||||
if-else
|
if-else
|
||||||
switch
|
switch
|
||||||
arrays
|
arrays
|
||||||
range
|
|
||||||
slices
|
slices
|
||||||
maps
|
maps
|
||||||
|
range
|
||||||
functions
|
functions
|
||||||
multiple-return-values
|
multiple-return-values
|
||||||
varadic-functions
|
varadic-functions
|
||||||
|
@ -41,7 +41,7 @@ func sha1Sum(s string) string {
|
|||||||
|
|
||||||
var cacheDir = "/tmp/gbe-book-cache"
|
var cacheDir = "/tmp/gbe-book-cache"
|
||||||
|
|
||||||
func mustReadFile(path string) {
|
func mustReadFile(path string) string {
|
||||||
bytes, err := ioutil.ReadFile(path)
|
bytes, err := ioutil.ReadFile(path)
|
||||||
check(err)
|
check(err)
|
||||||
return string(bytes)
|
return string(bytes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user