diff --git a/data.go b/data.go index 24c1fce..1e347e0 100644 --- a/data.go +++ b/data.go @@ -63,7 +63,6 @@ func NewData(ctx context.Context, url, token string, num int) *Data { } funcMap := map[string]any{ "OrderedBy": OrderedBy, - "Reverse": sort.Reverse, } data.tmpl = template.Must(template.New("index").Funcs(funcMap).ParseFS(content, "*.tmpl")) diff --git a/main.go b/main.go index df6e760..b3defa4 100644 --- a/main.go +++ b/main.go @@ -35,7 +35,7 @@ var ( fl_token = flag.String("token", os.Getenv("MANTIS_API_TOKEN"), "API-Token") fl_port = flag.String("port", ":8080", "[ip]:port to serve") fl_num = flag.Int("num", 250, "number of issues to retrieve at once") - fl_min = flag.String("min", "0.9.1", "minimum version we care for") + fl_min = flag.String("min", "0.10", "minimum version we care for") fl_freq = flag.Duration("fr", 30*time.Minute, "update frequency") fl_proj = flag.Int("project", 23, "project id to use") fl_filter = flag.Int("filter", 229, "filter id to apply for search") diff --git a/project.go b/project.go index aca73ba..b80f475 100644 --- a/project.go +++ b/project.go @@ -45,7 +45,7 @@ type Version struct { Timestamp time.Time } -type VersionsByDate []Version +type VersionsByDate Versions func (v VersionsByDate) Len() int { return len(v) } func (v VersionsByDate) Less(i, j int) bool { return v[i].Timestamp.Before(v[j].Timestamp) }