AscByIndex() must run (n-1) times before [][]string is properly sorted
Please see the example below. This also affects CiAscByIndex(), and likely others as well.
Not sure if this is related to #2 as well..?
package main
import (
"fmt"
"github.com/patrickmn/sortutil"
)
func main() {
ss := [][]string{
{"aaa", "ddd", "ccc", "bbb"},
{"www", "zzz", "yyy", "xxx"},
{"lll", "ooo", "nnn", "mmm"},
{"qqq", "ttt", "sss", "rrr"},
{"ggg", "jjj", "iii", "hhh"},
{"ttt", "www", "vvv", "uuu"},
}
fmt.Println(ss)
// [[aaa ddd ccc bbb] [www zzz yyy xxx] [lll ooo nnn mmm] [qqq ttt sss rrr] [ggg jjj iii hhh] [ttt www vvv uuu]]
sortutil.AscByIndex(ss, 0)
fmt.Println(ss)
// [[aaa ddd ccc bbb] [lll ooo nnn mmm] [www zzz yyy xxx] [ggg jjj iii hhh] [qqq ttt sss rrr] [ttt www vvv uuu]]
sortutil.AscByIndex(ss, 0)
fmt.Println(ss)
// [[aaa ddd ccc bbb] [lll ooo nnn mmm] [ggg jjj iii hhh] [www zzz yyy xxx] [qqq ttt sss rrr] [ttt www vvv uuu]]
sortutil.AscByIndex(ss, 0)
fmt.Println(ss)
// [[aaa ddd ccc bbb] [ggg jjj iii hhh] [lll ooo nnn mmm] [qqq ttt sss rrr] [www zzz yyy xxx] [ttt www vvv uuu]]
sortutil.AscByIndex(ss, 0)
fmt.Println(ss)
// [[aaa ddd ccc bbb] [ggg jjj iii hhh] [lll ooo nnn mmm] [qqq ttt sss rrr] [ttt www vvv uuu] [www zzz yyy xxx]]
}
Update: This can be worked around via CiAscByField() (which does work after running just 1x) by defining a type/struct and coercing the child []string's to the struct.

Something silly is going on here. Indeed it may have something to do with #2. Thanks for the report!
Sure thing, let me know if I can lend a hand. Happy to write a PR if you have an inkling where the issue might lie.
Appreciate it.
I'm not sure yet, but I think the cause is the same as in #2.