diff --git a/conf/config.yml b/conf/config.yml index 6b08212..646c9e9 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -8,7 +8,7 @@ httpInnerAddress: ip: 0.0.0.0 port: 9003 moduleName: isp-gate -instanceUuid: bac77382-dfd1-440d-82b5-20fe4f5ac6d0 +instanceUuid: 9d89354b-c728-4b48-b002-a7d3b229f151 locations: - pathPrefix: /api protocol: http diff --git a/routing/routing.go b/routing/routing.go index 9e18116..c4bad05 100644 --- a/routing/routing.go +++ b/routing/routing.go @@ -19,7 +19,7 @@ func InitRoutes(configs structure.RoutingConfig) { if backend.Address.IP == "" { continue } - if backend.HandlersInfo == nil { + if len(backend.HandlersInfo) == 0 { if len(backend.Endpoints) == 0 || backend.Address.Port == "" { continue } @@ -37,7 +37,10 @@ func InitRoutes(configs structure.RoutingConfig) { AuthUserMethods = newAuthUserAddressMap } -func addEndpointsToMaps(endpoints []structure.EndpointDescriptor, pathPrefix string, newAddressMap map[string]bool, newInnerAddressMap map[string]bool, newAuthUserAddressMap map[string]bool) { //nolint +func addEndpointsToMaps(endpoints []structure.EndpointDescriptor, + pathPrefix string, newAddressMap map[string]bool, + newInnerAddressMap map[string]bool, + newAuthUserAddressMap map[string]bool) { for _, el := range endpoints { if pathPrefix != "" { el.Path = pathPrefix + "/" + el.Path