|
|
|
|
|
by Gazler
5029 days ago
|
|
I really like the structure of this, very readable and a great intro. I have some confusion on http://www.golang-book.com/6 It says: Go also provides a shorter syntax for creating arrays: x := [5]float64{ 98, 93, 77, 82, 83 } We no longer need to specify the type because Go can figure it out. Sometimes arrays like this can get too long to fit on one line, so Go allows you to break it up like this: However the type is specified as `float64` |
|
var x [5]float64 = [5]float64{ 98, 93, 77, 82, 83 }
But I explained ":=" earlier so I can see how that would be confusing.