github.com/go-board/x-go@v0.1.2-0.20220610024734-db1323f6cb15/xsort/reverse.go (about) 1 package xsort 2 3 func ReverseInterface(a []interface{}) []interface{} { 4 i := 0 5 j := len(a) 6 for i < j { 7 a[i], a[j] = a[j], a[i] 8 i++ 9 j-- 10 } 11 return a 12 }