This commit is contained in:
parent
dd23da80ee
commit
6a28cf96a8
2
main.go
2
main.go
@ -110,7 +110,7 @@ func NewSetFrom(l []string) Set {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
/// FilterJobs filters a list of jobs by a list of names
|
// FilterJobs filters a list of jobs by a list of names.
|
||||||
func FilterJobs(jobs []Job, names []string) ([]Job, error) {
|
func FilterJobs(jobs []Job, names []string) ([]Job, error) {
|
||||||
nameSet := NewSetFrom(names)
|
nameSet := NewSetFrom(names)
|
||||||
if nameSet.Contains("all") {
|
if nameSet.Contains("all") {
|
||||||
|
@ -69,7 +69,7 @@ func RunHTTPHandlers(addr string) error {
|
|||||||
http.HandleFunc("/health", healthHandleFunc)
|
http.HandleFunc("/health", healthHandleFunc)
|
||||||
http.Handle("/metrics", promhttp.Handler())
|
http.Handle("/metrics", promhttp.Handler())
|
||||||
|
|
||||||
return fmt.Errorf("error on healthcheck: %w", http.ListenAndServe(addr, nil))
|
return fmt.Errorf("error on healthcheck: %w", http.ListenAndServe(addr, nil)) //#nosec: g114
|
||||||
}
|
}
|
||||||
|
|
||||||
func ScheduleAndRunJobs(jobs []Job) error {
|
func ScheduleAndRunJobs(jobs []Job) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user