Skip to content

Commit 8023785

Browse files
committed
chore(pubsub): Fix typo in pubsub subscriber
1 parent 612e608 commit 8023785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pubsub/v2/subscriber.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ type Subscriber struct {
5757
// Subscriber creates a subscriber client which references a single subscription.
5858
func (c *Client) Subscriber(nameOrID string) *Subscriber {
5959
s := strings.Split(nameOrID, "/")
60-
// The string looks like a properly formatted topic name, use it directly.
60+
// The string looks like a properly formatted subscription name, use it directly.
6161
if len(s) == 4 {
6262
return newSubscriber(c, nameOrID)
6363
}
64-
// In all other cases, treat the arg as the topicID, even if misformatted.
64+
// In all other cases, treat the arg as the subscriptionID, even if misformatted.
6565
return newSubscriber(c, fmt.Sprintf("projects/%s/subscriptions/%s", c.projectID, nameOrID))
6666
}
6767

0 commit comments

Comments
 (0)