Better structure of files; introduced XML models

This commit is contained in:
Simon Martens
2025-01-01 17:00:26 +01:00
parent e46d540c01
commit 7539a2dca7
25 changed files with 297 additions and 348 deletions

View File

@@ -1,17 +1,5 @@
package gnd
import "github.com/Theodor-Springmann-Stiftung/kgpz_web/providers/xmlprovider"
type GNDData struct {
ID, GND string
}
func ProviderIntoDataset(provider *xmlprovider.XMLProvider[xmlprovider.Agent]) []GNDData {
provider.Lock()
defer provider.Unlock()
var data []GNDData
for _, agent := range provider.Array {
data = append(data, GNDData{ID: agent.ID, GND: agent.GND})
}
return data
}