Change optionalEndpoints to endpointOverride
This commit is contained in:
parent
4b6b04259f
commit
cd1ea7c7cb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user