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

Remove or replace the configdir library #940

Closed
na-- opened this issue Mar 6, 2019 · 2 comments · Fixed by #1162
Closed

Remove or replace the configdir library #940

na-- opened this issue Mar 6, 2019 · 2 comments · Fixed by #1162

Comments

@na--
Copy link
Member

na-- commented Mar 6, 2019

We currently use https://github.com/shibukawa/configdir to get the user level configuration folder (e.g. ~/.config/loadimpact/k6) in a cross-platform way. But it's a somewhat poor fit, and since it directly manipulates files via the os package, it's not compatible with https://github.com/spf13/afero and we can't use the majority of its functions directly in any testable way.

So as part of #935, I've mostly refactored it away, and we use it in only a single place to get the default location for the config.json file. So we can either replace it with something else, or we can easily write our own version in a few lines (basically, we only need to replicate globalSettingFolder from that library).

@na--
Copy link
Member Author

na-- commented Jun 7, 2019

Seems like we just have to wait for Go 1.13 for this: golang/go#29960

@na--
Copy link
Member Author

na-- commented Sep 9, 2019

https://golang.org/pkg/os/#UserConfigDir

@na-- na-- added this to the v0.26.0 milestone Sep 9, 2019
@cuonglm cuonglm self-assigned this Sep 17, 2019
cuonglm added a commit that referenced this issue Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants