Skip to content

Commit

Permalink
Added type attribute for Extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ajn committed Feb 16, 2017
1 parent eeeb33f commit d60dba2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testdata/vast_inline_linear.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</Creative>
</Creatives>
<Extensions>
<Extension>
<Extension type="geo">
<Geo>
<Country>US</Country>
<State>CA</State>
Expand Down
1 change: 1 addition & 0 deletions vast.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ type CreativeExtensions struct {

// Extension represent aribtrary XML provided by the platform to extend the VAST response
type Extension struct {
Type string `xml:"type,attr,omitempty"`
Data []byte `xml:",innerxml"`
}

Expand Down
1 change: 1 addition & 0 deletions vast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ var _ = Describe("VAST", func() {
Extensions: &Extensions{
Extensions: []Extension{
{
Type: "geo",
Data: []byte(`
<Geo>
<Country>US</Country>
Expand Down

0 comments on commit d60dba2

Please sign in to comment.