daemon/server/router: NewRoute: don't use un-keyed struct literal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-09-16 10:25:22 +02:00
parent 4df03a25e7
commit 81506ad8b1

View File

@@ -37,7 +37,7 @@ func (l localRoute) Path() string {
// NewRoute initializes a new local route for the router.
func NewRoute(method, path string, handler httputils.APIFunc, opts ...RouteWrapper) Route {
var r Route = localRoute{method, path, handler}
var r Route = localRoute{method: method, path: path, handler: handler}
for _, o := range opts {
r = o(r)
}