func PatchBook(book *EPUB) {
	for _, sr := range book.RootFiles {
		ui := sr.UniqueIdentifier
		var newIdentifiers []DCIdentifierUnmarshal
		for _, el := range sr.MetaData.(*MetaDataUnmarshal).Identifier {
			if el.ID == ui {
				newIdentifiers = []DCIdentifierUnmarshal{el}
				break
			}
		}
		sr.MetaData.(*MetaDataUnmarshal).Identifier = newIdentifiers

		newItems := make([]Item, 0)
		for _, el := range sr.Manifest.Items {
			if el.ID == "default-info" {
				fmt.Println("Skipping")
			} else {
				newItems = append(newItems, el)
			}
		}
		sr.Manifest.Items = newItems

		newRefs := make([]ItemRef, 0)
		for _, el := range sr.Spine.ItemRefs {
			if el.IDRef == "default-info" {
				fmt.Println("Skipping")
			} else {
				newRefs = append(newRefs, el)
			}
		}
		sr.Spine.ItemRefs = newRefs
	}

}
//PatchBook modify book structure with fixes
PatchBook modify book structure with fixes
// PatchBook modify book structure with fixes
func PatchBook(book *EPUB) {
	for _, sr := range book.RootFiles {
		ui := sr.UniqueIdentifier
		var newIdentifiers []DCIdentifierUnmarshal
		for _, el := range sr.MetaData.(*MetaDataUnmarshal).Identifier {
			if el.ID == ui {
				newIdentifiers = []DCIdentifierUnmarshal{el}
				break
			}
		}
		sr.MetaData.(*MetaDataUnmarshal).Identifier = newIdentifiers
		newItems := make([]Item, 0)
		for _, el := range sr.Manifest.Items {
			if el.ID == "default-info" {
				fmt.Println("Skipping")
			} else {
				newItems = append(newItems, el)
			}
		}
		sr.Manifest.Items = newItems
		newRefs := make([]ItemRef, 0)
		for _, el := range sr.Spine.ItemRefs {
			if el.IDRef == "default-info" {
				fmt.Println("Skipping")
			} else {
				newRefs = append(newRefs, el)
			}
		}
		sr.Spine.ItemRefs = newRefs
	}
}
func PatchBook ( book * EPUB ) { for _ , sr := range book . RootFiles { ui := sr . UniqueIdentifier var newIdentifiers [ ] DCIdentifierUnmarshal for _ , el := range sr . MetaData . ( * MetaDataUnmarshal ) . Identifier { if el . ID == ui { newIdentifiers = [ ] DCIdentifierUnmarshal { el } break } } sr . MetaData . ( * MetaDataUnmarshal ) . Identifier = newIdentifiers newItems := make ( [ ] Item , 0 ) for _ , el := range sr . Manifest . Items { if el . ID == " " { fmt . Println ( " " ) } else { newItems = append ( newItems , el ) } } sr . Manifest . Items = newItems newRefs := make ( [ ] ItemRef , 0 ) for _ , el := range sr . Spine . ItemRefs { if el . IDRef == " " { fmt . Println ( " " ) } else { newRefs = append ( newRefs , el ) } } sr . Spine . ItemRefs = newRefs } }
PatchBook modify book structure with fixes
PatchBook modify book structure with fixes