Return NewError function where it belongs
This commit is contained in:
parent
82307cde6c
commit
27104c05f1
4
api.go
4
api.go
@ -19,6 +19,10 @@ type Error struct {
|
||||
Message string `json:"error"`
|
||||
}
|
||||
|
||||
func NewError(err error) Error {
|
||||
return Error{err.Error()}
|
||||
}
|
||||
|
||||
func assetContentType(name string) string {
|
||||
mime := MIME_TYPES[filepath.Ext(name)]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user