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

Env var settings #197

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

zorglube
Copy link
Contributor

@zorglube zorglube commented Mar 1, 2023

No description provided.

@zorglube zorglube force-pushed the env_var_settings branch 14 times, most recently from 02e32fc to 0d3914b Compare March 1, 2023 18:19
@zorglube
Copy link
Contributor Author

zorglube commented Mar 2, 2023

@zorchenhimer : For that PR, I have a question.

What is the overloading order you want for the parameter?

Right now, thanks to the go-args lib the order is : Default (if present) -> EnvVar -> Command Line -> settings.json (if I understood well.

Would you prefer to use the default capabilities of go-args and reduce, maybe remove, the settings.json

@zorchenhimer
Copy link
Owner

It should check in this order. If one isn't assigned, move to the next.

  1. Command Line
  2. Environment Var
  3. Settings File
  4. Default

@zorglube
Copy link
Contributor Author

zorglube commented Mar 7, 2023

Do you mean that : Command Line ovveride Environment Var ovveride Settings File ovveride Default ?

@zorchenhimer
Copy link
Owner

Yes.

@zorglube
Copy link
Contributor Author

zorglube commented Mar 7, 2023

Okay, for that beheave I'll have to refactor a lot of the params loading.

I'm on it.

@zorglube
Copy link
Contributor Author

zorglube commented Mar 7, 2023

@zorchenhimer : I guess you don't have anything against Object Oriented Style of programming ? I'll need/use that for the parameter loading.

@zorglube
Copy link
Contributor Author

@zorchenhimer : I'm not resigning on this, I'm just missing time nowadays.

@zorglube
Copy link
Contributor Author

They @zorchenhimer !

I's like to suggest, for the parameters of MovieNight, Command Line (With default value), env vars, and remove the settings.json.

With a loading and priority order like :

  1. Env vars
  2. Command line
  3. Default

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