diff --git a/router.go b/router.go index 961994d..f80113f 100644 --- a/router.go +++ b/router.go @@ -22,13 +22,13 @@ type Router struct { Endpoints } -func NewRouter(r *router.Router, logger log.Logger, optionalEndpoints ...Endpoints) (ro *Router) { +func NewRouter(r *router.Router, logger log.Logger, endpointOverride ...Endpoints) (ro *Router) { var endpoints Endpoints if r == nil { r = router.NewRouter(nil, nil) } - if len(optionalEndpoints) == 1 { - endpoints = optionalEndpoints[0] + if len(endpointOverride) == 1 { + endpoints = endpointOverride[0] } else { endpoints = defaultEndpoints }