Files
GoBroke/tunnelbroker/funcs_httperror.go
T

17 lines
234 B
Go

package tunnelbroker
import (
`fmt`
)
// Error conforms an HTTPError to an error.
func (h *HTTPError) Error() (errMsg string) {
errMsg = h.CodeStr
if h.Message != nil {
errMsg += fmt.Sprintf(":\n%s", *h.Message)
}
return
}