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

WIP: w.Write: replace to http.ResponseWriter.Write #801

Closed
wants to merge 4 commits into from

Conversation

avelino
Copy link
Member

@avelino avelino commented Apr 10, 2023

fixed: #800

ref

Signed-off-by: Avelino <avelinorun@gmail.com>
… header

Signed-off-by: Avelino <avelinorun@gmail.com>
Signed-off-by: Avelino <avelinorun@gmail.com>
Signed-off-by: Avelino <avelinorun@gmail.com>
@avelino avelino changed the title w.Write: replace to http.ResponseWriter.Write WIP: w.Write: replace to http.ResponseWriter.Write Apr 10, 2023
w.Write([]byte(val))
http.ResponseWriter.Header(w).Set("Cache-Server", "prestd")
http.ResponseWriter.WriteHeader(w, http.StatusOK)
http.ResponseWriter.Write(w, []byte(val))
Copy link
Member

Choose a reason for hiding this comment

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

Since the 'http.ResponseWriter' is an interface not defined here, I believe that there is a chance that we get nil panics, isn't it?

@avelino
Copy link
Member Author

avelino commented Apr 12, 2023

abandoning this PR because it makes no sense

@avelino avelino closed this Apr 12, 2023
@avelino avelino deleted the avelino/issue-800 branch April 12, 2023 12:05
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.

lint: error return value of w.Write is not checked (errcheck)
3 participants