From 29e9adc7be707fb262787bc52ce39c38f43a812d Mon Sep 17 00:00:00 2001
From: Cai Yudong <yudong.cai@zilliz.com>
Date: Tue, 16 Nov 2021 14:27:11 +0800
Subject: [PATCH] Fix golint warnings for rootcoord (#11872)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
---
 internal/rootcoord/task.go         | 8 ++++----
 internal/rootcoord/timeticksync.go | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/internal/rootcoord/task.go b/internal/rootcoord/task.go
index 6aad7bfb5f..3cb8c90212 100644
--- a/internal/rootcoord/task.go
+++ b/internal/rootcoord/task.go
@@ -192,7 +192,7 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error {
 	ddCollReq.Base.Timestamp = ts
 	ddOpStr, err := EncodeDdOperation(&ddCollReq, CreateCollectionDDType)
 	if err != nil {
-		return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
+		return fmt.Errorf("encodeDdOperation fail, error = %w", err)
 	}
 
 	// use lambda function here to guarantee all resources to be released
@@ -293,7 +293,7 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error {
 	ddReq.Base.Timestamp = ts
 	ddOpStr, err := EncodeDdOperation(&ddReq, DropCollectionDDType)
 	if err != nil {
-		return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
+		return fmt.Errorf("encodeDdOperation fail, error = %w", err)
 	}
 
 	aliases := t.core.MetaTable.ListAliases(collMeta.ID)
@@ -533,7 +533,7 @@ func (t *CreatePartitionReqTask) Execute(ctx context.Context) error {
 	ddReq.Base.Timestamp = ts
 	ddOpStr, err := EncodeDdOperation(&ddReq, CreatePartitionDDType)
 	if err != nil {
-		return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
+		return fmt.Errorf("encodeDdOperation fail, error = %w", err)
 	}
 
 	// use lambda function here to guarantee all resources to be released
@@ -629,7 +629,7 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error {
 	ddReq.Base.Timestamp = ts
 	ddOpStr, err := EncodeDdOperation(&ddReq, DropPartitionDDType)
 	if err != nil {
-		return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
+		return fmt.Errorf("encodeDdOperation fail, error = %w", err)
 	}
 
 	// use lambda function here to guarantee all resources to be released
diff --git a/internal/rootcoord/timeticksync.go b/internal/rootcoord/timeticksync.go
index bc021775f7..7da158c40c 100644
--- a/internal/rootcoord/timeticksync.go
+++ b/internal/rootcoord/timeticksync.go
@@ -151,12 +151,12 @@ func (t *timetickSync) UpdateTimeTick(in *internalpb.ChannelTimeTickMsg, reason
 		return nil
 	}
 	if len(in.Timestamps) != len(in.ChannelNames) {
-		return fmt.Errorf("Invalid TimeTickMsg")
+		return fmt.Errorf("invalid TimeTickMsg")
 	}
 
 	prev, ok := t.proxyTimeTick[in.Base.SourceID]
 	if !ok {
-		return fmt.Errorf("Skip ChannelTimeTickMsg from un-recognized proxy node %d", in.Base.SourceID)
+		return fmt.Errorf("skip ChannelTimeTickMsg from un-recognized proxy node %d", in.Base.SourceID)
 	}
 
 	// if ddl operation not finished, skip current ts update