mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
BUGFIX: array initialization syntax in issues.go
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package xmlprovider
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@@ -48,6 +47,8 @@ func Sort[T XMLItem](i, j T) int {
|
||||
}
|
||||
|
||||
int_b, err := strconv.Atoi(sort_b[i])
|
||||
if err != nil {
|
||||
|
||||
if item < sort_b[i] {
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
{{ $date := .model.Datum.When }}
|
||||
<div>
|
||||
<a href="/{{- $date.Year -}}">
|
||||
Zurück zum Jahr
|
||||
Zum Jahr
|
||||
{{ $date.Year }}
|
||||
</a>
|
||||
|
||||
<div>
|
||||
<div class="flex flex-row gap-x-2">
|
||||
{{ if $model.Prev }}
|
||||
<a href="/{{- $model.Prev.Datum.When.Year -}}/{{- $model.Prev.Number.No -}}">
|
||||
← Zurück
|
||||
|
||||
@@ -34,11 +34,7 @@ func (i Issue) Name() string {
|
||||
}
|
||||
|
||||
func (i Issue) Keys() []string {
|
||||
if len(i.keys) > 0 {
|
||||
return i.keys
|
||||
}
|
||||
|
||||
res := make([]string, 2)
|
||||
res := make([]string, 0, 2)
|
||||
res = append(res, i.Reference())
|
||||
|
||||
date := i.Datum.When.String()
|
||||
@@ -46,8 +42,6 @@ func (i Issue) Keys() []string {
|
||||
res = append(res, date)
|
||||
}
|
||||
|
||||
i.keys = res
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user