[skip ci]Fix golint error in paramtable (#9851)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/9867/head
zhenshan.cao 2021-10-14 14:04:34 +08:00 committed by GitHub
parent 9eacfe719a
commit bbafd05911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -21,9 +21,12 @@ import (
"github.com/milvus-io/milvus/internal/log"
)
// Params is a package scoped variable of type BaseParamTable.
var Params BaseParamTable
var once sync.Once
// BaseParamTable is a derived struct of BaseTable. It achieves Composition by
// embedding BaseTable. It is used to quickly and easily access the system configuration.
type BaseParamTable struct {
BaseTable
@ -42,6 +45,8 @@ type BaseParamTable struct {
LogConfig *log.Config
}
// Init is an override method of BaseTable's Init. It mainly calls the
// Init of BaseTable and do some other initialization.
func (p *BaseParamTable) Init() {
p.initOnce.Do(func() {
p.BaseTable.Init()