Skip to content

Maps configuration with value including colon character #180

@vipermind

Description

@vipermind

Hi
The envconfig library is amazing. However, I've run into an issue where I cannot configure map of strings (map[string]string) where value contains colon character.

Basically I am trying to keep a map of URLs like dev:https://foo.com,prod:https://bar.com.

Configuration structure is as follows:

type Config struct {
	Schedule string
	Port     int
	User     string
	Passwd   string
	Urls     map[string]string
}

After calling envconfig.Process the Urls property is empty. If I remove ':' from values, it works perfectly fine.
Is there any workaround to that problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions