build(deps): bump github.com/gookit/config/v2 from 2.2.5 to 2.2.6

Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/gookit/config/releases)
- [Commits](https://github.com/gookit/config/compare/v2.2.5...v2.2.6)

---
updated-dependencies:
- dependency-name: github.com/gookit/config/v2
  dependency-version: 2.2.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-04-29 14:15:29 +00:00
committed by GitHub
parent a97f5e4c2e
commit 452d40dad7
61 changed files with 1037 additions and 365 deletions
+11 -3
View File
@@ -134,20 +134,28 @@ func Getenv(name string, defVal ...string) (val string) {
return
}
func parseVarNameAndType(key string) (string, string) {
func parseVarNameAndType(key string) (string, string, string) {
var desc string
typ := "string"
key = strings.Trim(key, "-")
// can set var type: int, uint, bool
if strings.IndexByte(key, ':') > 0 {
list := strings.SplitN(key, ":", 2)
list := strings.SplitN(key, ":", 3)
key, typ = list[0], list[1]
if len(list) == 3 {
desc = list[2]
}
// if type is not valid and has multi words, as desc message.
if _, ok := validTypes[typ]; !ok {
if desc == "" && strings.ContainsRune(typ, ' ') {
desc = typ
}
typ = "string"
}
}
return key, typ
return key, typ, desc
}
// format key