@@ -12,7 +12,7 @@ import (
1212 "strings"
1313 "time"
1414
15- "github.com/codeGROOVE-dev/sociopath/pkg/cache "
15+ "github.com/codeGROOVE-dev/sociopath/pkg/httpcache "
1616 "github.com/codeGROOVE-dev/sociopath/pkg/profile"
1717)
1818
@@ -29,20 +29,20 @@ func AuthRequired() bool { return false }
2929// Client handles BlueSky requests.
3030type Client struct {
3131 httpClient * http.Client
32- cache cache. HTTPCache
32+ cache * httpcache. Cache
3333 logger * slog.Logger
3434}
3535
3636// Option configures a Client.
3737type Option func (* config )
3838
3939type config struct {
40- cache cache. HTTPCache
40+ cache * httpcache. Cache
4141 logger * slog.Logger
4242}
4343
4444// WithHTTPCache sets the HTTP cache.
45- func WithHTTPCache (httpCache cache. HTTPCache ) Option {
45+ func WithHTTPCache (httpCache * httpcache. Cache ) Option {
4646 return func (c * config ) { c .cache = httpCache }
4747}
4848
@@ -88,7 +88,7 @@ func (c *Client) Fetch(ctx context.Context, urlStr string) (*profile.Profile, er
8888 req .Header .Set ("Accept" , "application/json" )
8989 req .Header .Set ("User-Agent" , "sociopath/1.0" )
9090
91- body , err := cache .FetchURL (ctx , c .cache , c .httpClient , req , c .logger )
91+ body , err := httpcache .FetchURL (ctx , c .cache , c .httpClient , req , c .logger )
9292 if err != nil {
9393 return nil , err
9494 }
@@ -153,7 +153,7 @@ func (c *Client) fetchPosts(ctx context.Context, handle string, limit int) (post
153153 req .Header .Set ("Accept" , "application/json" )
154154 req .Header .Set ("User-Agent" , "sociopath/1.0" )
155155
156- body , err := cache .FetchURL (ctx , c .cache , c .httpClient , req , c .logger )
156+ body , err := httpcache .FetchURL (ctx , c .cache , c .httpClient , req , c .logger )
157157 if err != nil {
158158 return nil , ""
159159 }
0 commit comments