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 the external configdir library with the new os.UserConfigDir() #1162
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1162 +/- ##
==========================================
- Coverage 73.61% 73.59% -0.03%
==========================================
Files 144 145 +1
Lines 10529 10536 +7
==========================================
+ Hits 7751 7754 +3
- Misses 2321 2323 +2
- Partials 457 459 +2
Continue to review full report at Codecov.
|
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
In #1162 use new os.UserConfigDir to get user config directory, and it will panic when encounter an error. This is a backward in-compatible behavior and can lead to bad UX. This PR restore previous #1162 behavior. Instead of panic, we return a default value for config dir if we can figure out user config directory. Close #1176
In #1162 use new os.UserConfigDir to get user config directory, and it will panic when encounter an error. This is a backward in-compatible behavior and can lead to bad UX. This PR restore previous #1162 behavior. Instead of panic, we return a default value for config dir if we can figure out user config directory. Close #1176
In #1162 use new os.UserConfigDir to get user config directory, and it will panic when encounter an error. This is a backward in-compatible behavior and can lead to bad UX. This PR restore previous #1162 behavior. Instead of panic, we return a default value for config dir if we can figure out user config directory. Close #1176
In grafana#1162 use new os.UserConfigDir to get user config directory, and it will panic when encounter an error. This is a backward in-compatible behavior and can lead to bad UX. This PR restore previous grafana#1162 behavior. Instead of panic, we return a default value for config dir if we can figure out user config directory. Close grafana#1176
This fixes #940, but adds a reminder to come back and clean up the Go 1.12 code when Go 1.14 comes out (#1165)