kratos icon indicating copy to clipboard operation
kratos copied to clipboard

feat(reader.go): reader支持配置的key本身含有点的情况

Open yzrzr opened this issue 2 years ago • 1 comments

Description (what this PR does / why we need it):

当配置文件中的key本身含有.分隔符时,无法正常获取配置,如:

users:
  james.smith:
    country: American
    age: 69

如上配置,目前使用users.james.smith还是users.james.smith.country都无法获取配置内容

Which issue(s) this PR fixes (resolves / be part of):

fixes/resolves ##2382

Other special notes for the reviewers:

yzrzr avatar Sep 21 '22 01:09 yzrzr

Codecov Report

Merging #2394 (3b9fbc4) into main (9737a3c) will decrease coverage by 0.07%. The diff coverage is 82.60%.

@@            Coverage Diff             @@
##             main    #2394      +/-   ##
==========================================
- Coverage   85.44%   85.37%   -0.08%     
==========================================
  Files          88       88              
  Lines        3780     3808      +28     
==========================================
+ Hits         3230     3251      +21     
- Misses        383      389       +6     
- Partials      167      168       +1     
Impacted Files Coverage Δ
config/reader.go 79.36% <82.60%> (-1.25%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Sep 21 '22 02:09 codecov-commenter