| 1 | // Copyright 2013 The Go Authors. |
| 2 | // Copyright 2015 Randall Farmer. |
| 3 | // All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package sorts_test |
| 8 | |
| 9 | import ( |
| 10 | "fmt" |
| 11 | "github.com/twotwotwo/sorts/sortutil" |
| 12 | ) |
| 13 | |
| 14 | func Example_strings() { |
| 15 | groceries := []string{"peppers", "tortillas", "tomatoes", "cheese"} |
| 16 | sortutil.Strings(groceries) // or sortutil.Bytes([][]byte) |
| 17 | fmt.Println(groceries) |
| 18 | // Output: [cheese peppers tomatoes tortillas] |
| 19 | } |