aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--response.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/response.go b/response.go
index 594fda2..d89fcb7 100644
--- a/response.go
+++ b/response.go
@@ -26,6 +26,15 @@ type Response struct {
conn net.Conn
}
+// NewResponse returns a new response with the provided status, meta, and body.
+func NewResponse(status Status, meta string, body io.ReadCloser) *Response {
+ return &Response{
+ status: status,
+ meta: meta,
+ body: body,
+ }
+}
+
// ReadResponse reads a Gemini response from the provided io.ReadCloser.
func ReadResponse(r io.ReadCloser) (*Response, error) {
resp := &Response{}