mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Better reverse link resoving
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package xmlmodels
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@@ -29,6 +29,10 @@ type Additional struct {
|
||||
Bis int `xml:"bis"`
|
||||
}
|
||||
|
||||
func (i Issue) Name() string {
|
||||
return "issue"
|
||||
}
|
||||
|
||||
func (i Issue) Keys() []string {
|
||||
if len(i.keys) > 0 {
|
||||
return i.keys
|
||||
@@ -55,5 +59,6 @@ func (i Issue) Reference() string {
|
||||
}
|
||||
|
||||
func (i Issue) String() string {
|
||||
return fmt.Sprintf("Number: %v, Datum: %v, Von: %d, Bis: %d, Additionals: %v, Identifier: %v, AnnotationNote: %v\n", i.Number, i.Datum, i.Von, i.Bis, i.Additionals, i.Identifier, i.AnnotationNote)
|
||||
data, _ := json.MarshalIndent(i, "", " ")
|
||||
return string(data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user