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

Support multiple config file types #172

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rappizs
Copy link
Contributor

@rappizs rappizs commented Aug 15, 2023

Fixes #35

Dev notes

Why copied the encoding package instead of using Viper's Write methods? Unfortunately those methods have some problems and they are not reliable (A Viper contributor told me not to use them). They will be removed from Viper and after some discussion I decided to reuse their code. They also told me that the encoding package will be a separate project eventually, so as soon as that happens we can replace our encoding package with that.

@rappizs rappizs requested a review from a team as a code owner August 15, 2023 14:26
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #172 (1728445) into main (ee1bd0b) will increase coverage by 4.03%.
The diff coverage is 24.63%.

❗ Current head 1728445 differs from pull request most recent head e368b40. Consider uploading reports for the commit e368b40 to get more accurate results

@@           Coverage Diff            @@
##            main    #172      +/-   ##
========================================
+ Coverage   0.00%   4.03%   +4.03%     
========================================
  Files          1       5       +4     
  Lines         67     421     +354     
========================================
+ Hits           0      17      +17     
- Misses        67     401     +334     
- Partials       0       3       +3     
Files Changed Coverage Δ
internal/config/config.go 2.38% <15.68%> (ø)
internal/encoding/json/codec.go 50.00% <50.00%> (ø)
internal/encoding/toml/codec.go 50.00% <50.00%> (ø)
internal/encoding/yaml/codec.go 50.00% <50.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rappizs rappizs changed the title Support multiple config file types DRAFT: Support multiple config file types Aug 15, 2023
@rappizs rappizs marked this pull request as draft August 17, 2023 10:53
@rappizs rappizs changed the title DRAFT: Support multiple config file types Support multiple config file types Aug 17, 2023
@rappizs rappizs force-pushed the config-type-support branch 3 times, most recently from 8109cca to ae10b6e Compare August 18, 2023 10:30
@rappizs rappizs marked this pull request as ready for review August 18, 2023 10:37
@rappizs rappizs force-pushed the config-type-support branch 3 times, most recently from 8a23efb to 3e8e095 Compare August 18, 2023 14:12
Copy link
Contributor

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch conflict needs to be 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.

Support config format other than JSON
2 participants