From fc01e0e188bd175ef51fd329540654ddc6d53d0d Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Mon, 30 Sep 2024 12:27:57 +0800 Subject: [PATCH] enhance: Rename duplicated compaction task command Duplicated method name from different embed struct causing command failed to work Signed-off-by: Congqi Xia --- go.mod | 1 + states/etcd/remove/compaction_task.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index a38f4c2..4786a8a 100644 --- a/go.mod +++ b/go.mod @@ -121,6 +121,7 @@ require ( github.com/rs/xid v1.2.1 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect diff --git a/states/etcd/remove/compaction_task.go b/states/etcd/remove/compaction_task.go index cfa3bfd..980021c 100644 --- a/states/etcd/remove/compaction_task.go +++ b/states/etcd/remove/compaction_task.go @@ -20,8 +20,8 @@ type CompactionTaskParam struct { Run bool `name:"run" default:"false" desc:"flag to control actually run or dry"` } -// CompactionTaskCommand is the command function to remove compaction task. -func (c *ComponentRemove) CompactionTaskCommand(ctx context.Context, p *CompactionTaskParam) error { +// RemoveCompactionTaskCommand is the command function to remove compaction task. +func (c *ComponentRemove) RemoveCompactionTaskCommand(ctx context.Context, p *CompactionTaskParam) error { compactionTasks, err := common.ListCompactionTask(ctx, c.client, c.basePath, func(task *models.CompactionTask) bool { if p.CompactionType != task.GetType().String() { return false