Skip to content
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

Use os.UserConfigDir for internal.ConfigDir if available #103

Merged
merged 1 commit into from
May 14, 2020

Conversation

tklauser
Copy link
Collaborator

On Go ≥ 1.13 the os package has os.ConfigDir
(https://golang.org/pkg/os/#UserConfigDir) which returns the default
root directory to use for user-specific configuration data. Use this in
internal.ConfigDir if available, while still making sure that any
directory specified in GOPS_CONFIG_DIR takes precedence.

On Go ≥ 1.13 the os package has os.ConfigDir
(https://golang.org/pkg/os/#UserConfigDir) which returns the default
root directory to use for user-specific configuration data. Use this in
internal.ConfigDir if available, while still making sure that any
directory specified in GOPS_CONFIG_DIR takes precedence.
@rakyll
Copy link
Member

rakyll commented May 11, 2020

Thanks!

@tklauser
Copy link
Collaborator Author

Not sure why the required circleci check still has status Expected, it seems to have been successful though: https://circleci.com/gh/google/gops/127

@tklauser tklauser merged commit ed67c5b into google:master May 14, 2020
@tklauser tklauser deleted the user-os-userconfigdir branch May 14, 2020 20:01
tklauser added a commit that referenced this pull request May 29, 2020
Use a subdirectory of the directory returned by os.UserConfigDir instead
of the UserConfigDir directly. This was missed in #103. Also add a test.

Based on a change by @42wim submitted in #107
tklauser added a commit that referenced this pull request May 30, 2020
Use a subdirectory of the directory returned by os.UserConfigDir instead
of the UserConfigDir directly. This was missed in #103. Also add a test.

Based on a change by @42wim submitted in #107
tklauser added a commit that referenced this pull request Jun 24, 2022
We bumped the minimum Go version to 1.13 in #169. THus, we can drop the
fallback for Go ≤ 1.13 added in #103.
tklauser added a commit that referenced this pull request Jun 24, 2022
We bumped the minimum Go version to 1.13 in #169, thus we can drop the
fallback for Go ≤ 1.13 added in #103.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants