Skip to content

Conversation

Doridian
Copy link

This does, despite how it looks, not change default behavior.

This addresses two concerns:

  • The CLI parameter's default being set to DefaultConfigName means the default logic was never run
  • The default logic had two drawbacks
    • It would actually run the *cfg = ... path on success, making it effectively useless
    • It could only load one file

It addresses this as follows:

  • Make the default config file name the empty string, allowing the defaulting logic to hit
  • Add a function which can take an arbitrary amount of config file names and yields the results of the first one that actually exists

All the go.mod and go.sum changes are from go mod tidy

@Doridian Doridian force-pushed the feat/config-handling branch from e92907c to 003a7ef Compare July 31, 2025 19:50
@Doridian Doridian force-pushed the feat/config-handling branch from 003a7ef to 0b65d04 Compare July 31, 2025 19:51
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.

1 participant