aboutsummaryrefslogtreecommitdiff
path: root/internal/http/route/route.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/http/route/route.go')
-rw-r--r--internal/http/route/route.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/http/route/route.go b/internal/http/route/route.go
index 601fbd67..c5e3b36f 100644
--- a/internal/http/route/route.go
+++ b/internal/http/route/route.go
@@ -7,14 +7,13 @@ import (
"strconv"
"github.com/gorilla/mux"
- "miniflux.app/v2/internal/logger"
)
// Path returns the defined route based on given arguments.
-func Path(router *mux.Router, name string, args ...interface{}) string {
+func Path(router *mux.Router, name string, args ...any) string {
route := router.Get(name)
if route == nil {
- logger.Fatal("[Route] Route not found: %s", name)
+ panic("route not found: " + name)
}
var pairs []string
@@ -29,7 +28,7 @@ func Path(router *mux.Router, name string, args ...interface{}) string {
result, err := route.URLPath(pairs...)
if err != nil {
- logger.Fatal("[Route] %v", err)
+ panic(err)
}
return result.String()