github.com/simonmittag/ws@v1.1.0-rc.5.0.20210419231947-82b846128245/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  }