This commit is contained in:
parent
fddea5e39b
commit
207fd8ecd6
|
@ -137,7 +137,8 @@ func SimplifyMicroformat(item *microformats.Microformat) map[string]interface{}
|
|||
}
|
||||
|
||||
func SimplifyMicroformatData(md *microformats.Data) []map[string]interface{} {
|
||||
items := []map[string]interface{}{}
|
||||
var items []map[string]interface{}
|
||||
|
||||
for _, item := range md.Items {
|
||||
if len(item.Type) >= 1 && item.Type[0] == "h-feed" {
|
||||
for _, childItem := range item.Children {
|
||||
|
@ -191,6 +192,10 @@ func MapToItem(result map[string]interface{}) microsub.Item {
|
|||
|
||||
item.Type = "entry"
|
||||
|
||||
if itemType, e := result["type"]; e {
|
||||
item.Type = itemType.(string)
|
||||
}
|
||||
|
||||
if name, e := result["name"]; e {
|
||||
item.Name = name.(string)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user