Alexey Ugnichev

21%
Flag icon
If the last parameter of a function is followed by …type, this indicates that the function can deal with a variable number of parameters of that type, possibly also 0: a so called variadic function: func myFunc(a, b, arg …int) {} The function receives in effect a slice of the type (see chapter 7), which can be looped through with the for _, v := range construct
The Way to Go: A Thorough Introduction to the Go Programming Language
Rate this book
Clear rating
Open Preview