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

jsonutil: add MustMarshalIndent(), Indent(), MustIndent() #52

Merged
merged 1 commit into from Jan 10, 2019

Conversation

Projects
None yet
1 participant
@Carpetsmoker
Copy link
Member

Carpetsmoker commented Jan 10, 2019

The Format() function is useful especially in tests, where you want to
compare two JSON strings but they're both without newlines. The diffs
that e.g. go-cmp generate are useless, since they just show that that
one line changed.

jsonutil: add MustMarshalIndent(), Indent(), MustIndent()
The Indent() function is useful especially in tests, where you want to
compare two JSON strings but they're both without newlines. The diffs
that e.g. go-cmp generate are useless, since they just show that that
one line changed.

@Carpetsmoker Carpetsmoker changed the title jsonutil: add MustMarshalIndent(), Format(), MustFormat() jsonutil: add MustMarshalIndent(), Indent(), MustIndent() Jan 10, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #52 into master will decrease coverage by 0.24%.
The diff coverage is 60%.

Impacted Files Coverage Δ
jsonutil/jsonutil.go 66.66% <60%> (-11.12%) ⬇️

@Carpetsmoker Carpetsmoker merged commit 4a9ba28 into master Jan 10, 2019

2 of 4 checks passed

codecov/patch 60% of diff hit (target 77.48%)
Details
codecov/project 77.23% (-0.25%) compared to 9d322be
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Carpetsmoker Carpetsmoker deleted the fmt branch Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment