GoBroke/tunnelbroker/funcs_httperror.go
2024-12-20 01:29:56 -05:00

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
}