[skip ci] Fix golint error in proxy (#9188)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
zhenshan.cao 2021-10-04 17:20:49 +08:00 committed by GitHub
parent 3c98adfe41
commit 2d3824e6e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,8 @@ import (
"github.com/milvus-io/milvus/internal/util/paramtable" "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 { type ParamTable struct {
paramtable.BaseTable paramtable.BaseTable
@ -29,9 +31,12 @@ type ParamTable struct {
ClientMaxRecvSize int ClientMaxRecvSize int
} }
// Params is a package scoped variable of type ParamTable.
var Params ParamTable var Params ParamTable
var once sync.Once 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() { func (pt *ParamTable) Init() {
once.Do(func() { once.Do(func() {
pt.BaseTable.Init() pt.BaseTable.Init()