Skip to content
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

replace env underscore to dot #1229

Merged
merged 2 commits into from
Jul 23, 2021
Merged

replace env underscore to dot #1229

merged 2 commits into from
Jul 23, 2021

Conversation

longXboy
Copy link
Member

@longXboy longXboy commented Jul 22, 2021

因为 . 在env里是非法字符,一般会用_来代替.的,所以需要替换回来
这样可以正确获取到 aa.bbb.ccc的value了

@longXboy longXboy requested a review from ymh199478 July 22, 2021 09:48
@Windfarer
Copy link
Member

lint没过,这里replace完是不是要赋值回去

@longXboy longXboy requested a review from tonybase July 22, 2021 11:06
@tonybase
Copy link
Member

感觉这里应该在env source里面处理的?

@longXboy
Copy link
Member Author

感觉这里应该在env source里面处理的?

是啊,现在就是env.go里处理的

@longXboy
Copy link
Member Author

感觉这里应该在env source里面处理的?

其实最好是统一在上层处理?上层应该告诉下层需要用什么来分割,并且这个分割符可以配置

@tonybase tonybase merged commit 38c9def into main Jul 23, 2021
@tonybase tonybase deleted the fix/replace_env_underscore branch July 23, 2021 14:38
tonybase added a commit that referenced this pull request Jul 23, 2021
tonybase added a commit that referenced this pull request Jul 23, 2021
elvizlai pushed a commit to elvizlai/kratos that referenced this pull request Aug 2, 2021
* replace env underscore to dot

* Compatible with dot format
elvizlai pushed a commit to elvizlai/kratos that referenced this pull request Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants