Encodes the response headers into XML format.
(response interface{})
| 58 | |
| 59 | // Encodes the response headers into XML format. |
| 60 | func 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 |
| 69 | func mustParseBool(str string) bool { |
no outgoing calls
no test coverage detected