From eff61ce93ec368410039e2a8a2d6e14d8ccd64d1 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 12 Nov 2021 13:41:30 +0100 Subject: [PATCH] Use argument instead of default value for nats connection --- lineprotocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lineprotocol.go b/lineprotocol.go index 1fbe6c2..33c1e0f 100644 --- a/lineprotocol.go +++ b/lineprotocol.go @@ -55,7 +55,7 @@ type Metric struct { // function. handleLine will be called for each line recieved via nats. // Send `true` through the done channel for gracefull termination. func ReceiveNats(address string, handleLine func(dec *lineprotocol.Decoder) error, workers int, ctx context.Context) error { - nc, err := nats.Connect(nats.DefaultURL) + nc, err := nats.Connect(address) if err != nil { return err }