aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2024-09-04 20:26:08 +0200
committerÖzgür Kesim <oec@codeblau.de>2024-09-04 20:26:08 +0200
commit57285c12c11ea0bf7b39af2cfc770340a222913a (patch)
tree7404da9b2e26876d2852c503463c58a1cab122e2
parent7eb6abf25009a4d53ca18e4d4ac01c810b52ea48 (diff)
fix minimum required version glitch
-rw-r--r--data.go1
-rw-r--r--main.go2
-rw-r--r--project.go2
3 files changed, 2 insertions, 3 deletions
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) }