New issue
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
LoadFromDir 返回类型 #173
Labels
Comments
能具体描述下吗? |
嗯,现在是返回map[string]any, 能否返回数组,多个文件组成一个大数组。 |
这样就完全没法取指定文件的配置了,跟平常的用法有点区别了。 |
嗯,能否返回的时候做处理。 |
config 底层的 data 始终需要一个 key 存数据
LoadFromDir(dirPath, format string, dataKey string)
decode 数据:var data []*Data
config.MapStruct("somekey", &data) |
inhere
added a commit
that referenced
this issue
Jan 12, 2024
- if set DataKey, will load all dir files data as Slice data
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
返回的是map[string]*Data,不是[]*Data
The text was updated successfully, but these errors were encountered: