Add type to represent a loaded configuration file#349
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #349 +/- ##
==========================================
- Coverage 41.30% 41.30% -0.01%
==========================================
Files 49 49
Lines 2709 2736 +27
==========================================
+ Hits 1119 1130 +11
- Misses 1499 1515 +16
Partials 91 91
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
| // The function expands ~ to the user's home directory. | ||
| func LoadFile(path string) (*File, error) { | ||
| if path == "" { | ||
| path = "~/.databrickscfg" |
There was a problem hiding this comment.
Comment from @shreyas-goenka on another thread:
This not work for windows, can be added as a followup though
The permutation test shows that it does work, but I agree it looks weird.
Follow up: use filepath.Join here and check for prefix with os.PathSeparator.
nfx
left a comment
There was a problem hiding this comment.
lgtm, as long as integration tests are passing
|
Integration tests all pass. |
# Version changelog ## 0.6.0 * Added type to represent a loaded configuration file ([#349](#349)). * Added named `Wait` the level of services ([#348](#348)). * Pass `azure_client_id` to Azure MSI if specified ([#354](#354)). Dependency updates: * Bump google.golang.org/api from 0.112.0 to 0.114.0 ([#344](#344)).
Changes
Export type for a loaded configuration file such that downstream applications can read its contents in the same way the SDK does. Rename the loader instance to
ConfigFileto make it symmetric withConfigAttributes.Tests
This doesn't change functionality.
make testpassingmake fmtapplied