Skip to content

feat: custom key value separator#284

Merged
caarlos0 merged 3 commits intocaarlos0:mainfrom
ruslan944:key-value-separator
Sep 29, 2023
Merged

feat: custom key value separator#284
caarlos0 merged 3 commits intocaarlos0:mainfrom
ruslan944:key-value-separator

Conversation

@ruslan944
Copy link
Copy Markdown
Contributor

We have use cases, when we would use ":" as a map value. For example,in the case of "default:http://example.com/," this functionality is currently unavailable due to the ":" character being reserved as a separator between keys and values. This pull request solves the problem.

If you have any suggestions for a more suitable name instead of envKeyValSeparator, please feel free to share

@caarlos0
Copy link
Copy Markdown
Owner

small comment on the test, other than that looks good to me.

Couldn't think of a better name either.

@caarlos0
Copy link
Copy Markdown
Owner

oh, if possible, can you update the readme, too?

thank you for the PR btw! 🤘

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (6723663) 100.00% compared to head (7a141d5) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #284   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          460       464    +4     
=========================================
+ Hits           460       464    +4     
Files Coverage Δ
env.go 100.00% <100.00%> (ø)

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

Separate test for key value separator
@ruslan944
Copy link
Copy Markdown
Contributor Author

Updates:

  1. Review fix for unit tests
  2. Updated README.md

@ruslan944 ruslan944 requested a review from caarlos0 September 28, 2023 16:04
@caarlos0 caarlos0 merged commit 13ac655 into caarlos0:main Sep 29, 2023
@caarlos0
Copy link
Copy Markdown
Owner

awesome, thank you!

@ruslan944 ruslan944 deleted the key-value-separator branch September 29, 2023 12:47
BorzdeG pushed a commit to BorzdeG/env that referenced this pull request Aug 24, 2024
* feat: custom key value separator

* feat: custom key value separator

Separate test for key value separator

* feat: custom key value separator

Update README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants