From 822324987d7bd2fbc1a278bf07ca1e0ec961314b Mon Sep 17 00:00:00 2001 From: lash Date: Mon, 13 Jan 2025 08:15:45 +0000 Subject: [PATCH] connstr logic --- cmd/main.go | 2 +- event/nats/nats.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 919d605..e769508 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -21,7 +21,7 @@ func main() { flag.StringVar(&connStr, "c", "", "connection string") flag.Parse() - if connStr != "" { + if connStr == "" { connStr = config.DbConn() } connData, err := storage.ToConnData(connStr) diff --git a/event/nats/nats.go b/event/nats/nats.go index 7b3cf4a..1b48176 100644 --- a/event/nats/nats.go +++ b/event/nats/nats.go @@ -92,7 +92,7 @@ func(n *NatsSubscription) Close() error { func(n *NatsSubscription) handleEvent(m jetstream.Msg) { var ev geEvent.Event - logg.DebugCtxf(n.ctx, "have msg", "err", m) + logg.DebugCtxf(n.ctx, "have msg", "msg", m) b := m.Data() err := json.Unmarshal(b, &ev) if err != nil {