Skip to content

Commit 2574a05

Browse files
authored
Merge pull request #1013 from jafossum/fix-nats-typos
Fix docstring typos in nats and jetstream protocol
2 parents 04ed212 + 2458ec7 commit 2574a05

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

protocol/nats/v2/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
var ErrInvalidQueueName = errors.New("invalid queue name for QueueSubscriber")
1515

16-
// NatsOptions is a helper function to group a variadic stan.ProtocolOption into
17-
// []stan.Option that can be used by either Sender, Consumer or Protocol
16+
// NatsOptions is a helper function to group a variadic nats.ProtocolOption into
17+
// []nats.Option that can be used by either Sender, Consumer or Protocol
1818
func NatsOptions(opts ...nats.Option) []nats.Option {
1919
return opts
2020
}

protocol/nats/v2/protocol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Protocol struct {
2424
Sender *Sender
2525
senderOptions []SenderOption
2626

27-
connOwned bool // whether this protocol created the stan connection
27+
connOwned bool // whether this protocol created the nats connection
2828
}
2929

3030
// NewProtocol creates a new NATS protocol.

protocol/nats/v2/sender.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type Sender struct {
2222
connOwned bool
2323
}
2424

25-
// NewSender creates a new protocol.Sender responsible for opening and closing the STAN connection
25+
// NewSender creates a new protocol.Sender responsible for opening and closing the NATS connection
2626
func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption) (*Sender, error) {
2727
conn, err := nats.Connect(url, natsOpts...)
2828
if err != nil {
@@ -40,7 +40,7 @@ func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption
4040
return s, nil
4141
}
4242

43-
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN
43+
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS
4444
// connection to the caller
4545
func NewSenderFromConn(conn *nats.Conn, subject string, opts ...SenderOption) (*Sender, error) {
4646
s := &Sender{

protocol/nats_jetstream/v2/sender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func NewSender(url, stream, subject string, natsOpts []nats.Option, jsmOpts []na
4242
return s, nil
4343
}
4444

45-
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN
45+
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS
4646
// connection to the caller
4747
func NewSenderFromConn(conn *nats.Conn, stream, subject string, jsmOpts []nats.JSOpt, opts ...SenderOption) (*Sender, error) {
4848
jsm, err := conn.JetStream(jsmOpts...)

0 commit comments

Comments
 (0)