We implement `sort.Interface` - `Len`, `Less`, and `Swap` - on our type so we can use the `sort` package's generic `Sort` function. `Len` and `Swap` will usually be similar across types and `Less` will hold the actual custom sorting logic. In our case we want to sort in order of increasing string length, so we use `len(s[i])` and `len(s[j])` here.

Len is referenced in 0 repositories