Skip to content

Commit

Permalink
fix(pubsublite)!: hide CreateSubscriptionOption.apply (#4344)
Browse files Browse the repository at this point in the history
Since the createSubscriptionSettings struct is not exposed, hide apply().
  • Loading branch information
tmdiep committed Jun 29, 2021
1 parent 63fdb2e commit f31fac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pubsublite/admin.go
Expand Up @@ -165,14 +165,14 @@ type createSubscriptionSettings struct {

// CreateSubscriptionOption is an option for AdminClient.CreateSubscription.
type CreateSubscriptionOption interface {
Apply(*createSubscriptionSettings)
apply(*createSubscriptionSettings)
}

type startingOffset struct {
backlogLocation BacklogLocation
}

func (so startingOffset) Apply(settings *createSubscriptionSettings) {
func (so startingOffset) apply(settings *createSubscriptionSettings) {
settings.backlogLocation = so.backlogLocation
}

Expand All @@ -190,7 +190,7 @@ func StartingOffset(location BacklogLocation) CreateSubscriptionOption {
func (ac *AdminClient) CreateSubscription(ctx context.Context, config SubscriptionConfig, opts ...CreateSubscriptionOption) (*SubscriptionConfig, error) {
var settings createSubscriptionSettings
for _, opt := range opts {
opt.Apply(&settings)
opt.apply(&settings)
}

subsPath, err := wire.ParseSubscriptionPath(config.Name)
Expand Down

0 comments on commit f31fac6

Please sign in to comment.