mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 09:44:17 +02:00
satisfy full linter
This commit is contained in:
@@ -30,7 +30,6 @@ import (
|
||||
func TaskList(conf *cfg.Config) error {
|
||||
res, err := conf.DefaultCluster.ES().Cat.Tasks().
|
||||
Do(context.Background())
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get index templates: %w", esErrorString(err))
|
||||
}
|
||||
@@ -39,6 +38,7 @@ func TaskList(conf *cfg.Config) error {
|
||||
|
||||
table := printer.NewTable(conf, 8, len(res))
|
||||
table.Addheaders("task id", "action", "start time", "run time", "node", "type")
|
||||
|
||||
for idx, task := range res {
|
||||
var ts time.Time
|
||||
|
||||
@@ -66,7 +66,6 @@ func TaskCancel(conf *cfg.Config, taskid string) error {
|
||||
_, err := conf.DefaultCluster.ES().Tasks.Cancel().
|
||||
TaskId(taskid).
|
||||
Do(context.Background())
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to cancel task: %w", esErrorString(err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user