diff --git a/component.go b/component.go index 18c14f4..5e169d3 100644 --- a/component.go +++ b/component.go @@ -50,12 +50,11 @@ func processComponent(msg *nats.Msg) { } func (c *Component) getID() string { - if strings.Contains(c.Service, "-") { - var pieces []string - pieces = strings.Split(c.Service, "-") - - return pieces[len(pieces)-1] + if len(c.Service) == 36 { + return c.Service } - return c.Service + pieces := strings.Split(c.Service, "-") + + return pieces[len(pieces)-1] } diff --git a/service.go b/service.go index 336139b..e80b70e 100644 --- a/service.go +++ b/service.go @@ -57,6 +57,10 @@ func processService(msg *nats.Msg) { } func (s *Service) getID() string { + if len(s.ID) == 36 { + return s.ID + } + var pieces []string pieces = strings.Split(s.ID, "-")