diff options
Diffstat (limited to 'gemini/client.go')
-rw-r--r-- | gemini/client.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gemini/client.go b/gemini/client.go index e81e64a..34d5839 100644 --- a/gemini/client.go +++ b/gemini/client.go @@ -8,7 +8,7 @@ import ( "net" neturl "net/url" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" ) // Client is used for sending gemini requests and parsing gemini responses. @@ -43,7 +43,7 @@ var ExceededMaxRedirects = errors.New("gemini.Client: exceeded MaxRedirects") // // This method will not automatically follow redirects or cache permanent failures or // redirects. -func (client Client) RoundTrip(request *sr.Request) (*sr.Response, error) { +func (client Client) RoundTrip(request *types.Request) (*types.Response, error) { if request.Scheme != "gemini" && request.Scheme != "" { return nil, errors.New("non-gemini protocols not supported") } @@ -91,14 +91,14 @@ func (client Client) RoundTrip(request *sr.Request) (*sr.Response, error) { // Fetch parses a URL string and fetches the gemini resource. // // It will resolve any redirects along the way, up to client.MaxRedirects. -func (c Client) Fetch(url string) (*sr.Response, error) { +func (c Client) Fetch(url string) (*types.Response, error) { u, err := neturl.Parse(url) if err != nil { return nil, err } for i := 0; i <= c.MaxRedirects; i += 1 { - response, err := c.RoundTrip(&sr.Request{URL: u}) + response, err := c.RoundTrip(&types.Request{URL: u}) if err != nil { return nil, err } |