fix minimum required version glitch
This commit is contained in:
parent
7eb6abf250
commit
57285c12c1
1
data.go
1
data.go
@ -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"))
|
||||||
|
|
||||||
|
2
main.go
2
main.go
@ -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")
|
||||||
|
@ -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) }
|
||||||
|
Loading…
Reference in New Issue
Block a user