github.com/ezoic/ws@v1.0.4-0.20220713205711-5c1d69e074c5/autobahn/main_go18.go (about)

     1  // +build go1.8
     2  
     3  package main
     4  
     5  import "sort"
     6  
     7  func sortBySegment(s []string) {
     8  	sort.Slice(s, func(i, j int) bool {
     9  		return compareBySegment(s[i], s[j]) < 0
    10  	})
    11  }