by sherwin · 14y ago · 0 comments
If you only need the second item in the range (the value), use the blank identifier, an underscore, to discard the first:
sum := 0 for _, value := range array { sum += value }
from: http://golang.org/doc/effective_go.html#for
No comments yet.