diff --git a/pkg/config/assemble_test.go b/pkg/config/assemble_test.go index 48064ea..460d170 100644 --- a/pkg/config/assemble_test.go +++ b/pkg/config/assemble_test.go @@ -150,7 +150,7 @@ tasks: t.Error("Got error during assemble readfile ", err) } else { actStr = configAssembler.assemble(contents) - if bytes.Compare(actStr, expStr) != 0 { + if !bytes.Equal(actStr, expStr) { t.Error("Expected:\n>>>", string(expStr), "<<< Got:\n>>>", string(actStr), "<<<") } } diff --git a/pkg/runtime/executor.go b/pkg/runtime/executor.go index 2310bc4..b449c49 100644 --- a/pkg/runtime/executor.go +++ b/pkg/runtime/executor.go @@ -38,12 +38,12 @@ func newExecutorStats() *TaskStatistics { func newExecutor(cfg *config.Config) *Executor { executor := &Executor{ - Environment: make(map[string]string, 0), + Environment: make(map[string]string), eventHandlers: make([]EventHandler, 0), config: cfg, Tasks: make([]*Task, 0), Statistics: newExecutorStats(), - cmdEtaCache: make(map[string]time.Duration, 0), + cmdEtaCache: make(map[string]time.Duration), } for _, taskConfig := range cfg.TaskConfigs { diff --git a/pkg/runtime/handler/compressed_ui.go b/pkg/runtime/handler/compressed_ui.go index 9e15091..9090ebf 100644 --- a/pkg/runtime/handler/compressed_ui.go +++ b/pkg/runtime/handler/compressed_ui.go @@ -30,7 +30,7 @@ type CompressedUI struct { func NewCompressedUI(config *config.Config) *CompressedUI { handler := &CompressedUI{ - data: make(map[uuid.UUID]*cUiData, 0), + data: make(map[uuid.UUID]*cUiData), startTime: time.Now(), frame: jotframe.NewFixedFrame(1, false, false, false), config: config, diff --git a/pkg/runtime/handler/task_logger.go b/pkg/runtime/handler/task_logger.go index 3193b19..33b51e6 100644 --- a/pkg/runtime/handler/task_logger.go +++ b/pkg/runtime/handler/task_logger.go @@ -35,7 +35,7 @@ func NewTaskLogger(config *config.Config) *TaskLogger { } return &TaskLogger{ - logs: make(map[uuid.UUID]*bufferedLog, 0), + logs: make(map[uuid.UUID]*bufferedLog), config: config, } } diff --git a/pkg/runtime/handler/vertical_ui.go b/pkg/runtime/handler/vertical_ui.go index cac385f..18a0a01 100644 --- a/pkg/runtime/handler/vertical_ui.go +++ b/pkg/runtime/handler/vertical_ui.go @@ -99,7 +99,7 @@ func NewVerticalUI(cfg *config.Config) *VerticalUI { } handler := &VerticalUI{ - data: make(map[uuid.UUID]*display, 0), + data: make(map[uuid.UUID]*display), spinner: spin.New(), ticker: time.NewTicker(updateInterval), startTime: time.Now(),