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

fix: json template render bad empty array and empty object #644

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

ifplusor
Copy link
Collaborator

@ifplusor ifplusor commented Nov 5, 2023

What problem does this PR solve?

JSON template renders bad empty array and empty object

Problem Summary

  • missing '[' when renders empty array
  • missing '{' when renders empty object

What has changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

@ifplusor ifplusor requested a review from xdlbdy November 5, 2023 05:37
Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Merging #644 (b8dfc8d) into main (ee76217) will decrease coverage by 5.74%.
Report is 106 commits behind head on main.
The diff coverage is 3.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
- Coverage   57.07%   51.33%   -5.74%     
==========================================
  Files         190      260      +70     
  Lines       15191    19566    +4375     
==========================================
+ Hits         8670    10045    +1375     
- Misses       5884     8703    +2819     
- Partials      637      818     +181     
Flag Coverage Δ
unittests 51.33% <3.63%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/errors/app.go 30.90% <ø> (ø)
lib/bytes/clone_go119.go 0.00% <ø> (ø)
lib/bytes/escape.go 54.46% <ø> (ø)
lib/bytes/io.go 0.00% <ø> (ø)
lib/bytes/parse.go 7.14% <ø> (ø)
lib/bytes/unsafe.go 100.00% <ø> (ø)
lib/bytes/utf8.go 11.11% <ø> (ø)
lib/json/path/parse.go 49.41% <ø> (ø)
lib/json/path/path.go 0.00% <ø> (ø)
lib/json/path/segment.go 0.00% <ø> (ø)
... and 31 more

... and 393 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Contributor

@xdlbdy xdlbdy left a comment

Choose a reason for hiding this comment

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

LGTM

@xdlbdy xdlbdy merged commit 00d9a94 into vanus-labs:main Nov 5, 2023
4 of 6 checks passed
@ifplusor ifplusor deleted the fix-bad-empty branch November 5, 2023 05:45
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.

2 participants