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

chore: use koanf instead of viper to allow more possibility on configuration #160

Merged
merged 9 commits into from
Nov 19, 2023

Conversation

42atomys
Copy link
Owner

Describe the pull request
This pull request involves switching from the Viper library to the Koanf library in a Go application. The primary motivation behind this change is to enhance the application's configuration possibilities. Viper, although a comprehensive solution for configuration in Go applications, has some limitations, particularly its case-insensitive behavior and a large number of hardcoded dependencies, which result in a bigger binary size compared to Koanf. For instance, a simple program using Viper is significantly larger (about 313%) than its Koanf equivalent

Checklist

  • I have linked the relative issue to this pull request
  • I have made the modifications or added tests related to my PR
  • I have added/updated the documentation for my RP
  • I put my PR in Ready for Review only when all the checklist is checked

Additional context
This switch to Koanf aims to reduce the application's binary size and dependency footprint while maintaining or enhancing configuration capabilities. The choice between Viper and Koanf largely depends on the specific needs and constraints of the application in question.

Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (94e2ebf) 94.49% compared to head (df2b90f) 94.11%.
Report is 7 commits behind head on main.

Files Patch % Lines
internal/config/configuration.go 76.66% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
- Coverage   94.49%   94.11%   -0.39%     
==========================================
  Files          22       22              
  Lines        1363     1393      +30     
==========================================
+ Hits         1288     1311      +23     
- Misses         51       56       +5     
- Partials       24       26       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@42atomys 42atomys merged commit 828953d into main Nov 19, 2023
@42atomys 42atomys deleted the chore/remove-viper branch November 19, 2023 13:40
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