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

Expose gopatch API as patch package #181

Merged
merged 4 commits into from
Feb 11, 2025
Merged

Conversation

vvakame
Copy link
Contributor

@vvakame vvakame commented Feb 5, 2025

closes #94
Expose gopatch API with minimal API.

@CLAassistant
Copy link

CLAassistant commented Feb 5, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@abhinav abhinav left a comment

Choose a reason for hiding this comment

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

This looks good to me from what I remember of the original code.

CC @sywhang @lverma14 @r-hang

patch/gopatch.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 73.75000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 87.41%. Comparing base (2ae6b02) to head (2392705).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
patch/gopatch.go 73.75% 14 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   87.30%   87.41%   +0.11%     
==========================================
  Files          39       40       +1     
  Lines        2457     3267     +810     
==========================================
+ Hits         2145     2856     +711     
- Misses        251      343      +92     
- Partials       61       68       +7     

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

@vvakame
Copy link
Contributor Author

vvakame commented Feb 7, 2025

It seems that the normal code is all covered by the tests.
Do I need to add tests for errors to meet the coverage criteria?

@abhinav
Copy link
Contributor

abhinav commented Feb 7, 2025

I think the missing error lines are fine as-is. You may want to rename patch.PatchFile to just patch.File.
Other than that, we'll need someone at Uber to merge this when they're ready.

@sywhang
Copy link
Contributor

sywhang commented Feb 7, 2025

Thanks for the PR! I will take a look at this some time later tonight.

@vvakame
Copy link
Contributor Author

vvakame commented Feb 7, 2025

thanks! I updated that abhinav's suggestion.

@vvakame
Copy link
Contributor Author

vvakame commented Feb 10, 2025

@sywhang PTAL 🙏

(It's Monday evening in my time zone, but it might have been Sunday night there. Sorry!)

@sywhang sywhang merged commit 02f5015 into uber-go:main Feb 11, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Expose api for embed in user program.
4 participants