Skip to content

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