build(deps): bump github.com/gookit/config/v2 from 2.2.6 to 2.2.7
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.6 to 2.2.7. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.6...v2.2.7) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-version: 2.2.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
+8
@@ -202,6 +202,14 @@ func TypedKeys[K comdef.SimpleType, V any](mp map[K]V) (keys []K) {
|
||||
return
|
||||
}
|
||||
|
||||
// FirstKey returns the first key of the given map.
|
||||
func FirstKey[T any](mp map[string]T) string {
|
||||
for key := range mp {
|
||||
return key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Values get all values from the given map.
|
||||
func Values(mp any) (values []any) {
|
||||
rv := reflect.Indirect(reflect.ValueOf(mp))
|
||||
|
||||
Reference in New Issue
Block a user