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 Agent struct {
@@ -16,6 +16,11 @@ type Agent struct {
AnnotationNote
}
func (a Agent) String() string {
return fmt.Sprintf("ID: %s\nNames: %v\nSortName: %s\nLife: %s\nGND: %s\nAnnotations: %v\nNotes: %v\n", a.ID, a.Names, a.SortName, a.Life, a.GND, a.Annotations, a.Notes)
func (a Agent) Name() string {
return "agent"
}
func (a Agent) String() string {
data, _ := json.MarshalIndent(a, "", " ")
return string(data)
}