code: func safeSort(in []string) []string {
  	if sort.StringsAreSorted(in) {
  		return in
  	}
  	out := make([]string, len(in))
  	copy(out, in)
  	sort.Strings(out)
  	return out
  }
docs: // safeSort sort input strings without modification