Expose Request.Write and Response.Read functions

This commit is contained in:
Adnan Maolood
2020-12-18 01:14:06 -05:00
parent c329a2487e
commit decd72cc23
4 changed files with 9 additions and 8 deletions

View File

@@ -26,8 +26,8 @@ type Response struct {
TLS tls.ConnectionState
}
// read reads a Gemini response from the provided io.ReadCloser.
func (resp *Response) read(rc io.ReadCloser) error {
// Read reads a Gemini response from the provided io.ReadCloser.
func (resp *Response) Read(rc io.ReadCloser) error {
br := bufio.NewReader(rc)
// Read the status
statusB := make([]byte, 2)