You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As mentioned in #6459 (comment), there is a current test pattern for specifying config files of the form:
This invocation is slightly problematic for two reasons:
the initial "." is unnecessary.
path.Join() hardcodes the separator as "/" instead of picking it up from the os like filepath.Join() does, which is used by the underlying koanf loader.
Describe the solution you'd like
Replace all path.Join(".", with filepath.Join(
Describe alternatives you've considered
Using embed could be preferable to using paths and loaders overall since the underlying byte slice would be available in the packages. I have superficially confirmed that embedded items in test functions don't make their way to the final build using hexdump, but a more rigorous assessment would be necessary. Since the existing helper works with paths and uses* the config map loaders, requiring embed directives as replacements and using bytes directly is probably overkill for most cases.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
As mentioned in #6459 (comment), there is a current test pattern for specifying config files of the form:
This invocation is slightly problematic for two reasons:
path.Join()
hardcodes the separator as "/" instead of picking it up from the os likefilepath.Join()
does, which is used by the underlying koanf loader.Describe the solution you'd like
Replace all
path.Join(".",
withfilepath.Join(
Describe alternatives you've considered
Using embed could be preferable to using paths and loaders overall since the underlying byte slice would be available in the packages. I have superficially confirmed that embedded items in test functions don't make their way to the final build using hexdump, but a more rigorous assessment would be necessary. Since the existing helper works with paths and uses* the config map loaders, requiring embed directives as replacements and using bytes directly is probably overkill for most cases.
The text was updated successfully, but these errors were encountered: