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

changed the method 'Header(key, value string)' on 'type Context' to '… #3596

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Needrima
Copy link

@Needrima Needrima commented May 6, 2023

…SetHeader(key, value string)' for more clarity and to match the method 'GetHeader(key string)string'

  • 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 GitHub Actions.
    • You should add/modify tests to cover your proposed code changes.
    • If your pull request contains a new feature, please document it on the README.

…SetHeader(key, value string)' for more clarity and to match the method 'GetHeader(key string)string'
@@ -858,7 +858,7 @@ func (c *Context) Status(code int) {
// Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
// It writes a header in the response.
// If value == "", this method removes the header `c.Writer.Header().Del(key)`
func (c *Context) Header(key, value string) {
func (c *Context) SetHeader(key, value string) {
Copy link

Choose a reason for hiding this comment

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

This will introduce big blunder to existing projects. The Header method is more appropriate than SetHeader in comparison with other methods.

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.

None yet

2 participants