caarlos0 / env

A simple, zero-dependencies library to parse environment variables into structs
https://pkg.go.dev/github.com/caarlos0/env/v11
MIT License
4.91k stars 252 forks source link

Add functionality to change the map seperator #286

Closed dennis-dko closed 1 year ago

dennis-dko commented 1 year ago

In my case I want to use the map functionality in the env file with name and url as map[string]string like:

Example:http://example.com:9000

but I can't use this syntax because in the url the map seperator (":") will also used.

My idea is to change the map seperator like you did it with the env seperator.

Thank you for your work. 👍

caarlos0 commented 1 year ago

hey, this is already shipped on v10, look for envKeyValSeparator on readme.

Cheers!