sortedCopy returns a sorted copy of a string slice
(s []string)
| 568 | |
| 569 | // sortedCopy returns a sorted copy of a string slice |
| 570 | func sortedCopy(s []string) []string { |
| 571 | result := make([]string, len(s)) |
| 572 | copy(result, s) |
| 573 | sort.Strings(result) |
| 574 | return result |
| 575 | } |
| 576 | |
| 577 | // contains checks if a string slice contains a value |
| 578 | func contains(slice []string, val string) bool { |