From a3a995df3595fb58535078d2228d418a2ffc3ea9 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Thu, 18 Feb 2021 00:06:34 -0500 Subject: [PATCH] response: Rename statusCode to status --- response.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/response.go b/response.go index 3932ae4..b02b507 100644 --- a/response.go +++ b/response.go @@ -167,7 +167,7 @@ type ResponseWriter interface { // The provided code must be a valid Gemini status code. // The provided meta must not be longer than 1024 bytes. // Only one header may be written. - WriteHeader(statusCode int, meta string) + WriteHeader(status int, meta string) } // The Flusher interface is implemented by ResponseWriters that allow a @@ -218,16 +218,16 @@ func (w *responseWriter) Write(b []byte) (int, error) { return w.b.Write(b) } -func (w *responseWriter) WriteHeader(statusCode int, meta string) { +func (w *responseWriter) WriteHeader(status int, meta string) { if w.wroteHeader { return } - if StatusClass(statusCode) == StatusSuccess { + if StatusClass(status) == StatusSuccess { w.bodyAllowed = true } - w.b.WriteString(strconv.Itoa(statusCode)) + w.b.WriteString(strconv.Itoa(status)) w.b.WriteByte(' ') w.b.WriteString(meta) w.b.Write(crlf)