func (a byLen) Swap(i, j int) {
	a[i], a[j] = a[j], a[i]
}
Swap swap elements
package sort
import (
	"sort"
)
type byLen []string
func (a byLen) Len() int {
	return len(a)
}
func (a byLen) Less(i, j int) bool {
	return len(a[i]) < len(a[j])
}