Added arrays to XMLProvider types for faster iteration

This commit is contained in:
Simon Martens
2024-12-20 19:54:25 +01:00
parent 3ef30ef7c7
commit 977d7331d5
11 changed files with 188 additions and 122 deletions

View File

@@ -37,10 +37,15 @@ type Note struct {
type Identifier struct {
ID string `xml:"id,attr"`
KeyedItem
}
func (i Identifier) GetIDs() []string {
return []string{i.ID}
func (i Identifier) Keys() []string {
if len(i.keys) > 0 {
return i.keys
}
i.keys = []string{i.ID}
return i.keys
}
type Reference struct {