mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user