diff --git a/component.go b/component.go index 5e169d3..4d8ae75 100644 --- a/component.go +++ b/component.go @@ -7,7 +7,6 @@ package main import ( "encoding/json" "log" - "strings" "github.com/nats-io/nats" "github.com/r3labs/sse" @@ -50,11 +49,5 @@ func processComponent(msg *nats.Msg) { } func (c *Component) getID() string { - if len(c.Service) == 36 { - return c.Service - } - - pieces := strings.Split(c.Service, "-") - - return pieces[len(pieces)-1] + return c.Service } diff --git a/service.go b/service.go index e80b70e..c116f0a 100644 --- a/service.go +++ b/service.go @@ -7,7 +7,6 @@ package main import ( "encoding/json" "log" - "strings" "time" "github.com/nats-io/nats" @@ -57,12 +56,5 @@ 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, "-") - - return pieces[len(pieces)-1] + return s.ID }