Trim leading and trailing spaces and replace sequential spaces with one space, following Trimall() in http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
(input string)
| 56 | // Trim leading and trailing spaces and replace sequential spaces with one space, following Trimall() |
| 57 | // in http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html |
| 58 | func signV4TrimAll(input string) string { |
| 59 | // Compress adjacent spaces (a space is determined by |
| 60 | // unicode.IsSpace() internally here) to one space and return |
| 61 | return strings.Join(strings.Fields(input), " ") |
| 62 | } |
no outgoing calls