File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package google
3
3
import (
4
4
"context"
5
5
"errors"
6
+ "fmt"
6
7
7
8
"cloud.google.com/go/pubsub"
8
9
)
@@ -21,7 +22,7 @@ func NewPubSubClient(projectID string) (PubSubService, error) {
21
22
22
23
client , err := pubsub .NewClient (ctx , projectID )
23
24
if err != nil {
24
- return nil , errors .New ("Error creating Google Pub/Sub client: %v" , err )
25
+ return nil , errors .New (fmt . Sprintf ( "Error creating Google Pub/Sub client: %v" , err ) )
25
26
}
26
27
27
28
return & gcpubsub {client }, nil
@@ -36,7 +37,7 @@ func (g *gcpubsub) CreateTopic(topicID string) (*pubsub.Topic, error) {
36
37
37
38
topic , err := g .client .CreateTopic (ctx , topicID )
38
39
if err != nil {
39
- return nil , errors .New ("Error creating topic: %v" , err )
40
+ return nil , errors .New (fmt . Sprintf ( "Error creating topic: %v" , err ) )
40
41
}
41
42
42
43
return topic , nil
You can’t perform that action at this time.
0 commit comments