[skip ci] Add comment for basetable (#12694)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/12503/head
shaoyue 2021-12-03 17:09:43 +08:00 committed by GitHub
parent 2ec8f1fa24
commit c77ed0417f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -234,14 +234,17 @@ func (gp *BaseTable) tryloadFromEnv() {
}
}
// Load loads an object with @key.
func (gp *BaseTable) Load(key string) (string, error) {
return gp.params.Load(strings.ToLower(key))
}
// LoadWithDefault loads an object with @key. If the object does not exist, @defaultValue will be returned.
func (gp *BaseTable) LoadWithDefault(key, defaultValue string) string {
return gp.params.LoadWithDefault(strings.ToLower(key), defaultValue)
}
// LoadRange loads objects with range @startKey to @endKey with @limit number of objects.
func (gp *BaseTable) LoadRange(key, endKey string, limit int) ([]string, []string, error) {
return gp.params.LoadRange(strings.ToLower(key), strings.ToLower(endKey), limit)
}