Better reverse link resoving

This commit is contained in:
Simon Martens
2025-01-01 23:49:09 +01:00
parent 7539a2dca7
commit 3f294680c0
13 changed files with 259 additions and 99 deletions

View File

@@ -1,8 +1,8 @@
package xmlmodels
import (
"encoding/json"
"encoding/xml"
"fmt"
)
type Place struct {
@@ -14,6 +14,11 @@ type Place struct {
AnnotationNote
}
func (p Place) String() string {
return fmt.Sprintf("ID: %s\nNames: %v\nSortName: %s\nGeo: %s\nAnnotations: %v\nNotes: %v\n", p.ID, p.Names, p.SortName, p.Geo, p.Annotations, p.Notes)
func (p Place) Name() string {
return "place"
}
func (p Place) String() string {
data, _ := json.MarshalIndent(p, "", " ")
return string(data)
}