Strings escapes each string in values while preserving order.
(values []string)
| 16 | |
| 17 | // Strings escapes each string in values while preserving order. |
| 18 | func Strings(values []string) []string { |
| 19 | out := make([]string, 0, len(values)) |
| 20 | for _, value := range values { |
| 21 | out = append(out, String(value)) |
| 22 | } |
| 23 | return out |
| 24 | } |
| 25 | |
| 26 | // JSONBody escapes all string values in a JSON document. |
| 27 | func JSONBody(body []byte) ([]byte, bool) { |
no test coverage detected