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

Function encodeResponse

test-utils_test.go:60–66  ·  view source on GitHub ↗

Encodes the response headers into XML format.

(response interface{})

Source from the content-addressed store, hash-verified

58
59// Encodes the response headers into XML format.
60func encodeResponse(response interface{}) []byte {
61 var bytesBuffer bytes.Buffer
62 bytesBuffer.WriteString(xml.Header)
63 encode := xml.NewEncoder(&bytesBuffer)
64 encode.Encode(response)
65 return bytesBuffer.Bytes()
66}
67
68// Convert string to bool and always return false if any error
69func mustParseBool(str string) bool {

Callers 2

generateErrorResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected