gin
gin copied to clipboard
add a method to set the indentJsonIndentString used in Context.Indent…
…edJSON
- With pull requests:
- Open your pull request against
master - Your pull request should have no more than two commits, if not you should squash them.
- It should pass all tests in the available continuous integration systems such as TravisCI.
- You should add/modify tests to cover your proposed code changes.
- If your pull request contains a new feature, please docuHi, I have add a method named
IndentJsonIndentSpaceNumforEngineto set number of indented blanks when you useContext.IndentedJSON.We can use it like this:
- Open your pull request against
router := gin.Default()
router.IndentJsonIndentSpaceNum(2)
The serialized string of gin.H {" name ":" test "," age ": 2} is like:
{
"name": "test",
"age": 2
}
There are only 2 spaces in front of the name field.ment it on the README.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 98.48%. Comparing base (05464a8) to head (e7e1996).
:warning: Report is 563 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2349 +/- ##
=======================================
Coverage 98.48% 98.48%
=======================================
Files 41 41
Lines 2305 2309 +4
=======================================
+ Hits 2270 2274 +4
Misses 20 20
Partials 15 15
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
conflicts
conflicts
Where is the conflict?
@appleboy fixed conflicts