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

Save configuration data to local configuration file #12

Closed
ricardobalk opened this issue Oct 6, 2020 · 3 comments
Closed

Save configuration data to local configuration file #12

ricardobalk opened this issue Oct 6, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Good issue for Hacktoberfest participants hacktoberfest-medium Good issue for Hacktoberfest participants, medium difficulty
Milestone

Comments

@ricardobalk
Copy link
Member

The app should get a functionality to save and retrieve configuration data from a local file, for example, settings.json. This way, it doesn't always have to rely on command-line flags.

The functionality should be added to internal/settings/settings.go.

It should...

  • Look in the user's home folder, i.e. ~/.go-osmand-tracker/settings.json
  • Look in the folder where the app has been started (current working directory)
  • ... or use default values and write them to the current working directory

It should not...

  • Crash because the settings file(s) did not exist
  • Crash because a settings file is invalid

Bonus points for...

  • If the user's personal settings.json overrules and/or extends the rules in the current working directory. (a.k.a. local settings over global settings)
@ricardobalk ricardobalk added enhancement New feature or request good first issue Good for newcomers hacktoberfest Good issue for Hacktoberfest participants labels Oct 6, 2020
@ricardobalk ricardobalk added this to the 1.1.0 milestone Oct 6, 2020
@ricardobalk ricardobalk added this to To do in Code maintenance via automation Oct 6, 2020
@ricardobalk ricardobalk added the hacktoberfest-medium Good issue for Hacktoberfest participants, medium difficulty label Oct 6, 2020
@moogacs
Copy link
Contributor

moogacs commented Oct 11, 2020

@ricardobalk, by settings.json you mean , server configurations ! ip:port and so on !

@ricardobalk
Copy link
Member Author

@ricardobalk, by settings.json you mean , server configurations ! ip:port and so on !

Yes @moogacs, basically everything that could be set with the CLI flags should be saved/loaded to/from the settings.json file.

@moogacs
Copy link
Contributor

moogacs commented Oct 11, 2020

I will pick that one

@ricardobalk ricardobalk moved this from To do to In progress in Code maintenance Oct 13, 2020
moogacs referenced this issue in moogacs/go-osmand-tracker Oct 18, 2020
Code maintenance automation moved this from In progress to Done Oct 21, 2020
@ricardobalk ricardobalk added hacktoberfest-accepted Accepted for Hacktoberfest and removed hacktoberfest-accepted Accepted for Hacktoberfest labels Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Good issue for Hacktoberfest participants hacktoberfest-medium Good issue for Hacktoberfest participants, medium difficulty
Projects
Development

No branches or pull requests

2 participants