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

feat: Support writing QR code SVG and PNG to io.Writer #87

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

startnow65
Copy link
Contributor

This adds support for writing SVG and PNG to an io.Writer.

There is currently support to write the generated QR code directly to a file in these file formats.
There are, however, cases where the QR code is to be sent over the network. Without this feature, the workaround would be to write to a temporary file and then read that which is not convenient nor efficient.

Signed-off-by: Josiah Adenegan <[email protected]>
Signed-off-by: Josiah Adenegan <[email protected]>
@startnow65 startnow65 changed the title Support writing QR code SVG and PNG to io.Writer feat: Support writing QR code SVG and PNG to io.Writer Jan 5, 2024
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (73089e7) 82.36% compared to head (be9c052) 84.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
+ Coverage   82.36%   84.12%   +1.75%     
==========================================
  Files           5        5              
  Lines        1038     1058      +20     
==========================================
+ Hits          855      890      +35     
+ Misses        125      115      -10     
+ Partials       58       53       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piglig
Copy link
Owner

piglig commented Jan 5, 2024

Great catch, maybe you should add some test cases to meet the needs of codecov.

@startnow65
Copy link
Contributor Author

Great catch, maybe you should add some test cases to meet the needs of codecov.

It will be a tricky one, but I'll try

Signed-off-by: Josiah Adenegan <[email protected]>
@piglig
Copy link
Owner

piglig commented Jan 9, 2024

LGTM

@piglig piglig merged commit 5572fa2 into piglig:main Jan 9, 2024
4 checks passed
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