From dd24ea3737790e37a43fef69a79bbf44639da15c Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Mon, 18 Oct 2021 21:36:39 +0800 Subject: [PATCH] [skip ci]Fix golint error in querynode (#10136) Signed-off-by: zhenshan.cao --- internal/querynode/param_table.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/querynode/param_table.go b/internal/querynode/param_table.go index 7738cbc889..c27af995f0 100644 --- a/internal/querynode/param_table.go +++ b/internal/querynode/param_table.go @@ -24,6 +24,7 @@ import ( "github.com/milvus-io/milvus/internal/util/paramtable" ) +// ParamTable is used to record configuration items. type ParamTable struct { paramtable.BaseTable @@ -82,19 +83,23 @@ type ParamTable struct { UpdatedTime time.Time } +// Params is a package scoped variable of type ParamTable. var Params ParamTable var once sync.Once +// InitAlias initializes an alias for the QueryNode role. func (p *ParamTable) InitAlias(alias string) { p.Alias = alias } +// InitOnce is used to initialize configuration items, and it will only be called once. func (p *ParamTable) InitOnce() { once.Do(func() { p.Init() }) } +// Init is used to initialize configuration items. func (p *ParamTable) Init() { p.BaseTable.Init() if err := p.LoadYaml("advanced/query_node.yaml"); err != nil {