docs/core/gcfg-funcs #244
Replies: 1 comment
-
|
GetWithEnv的介绍中说“参数名称中会将名称转换为小写,名称中的 _ 字符转换为 . 字符。”,但实际上第一次去配置文件中获取参数时,并没有转换操作,如果我使用GetWithEnv(ctx,"APP_DATA"),预期是能获取到配置文件中的"app.data",但实际上只会匹配到"APP_DATA"。如果要实现预期目标,则需要使用GetWithEnv(ctx,"app.data"),如果配置文件中不存在,才会转换后,去获取APP_DATA的环境变量。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
docs/core/gcfg-funcs
GoFrame框架中的配置管理常用方法,包括如何从环境变量及命令行获取配置数据,Data方法用于获取和组装配置数据,以及配置适配器的使用。通过示例代码,帮助开发者更好地掌握配置管理相关的技术要点。
https://goframe.org/docs/core/gcfg-funcs
Beta Was this translation helpful? Give feedback.
All reactions