refactor(router,errors): move functiosn to alphabetical order

This commit is contained in:
Guz
2024-10-24 19:35:43 -03:00
parent c05086a93e
commit f27784a0b2

View File

@@ -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,
})
}