Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions envconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ func TestProcess(t *testing.T) {
t.Errorf("expected %q, got %q", u, s.UrlPointer.Value.String())
}

if s.GooglePubSubTopic.ID != "projects/project-id/topics/topic-id" {
t.Errorf("expected %s, got %s", "projects/project-id/topics/topic-id", s.GooglePubSubTopic.ID)
}

if s.GooglePubSubTopic.ProjectID != "project-id" {
t.Errorf("expected %s, got %s", "project-id", s.GooglePubSubTopic.ProjectID)
}
Expand Down
2 changes: 2 additions & 0 deletions types/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var (
)

type GooglePubSubTopic struct {
ID string // The raw ID passed
ProjectID string
TopicID string
}
Expand All @@ -27,6 +28,7 @@ func (pst *GooglePubSubTopic) Set(value string) error {
return ErrInvalidGoogleTopicID
}

pst.ID = value
pst.ProjectID = m[1]
pst.TopicID = m[2]

Expand Down
Loading