fix minimum required version glitch

This commit is contained in:
Özgür Kesim 2024-09-04 20:26:08 +02:00
parent 7eb6abf250
commit 57285c12c1
Signed by: oec
GPG Key ID: F136A7F922D018D7
3 changed files with 2 additions and 3 deletions

View File

@ -63,7 +63,6 @@ func NewData(ctx context.Context, url, token string, num int) *Data {
} }
funcMap := map[string]any{ funcMap := map[string]any{
"OrderedBy": OrderedBy, "OrderedBy": OrderedBy,
"Reverse": sort.Reverse,
} }
data.tmpl = template.Must(template.New("index").Funcs(funcMap).ParseFS(content, "*.tmpl")) data.tmpl = template.Must(template.New("index").Funcs(funcMap).ParseFS(content, "*.tmpl"))

View File

@ -35,7 +35,7 @@ var (
fl_token = flag.String("token", os.Getenv("MANTIS_API_TOKEN"), "API-Token") fl_token = flag.String("token", os.Getenv("MANTIS_API_TOKEN"), "API-Token")
fl_port = flag.String("port", ":8080", "[ip]:port to serve") fl_port = flag.String("port", ":8080", "[ip]:port to serve")
fl_num = flag.Int("num", 250, "number of issues to retrieve at once") 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_freq = flag.Duration("fr", 30*time.Minute, "update frequency")
fl_proj = flag.Int("project", 23, "project id to use") fl_proj = flag.Int("project", 23, "project id to use")
fl_filter = flag.Int("filter", 229, "filter id to apply for search") fl_filter = flag.Int("filter", 229, "filter id to apply for search")

View File

@ -45,7 +45,7 @@ type Version struct {
Timestamp time.Time Timestamp time.Time
} }
type VersionsByDate []Version type VersionsByDate Versions
func (v VersionsByDate) Len() int { return len(v) } func (v VersionsByDate) Len() int { return len(v) }
func (v VersionsByDate) Less(i, j int) bool { return v[i].Timestamp.Before(v[j].Timestamp) } func (v VersionsByDate) Less(i, j int) bool { return v[i].Timestamp.Before(v[j].Timestamp) }