fix: variadic function

This commit is contained in:
Hongbo Miao authored and GitHub committed 2020-03-12 13:09:52 +08:00
1 parent bf67e042e9
commit 252edd5485
1 file changed
+1 -1
+1 -1
View File
@@ -6,7 +6,7 @@
<u><i>gopl.io/ch5/sum</i></u>
```Go
func sum(vals...int) int {
func sum(vals ...int) int {
total := 0
for _, val := range vals {
total += val