From 23bc5f4fb7542e64c94eaa7fe2c7a6aa55010898 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 12 Aug 2023 09:40:39 -0600 Subject: move common types to an internal package This helps avoid import cycles. --- gopher/request.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gopher/request.go') diff --git a/gopher/request.go b/gopher/request.go index 4aac218..eef8262 100644 --- a/gopher/request.go +++ b/gopher/request.go @@ -8,11 +8,11 @@ import ( "path" "strings" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" ) // ParseRequest parses a gopher protocol request into a sliderule.Request object. -func ParseRequest(rdr io.Reader) (*sr.Request, error) { +func ParseRequest(rdr io.Reader) (*types.Request, error) { selector, search, err := readFullRequest(rdr) if err != nil { return nil, err @@ -22,7 +22,7 @@ func ParseRequest(rdr io.Reader) (*sr.Request, error) { selector = "/" + selector } - return &sr.Request{ + return &types.Request{ URL: &url.URL{ Scheme: "gopher", Path: path.Clean(selector), -- cgit v1.2.3