We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func Decode(data []byte) (res map[string]interface{}, err error) { res = make(map[string]interface{}) pr, err := properties.Load(data, properties.UTF8) if err != nil || pr == nil { err = gerror.Wrapf(err, `Lib magiconair load Properties data failed.`) return nil, err } for _, key := range pr.Keys() { // ignore existence check: we know it's there value, _ := pr.Get(key) // recursively build nested maps path := strings.Split(key, ".") lastKey := strings.ToLower(path[len(path)-1]) deepestMap := deepSearch(res, path[0:len(path)-1]) // set innermost value deepestMap[lastKey] = value } return res, nil }
this let gproperties type config can't get right value of camel-case key。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
this let gproperties type config can't get right value of camel-case key。
The text was updated successfully, but these errors were encountered: