diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-08-12 09:40:39 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-08-12 09:40:39 -0600 |
commit | 23bc5f4fb7542e64c94eaa7fe2c7a6aa55010898 (patch) | |
tree | ec8113d3aa2379e3ca9cb3c6e13a5531895ea8c0 /finger/request.go | |
parent | 57a31a9b2cd549174d839b9b91b47db337f174cc (diff) |
move common types to an internal package
This helps avoid import cycles.
Diffstat (limited to 'finger/request.go')
-rw-r--r-- | finger/request.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/finger/request.go b/finger/request.go index a18ff7e..b0ef102 100644 --- a/finger/request.go +++ b/finger/request.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" ) // ForwardingDenied is returned in response to requests for forwarding service. @@ -47,7 +47,7 @@ var InvalidFingerQuery = errors.New("Invalid finger query.") // In accordance with the recommendation of RFC 1288 section 3.2.1 // (https://datatracker.ietf.org/doc/html/rfc1288#section-3.2.1), any queries which // include a jump-host (user@host1@host2) are rejected with the ForwardingDenied error. -func ParseRequest(rdr io.Reader) (*sr.Request, error) { +func ParseRequest(rdr io.Reader) (*types.Request, error) { line, err := bufio.NewReader(rdr).ReadString('\n') if err != nil { return nil, err @@ -66,7 +66,7 @@ func ParseRequest(rdr io.Reader) (*sr.Request, error) { return nil, ForwardingDenied } - return &sr.Request{URL: &url.URL{ + return &types.Request{URL: &url.URL{ Scheme: "finger", Host: hostname, Path: "/" + username, |