From cd1ea7c7cb259996a06564aa7679de0d0c13526f Mon Sep 17 00:00:00 2001 From: some Date: Wed, 9 Oct 2024 11:54:28 -0400 Subject: [PATCH] Change optionalEndpoints to endpointOverride --- router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }