summaryrefslogtreecommitdiff
path: root/gopher/request.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-12 09:40:39 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-12 09:40:39 -0600
commit23bc5f4fb7542e64c94eaa7fe2c7a6aa55010898 (patch)
treeec8113d3aa2379e3ca9cb3c6e13a5531895ea8c0 /gopher/request.go
parent57a31a9b2cd549174d839b9b91b47db337f174cc (diff)
move common types to an internal package
This helps avoid import cycles.
Diffstat (limited to 'gopher/request.go')
-rw-r--r--gopher/request.go6
1 files changed, 3 insertions, 3 deletions
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),