From 267fbe74e62a376fcfcf63a1e7245e6e8f634151 Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Mon, 4 Oct 2021 17:22:41 +0800 Subject: [PATCH] [skip ci] Fix golint error in querycoord (#9189) Signed-off-by: zhenshan.cao --- internal/distributed/querycoord/param_table.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/distributed/querycoord/param_table.go b/internal/distributed/querycoord/param_table.go index c34a703112..416ad28a13 100644 --- a/internal/distributed/querycoord/param_table.go +++ b/internal/distributed/querycoord/param_table.go @@ -22,9 +22,12 @@ import ( "github.com/milvus-io/milvus/internal/util/paramtable" ) +// Params is a package scoped variable of type ParamTable. var Params ParamTable var once sync.Once +// 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 Port int @@ -36,6 +39,8 @@ type ParamTable struct { ServerMaxRecvSize int } +// 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()