aboutsummaryrefslogtreecommitdiff
path: root/request.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-12-18 01:14:06 -0500
committerAdnan Maolood <[email protected]>2020-12-18 01:14:06 -0500
commitdecd72cc230bac07a24d1416df2360bae807532b (patch)
tree0c268a31b611db05e21b02679f5f99dcbd5b77e8 /request.go
parentserver: Don't always assume TLS is used (diff)
downloadgo-gemini-decd72cc230bac07a24d1416df2360bae807532b.tar.xz
go-gemini-decd72cc230bac07a24d1416df2360bae807532b.zip
Expose Request.Write and Response.Read functions
Diffstat (limited to 'request.go')
-rw-r--r--request.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/request.go b/request.go
index 138fc15..a18dcab 100644
--- a/request.go
+++ b/request.go
@@ -65,8 +65,8 @@ func NewRequestFromURL(url *url.URL) *Request {
}
}
-// write writes the Gemini request to the provided buffered writer.
-func (r *Request) write(w *bufio.Writer) error {
+// Write writes the Gemini request to the provided buffered writer.
+func (r *Request) Write(w *bufio.Writer) error {
url := r.URL.String()
// User is invalid
if r.URL.User != nil || len(url) > 1024 {