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

feat: custom key value separator #284

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

ruslan944
Copy link
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

env_test.go Outdated Show resolved Hide resolved
@caarlos0
Copy link
Owner

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

Couldn't think of a better name either.

@caarlos0
Copy link
Owner

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

thank you for the PR btw! 🤘

@codecov
Copy link

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
Contributor Author

Updates:

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

@caarlos0 caarlos0 merged commit 13ac655 into caarlos0:main Sep 29, 2023
12 checks passed
@caarlos0
Copy link
Owner

awesome, thank you!

@ruslan944 ruslan944 deleted the key-value-separator branch September 29, 2023 12:47
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.

None yet

2 participants