Compare commits

..

No commits in common. "master" and "v0.0.5" have entirely different histories.

2 changed files with 7 additions and 8 deletions

View File

@ -42,17 +42,16 @@ func main() {
initLog(*debug) initLog(*debug)
// get allowed tasks // get allowed tasks
var allowedTasks *map[string]bool var allowedTasks map[string]bool
if os.Getenv("ALLOWED_TASKS") != "" { if os.Getenv("ALLOWED_TASKS") != "" {
at := make(map[string]bool, 0) allowedTasks = make(map[string]bool, 0)
allowedTasks = &at
for _, t := range strings.Split(os.Getenv("ALLOWED_TASKS"), ",") { for _, t := range strings.Split(os.Getenv("ALLOWED_TASKS"), ",") {
(*allowedTasks)[t] = true allowedTasks[t] = true
} }
} }
// manage tasks // manage tasks
taskList, err := tasks.LoadTasks(*configFile, allowedTasks) taskList, err := tasks.LoadTasks(*configFile, &allowedTasks)
if err != nil { if err != nil {
log.Fatalf("cannot load %s: %v", *configFile, err) log.Fatalf("cannot load %s: %v", *configFile, err)
return return

View File

@ -198,10 +198,10 @@ func (di *ConfigDescriptiveInfo) InitTasks(allowedTasksMap *map[string]bool) []e
} }
log.Infof( log.Infof(
"%d tasks loaded - enabled: '%s', disabled: '%s'", "%d tasks loaded - enabled: %s, disabled: %s",
len(di.Tasks), len(di.Tasks),
strings.TrimRight(strings.Join(taskNamesEnabled, ", "), ", "), strings.Join(taskNamesEnabled, ", "),
strings.TrimRight(strings.Join(taskNamesDisabled, ", "), ", "), strings.Join(taskNamesDisabled, ", "),
) )
return errList return errList