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

Refactoring httpContext & httpResponse make methods signature as same as interfaces declared. #416

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

Owenxh
Copy link
Contributor

@Owenxh Owenxh commented Dec 17, 2021

If the implementation method signature is different from the interface will get an error tip in GoLand.

Refactoring httpContext & httpResponse make methods signature as same as interfaces declared.

Copy link

@strongant strongant left a comment

Choose a reason for hiding this comment

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

Why ?

@localvar
Copy link
Collaborator

Thanks @Owenxh for reporting and fixing the issue.

Could you please change all func() to FinishFunc and all func(body []byte, complete bool) (newBody []byte) to BodyFlushFunc, the latters are more easy to read and grep.

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

Merging #416 (aebceea) into main (c08f411) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #416      +/-   ##
==========================================
+ Coverage   80.30%   80.35%   +0.05%     
==========================================
  Files          62       62              
  Lines        7112     7112              
==========================================
+ Hits         5711     5715       +4     
+ Misses       1104     1102       -2     
+ Partials      297      295       -2     
Impacted Files Coverage Δ
pkg/object/mqttproxy/client.go 79.87% <0.00%> (-1.22%) ⬇️
pkg/cluster/cluster.go 50.59% <0.00%> (+1.02%) ⬆️

Continue to review full report at Codecov.

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

@Owenxh
Copy link
Contributor Author

Owenxh commented Dec 17, 2021

Thanks @Owenxh for reporting and fixing the issue.

Could you please change all func() to FinishFunc and all func(body []byte, complete bool) (newBody []byte) to BodyFlushFunc, the latters are more easy to read and grep.

Ok, I will try it later

@Owenxh Owenxh closed this Dec 17, 2021
@Owenxh Owenxh reopened this Dec 17, 2021
@haoel haoel changed the title [refactor] Refactoring httpContext & httpResponse make methods signature as same as interfaces declared. Dec 17, 2021
@localvar localvar merged commit 8ac2bab into easegress-io:main Dec 17, 2021
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.

6 participants