mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 17:15:31 +00:00
Better structure of files; introduced XML models
This commit is contained in:
18
xmlmodels/categories.go
Normal file
18
xmlmodels/categories.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package xmlmodels
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Category struct {
|
||||
XMLName xml.Name `xml:"kategorie"`
|
||||
Names []string `xml:"name"`
|
||||
SortName string `xml:"sortiername"`
|
||||
Identifier
|
||||
AnnotationNote
|
||||
}
|
||||
|
||||
func (c Category) String() string {
|
||||
return fmt.Sprintf("ID: %s\nNames: %v\nSortName: %s\nAnnotations: %v\nNotes: %v\n", c.ID, c.Names, c.SortName, c.Annotations, c.Notes)
|
||||
}
|
||||
Reference in New Issue
Block a user