args.go
func (a *Args) Sort(f func(x, y []byte) int) {
	sort.SliceStable(a.args, func(i, j int) bool {
		n := f(a.args[i].key, a.args[j].key)
		if n == 0 {
			return f(a.args[i].value, a.args[j].value) == -1
		}
		return n == -1
	})
}
func (a *Args) Sort(f func(x, y []byte) int) {
	sort.SliceStable(a.args, func(i, j int) bool {
		n := f(a.args[i].key, a.args[j].key)
		if n == 0 {
			return f(a.args[i].value, a.args[j].value) == -1
		}
		return n == -1
	})
}
func ( a * Args ) Sort ( f func ( x , y [ ] byte ) int ) { sort . SliceStable ( a . args , func ( i , j int ) bool { n := f ( a . args [ i ] . key , a . args [ j ] . key ) if n == 0 { return f ( a . args [ i ] . value , a . args [ j ] . value ) == - 1 } return n == - 1 } ) }
// Sort sorts Args by key and then value using 'f' as comparison function.
//
// For example args.Sort(bytes.Compare)
Sort sorts Args by key and then value using f as comparison function . For example args . Sort ( bytes . Compare )