diff --git a/microdata.go b/microdata.go index e2474c3..cb12792 100644 --- a/microdata.go +++ b/microdata.go @@ -48,7 +48,7 @@ type PropertyMap map[string]ValueList type Item struct { Types []string `json:"type"` Properties PropertyMap `json:"properties"` - Id string `json:"id,omitempty"` + ID string `json:"id,omitempty"` } // addString adds the property, value pair to the properties map. It appends to any @@ -155,7 +155,7 @@ func (p *parser) readAttr(item *Item, node *html.Node) { if s, ok := getAttr("itemid", node); ok { if u, err := p.baseURL.Parse(s); err == nil { - item.Id = u.String() + item.ID = u.String() } } } diff --git a/microdata_test.go b/microdata_test.go index d0cb14d..9e4386f 100644 --- a/microdata_test.go +++ b/microdata_test.go @@ -95,7 +95,7 @@ func TestParseItemId(t *testing.T) { data := ParseData(html, t) - result := data.Items[0].Id + result := data.Items[0].ID expected := "urn:isbn:978-0141196404" if result != expected { t.Errorf("Result should have been \"%s\", but it was \"%s\"", expected, result)