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)
// get allowed tasks
var allowedTasks *map[string]bool
var allowedTasks map[string]bool
if os.Getenv("ALLOWED_TASKS") != "" {
at := make(map[string]bool, 0)
allowedTasks = &at
allowedTasks = make(map[string]bool, 0)
for _, t := range strings.Split(os.Getenv("ALLOWED_TASKS"), ",") {
(*allowedTasks)[t] = true
allowedTasks[t] = true
}
}
// manage tasks
taskList, err := tasks.LoadTasks(*configFile, allowedTasks)
taskList, err := tasks.LoadTasks(*configFile, &allowedTasks)
if err != nil {
log.Fatalf("cannot load %s: %v", *configFile, err)
return

View File

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