refactor(router,errors): move functiosn to alphabetical order
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
package rerrors
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
func NotFound() RouteError {
|
||||
return NewRouteError(http.StatusNotFound, "Not Found", map[string]any{})
|
||||
}
|
||||
|
||||
func MissingParameters(params []string) RouteError {
|
||||
return NewRouteError(http.StatusBadRequest, "Missing parameters", map[string]any{
|
||||
"missing_parameters": params,
|
||||
})
|
||||
}
|
||||
|
||||
func MissingCookies(cookies []string) RouteError {
|
||||
return NewRouteError(http.StatusBadRequest, "Missing cookies", map[string]any{
|
||||
"missing_cookies": cookies,
|
||||
@@ -24,3 +22,9 @@ func MethodNowAllowed(method string, allowedMethods []string) RouteError {
|
||||
"allowed_methods": allowedMethods,
|
||||
})
|
||||
}
|
||||
|
||||
func MissingParameters(params []string) RouteError {
|
||||
return NewRouteError(http.StatusBadRequest, "Missing parameters", map[string]any{
|
||||
"missing_parameters": params,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user