From 2458ec7a7a89b645cfacd05ab75f99a1ca2dafb5 Mon Sep 17 00:00:00 2001 From: "John A. Fossum" <3495141+jafossum@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:30:11 +0100 Subject: [PATCH] Fix docstring typos in nats and jetstream protocol Signed-off-by: John A. Fossum <3495141+jafossum@users.noreply.github.com> --- protocol/nats/v2/options.go | 4 ++-- protocol/nats/v2/protocol.go | 2 +- protocol/nats/v2/sender.go | 4 ++-- protocol/nats_jetstream/v2/sender.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol/nats/v2/options.go b/protocol/nats/v2/options.go index a842177ae..e3acf7394 100644 --- a/protocol/nats/v2/options.go +++ b/protocol/nats/v2/options.go @@ -13,8 +13,8 @@ import ( var ErrInvalidQueueName = errors.New("invalid queue name for QueueSubscriber") -// NatsOptions is a helper function to group a variadic stan.ProtocolOption into -// []stan.Option that can be used by either Sender, Consumer or Protocol +// NatsOptions is a helper function to group a variadic nats.ProtocolOption into +// []nats.Option that can be used by either Sender, Consumer or Protocol func NatsOptions(opts ...nats.Option) []nats.Option { return opts } diff --git a/protocol/nats/v2/protocol.go b/protocol/nats/v2/protocol.go index d8de1bba6..9f559bb7f 100644 --- a/protocol/nats/v2/protocol.go +++ b/protocol/nats/v2/protocol.go @@ -24,7 +24,7 @@ type Protocol struct { Sender *Sender senderOptions []SenderOption - connOwned bool // whether this protocol created the stan connection + connOwned bool // whether this protocol created the nats connection } // NewProtocol creates a new NATS protocol. diff --git a/protocol/nats/v2/sender.go b/protocol/nats/v2/sender.go index adf8fc9c8..550207200 100644 --- a/protocol/nats/v2/sender.go +++ b/protocol/nats/v2/sender.go @@ -22,7 +22,7 @@ type Sender struct { connOwned bool } -// NewSender creates a new protocol.Sender responsible for opening and closing the STAN connection +// NewSender creates a new protocol.Sender responsible for opening and closing the NATS connection func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption) (*Sender, error) { conn, err := nats.Connect(url, natsOpts...) if err != nil { @@ -40,7 +40,7 @@ func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption return s, nil } -// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN +// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS // connection to the caller func NewSenderFromConn(conn *nats.Conn, subject string, opts ...SenderOption) (*Sender, error) { s := &Sender{ diff --git a/protocol/nats_jetstream/v2/sender.go b/protocol/nats_jetstream/v2/sender.go index ed63a3e57..2ed7fa2d2 100644 --- a/protocol/nats_jetstream/v2/sender.go +++ b/protocol/nats_jetstream/v2/sender.go @@ -42,7 +42,7 @@ func NewSender(url, stream, subject string, natsOpts []nats.Option, jsmOpts []na return s, nil } -// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN +// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS // connection to the caller func NewSenderFromConn(conn *nats.Conn, stream, subject string, jsmOpts []nats.JSOpt, opts ...SenderOption) (*Sender, error) { jsm, err := conn.JetStream(jsmOpts...)