mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-25 23:23:21 -05:00
Remove unused WriteError function
This commit is contained in:
parent
096005db3d
commit
9cd2724416
@ -41,17 +41,8 @@ var error_codes = map[int]string{
|
||||
func NewError(error_code int) *Error {
|
||||
msg, ok := error_codes[error_code]
|
||||
if !ok {
|
||||
log.Printf("Error: WriteError received error code of %d", error_code)
|
||||
log.Printf("Error: NewError received unknown error code of %d", error_code)
|
||||
msg = error_codes[999]
|
||||
}
|
||||
return &Error{error_code, msg}
|
||||
}
|
||||
|
||||
func WriteError(w http.ResponseWriter, error_code int) {
|
||||
e := NewError(error_code)
|
||||
|
||||
err := e.Write(w)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user