mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 17:15:31 +00:00
Added arrays to XMLProvider types for faster iteration
This commit is contained in:
@@ -29,7 +29,11 @@ type Additional struct {
|
||||
Bis int `xml:"bis"`
|
||||
}
|
||||
|
||||
func (i Issue) GetIDs() []string {
|
||||
func (i Issue) Keys() []string {
|
||||
if len(i.keys) > 0 {
|
||||
return i.keys
|
||||
}
|
||||
|
||||
res := make([]string, 2)
|
||||
date := i.Datum.When
|
||||
if date != "" {
|
||||
@@ -40,6 +44,8 @@ func (i Issue) GetIDs() []string {
|
||||
res = append(res, i.Datum.When[0:4]+"-"+strconv.Itoa(i.Number.No))
|
||||
}
|
||||
|
||||
i.keys = res
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user