use Id function instead of accessing config directly

This commit is contained in:
Joel Wetzell
2025-12-10 07:44:55 -06:00
parent 8ca105a0b6
commit b59da597ba
14 changed files with 46 additions and 45 deletions

View File

@@ -76,7 +76,7 @@ func (nc *NATSClient) Run() error {
sub, err := nc.client.Subscribe(nc.Subject, func(msg *nats.Msg) {
if nc.router != nil {
nc.router.HandleInput(nc.config.Id, msg)
nc.router.HandleInput(nc.Id(), msg)
}
})
@@ -87,7 +87,7 @@ func (nc *NATSClient) Run() error {
defer sub.Unsubscribe()
<-nc.ctx.Done()
slog.Debug("router context done in module", "id", nc.config.Id)
slog.Debug("router context done in module", "id", nc.Id())
return nil
}