MCPcopy
hub / github.com/minio/minio-go / signV4TrimAll

Function signV4TrimAll

pkg/signer/utils.go:58–62  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
58func 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}

Callers 2

TestSignV4TrimAllFunction · 0.85
getCanonicalHeadersFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSignV4TrimAllFunction · 0.68