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

toml.Unmarshaler supports leaf nodes #444

Merged
merged 2 commits into from
Sep 13, 2020
Merged

toml.Unmarshaler supports leaf nodes #444

merged 2 commits into from
Sep 13, 2020

Conversation

pelletier
Copy link
Owner

Fixes #437

@codecov
Copy link

codecov bot commented Sep 12, 2020

Codecov Report

Merging #444 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #444      +/-   ##
==========================================
+ Coverage   93.90%   93.91%   +0.01%     
==========================================
  Files          10       10              
  Lines        2443     2448       +5     
==========================================
+ Hits         2294     2299       +5     
  Misses        108      108              
  Partials       41       41              
Impacted Files Coverage Δ
marshal.go 96.32% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7448fe...dcc96fe. Read the comment docs.

t.Fatalf("unexpected errors %s", err)
}
expected := durationString{10 * time.Second}
if cfg.HTTP.PingTimeout != expected {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelletier I recommend you to take a look at github.com/stretchr/testify package.

It contains a set of handy tools for unit tests - require and assert

// assert.NoError is also ok, but require will stop test if condition is failed
require.NoError(t, err)
require.EqualError(t, err, "some error message")
require.Equal(t, expected, cfg.HTTP.PingTimeout)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pelletier pelletier merged commit e690861 into master Sep 13, 2020
@pelletier pelletier deleted the github437 branch September 13, 2020 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unmarshaler doesn't respect Unmarshaler interface on type mismatch
2 participants