bugfix: beegoAppConfig String and Strings function has bug

This commit is contained in:
Stone-afk 2023-05-27 14:34:22 +08:00 committed by Ming Deng
parent bbe1e4c112
commit 4f4cf565f0
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@
- [Fix 5079: Split signalChan into flushChan and closeChan](https://github.com/beego/beego/pull/5139)
- [Fix 5172: protect field access with lock to avoid possible data race](https://github.com/beego/beego/pull/5210)
- [cache: fix typo and optimize the naming]()
- [Fix 5176: beegoAppConfig String and Strings function has bug](https://github.com/beego/beego/pull/5211)
# v2.0.7
- [Upgrade github.com/go-kit/kit, CVE-2022-24450](https://github.com/beego/beego/pull/5121)

View File

@ -87,7 +87,7 @@ func (b *beegoAppConfig) String(key string) string {
}
func (b *beegoAppConfig) Strings(key string) []string {
if v, err := b.innerConfig.Strings(BConfig.RunMode + "::" + key); len(v) > 0 && err != nil {
if v, err := b.innerConfig.Strings(BConfig.RunMode + "::" + key); len(v) > 0 && err == nil {
return v
}
res, _ := b.innerConfig.Strings(key)