It would be convenient to be able to say something like:
for _, element := reverse range mySlice { ... }
You can also do:
s := []int{5, 4, 3, 2, 1} for i := range s { fmt.Println(s[len(s)-1-i]) // Suggestion: do `last := len(s)-1` before the loop }
Output:
1 2 3 4 5
Also here: http://play.golang.org/p/l7Z69TV7Vl