Skip to content

Commit

Permalink
Add targetArn param to sns.PublishOpt{} & to params in sns.Publish()
Browse files Browse the repository at this point in the history
  • Loading branch information
maerlyn5 committed Jul 24, 2014
1 parent 8cac473 commit 6c1f307
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exp/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ type PublishOpt struct {
MessageStructure string
Subject string
TopicArn string
TargetArn string
}

type PublishResp struct {
Expand Down Expand Up @@ -213,6 +214,10 @@ func (sns *SNS) Publish(options *PublishOpt) (resp *PublishResp, err error) {
params["TopicArn"] = options.TopicArn
}

if options.TargetArn != "" {
params["TargetArn"] = options.TargetArn
}

err = sns.query(nil, nil, params, resp)
return
}
Expand Down

0 comments on commit 6c1f307

Please sign in to comment.