-
Notifications
You must be signed in to change notification settings - Fork 42
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ConfigFile
to make it symmetric withConfigAttributes
.Tests
This doesn't change functionality.
make test
passingmake fmt
applied