From e64b18ccd0306d16fef9448d4d47b41e5506b3c3 Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Mon, 4 Oct 2021 13:22:42 +0800 Subject: [PATCH] [skip ci] Fix golint error in datacoord (#9192) Signed-off-by: zhenshan.cao --- internal/distributed/datacoord/param_table.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/distributed/datacoord/param_table.go b/internal/distributed/datacoord/param_table.go index 7b1d135ad9..534398f2be 100644 --- a/internal/distributed/datacoord/param_table.go +++ b/internal/distributed/datacoord/param_table.go @@ -22,6 +22,8 @@ import ( "github.com/milvus-io/milvus/internal/util/paramtable" ) +// ParamTable is a derived struct of paramtable.BaseTable. It achieves Composition by +// embedding paramtable.BaseTable. It is used to quickly and easily access the system configuration. type ParamTable struct { paramtable.BaseTable @@ -33,15 +35,18 @@ type ParamTable struct { ServerMaxRecvSize int } +// Params is a package scoped variable of type ParamTable. var Params ParamTable var once sync.Once +// Init is an override method of BaseTable's Init. It mainly calls the +// Init of BaseTable and do some other initialization. func (pt *ParamTable) Init() { once.Do(func() { pt.BaseTable.Init() pt.initPort() pt.initParams() - pt.LoadFromEnv() + pt.loadFromEnv() pt.initServerMaxSendSize() pt.initServerMaxRecvSize() @@ -53,7 +58,7 @@ func (pt *ParamTable) initParams() { pt.initDataCoordAddress() } -func (pt *ParamTable) LoadFromEnv() { +func (pt *ParamTable) loadFromEnv() { }