[skip ci] Fix golint error in datanode (#9282)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/9286/head
zhenshan.cao 2021-10-05 20:56:06 +08:00 committed by GitHub
parent a7a7941458
commit cbbdbc699c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -24,9 +24,12 @@ import (
"go.uber.org/zap"
)
// 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
@ -41,6 +44,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()