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

Fix NewConfig func & and add more unit tests #5

Merged
merged 3 commits into from
Jul 26, 2022

Conversation

mihaelabalutoiu
Copy link
Contributor

  • Fix NewConfig function
    • Move the default setting before validating the config, otherwise the code will
      never run. This happens because the Validate() function will always fail when
      config.Default.ConfigDir is empty.
  • Add unit tests for full coverage to the NewConfig function

Move the default setting before validating the config, otherwise the code will
never run. This happens because the `Validate()` function will always fail when
`config.Default.ConfigDir` is empty.
config/config_test.go Show resolved Hide resolved
config/config_test.go Outdated Show resolved Hide resolved
config/config_test.go Outdated Show resolved Hide resolved
config/config_test.go Show resolved Hide resolved
config/config_test.go Show resolved Hide resolved
config/config.go Show resolved Hide resolved
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.

None yet

2 participants