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)))
|
||||
}
|
||||
|
||||
// todo: comment on maps
|
||||
// todo: comment on channels
|
@ -13,9 +13,9 @@ for
|
||||
if-else
|
||||
switch
|
||||
arrays
|
||||
range
|
||||
slices
|
||||
maps
|
||||
range
|
||||
functions
|
||||
multiple-return-values
|
||||
varadic-functions
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user