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

Change custom unmarshaling order #59

Merged
merged 1 commit into from Jun 9, 2022
Merged

Commits on Jun 9, 2022

  1. Change custom unmarshaling order

    Since the input parsed by envconfig is most often configuration written
    by humans, it makes sense to test unmarshaling as text before any other
    formats. Also JSON should be more common than binary, so this commits
    sets the order to:
    1. envconfig.Decoder
    2. encoding.TextUnmarshaler
    3. json.Unmarshaler
    4. encoding.BinaryUnmarshaler
    5. gob.GobDecoder
    
    and adds tests to very that order. Closes sethvargo#58.
    gust1n committed Jun 9, 2022
    Copy the full SHA
    683dd0a View commit details
    Browse the repository at this point in the history