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 /gemini/roundtrip_test.go | |
parent | 57a31a9b2cd549174d839b9b91b47db337f174cc (diff) |
move common types to an internal package
This helps avoid import cycles.
Diffstat (limited to 'gemini/roundtrip_test.go')
-rw-r--r-- | gemini/roundtrip_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gemini/roundtrip_test.go b/gemini/roundtrip_test.go index 0aa5648..50c1962 100644 --- a/gemini/roundtrip_test.go +++ b/gemini/roundtrip_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" "tildegit.org/tjp/sliderule/gemini" ) @@ -20,7 +20,7 @@ func TestRoundTrip(t *testing.T) { tlsConf, err := gemini.FileTLS("./testdata/server.crt", "./testdata/server.key") require.Nil(t, err) - handler := sr.HandlerFunc(func(ctx context.Context, req *sr.Request) *sr.Response { + handler := types.HandlerFunc(func(ctx context.Context, req *types.Request) *types.Response { return gemini.Success("text/gemini", bytes.NewBufferString("you've found my page")) }) @@ -36,7 +36,7 @@ func TestRoundTrip(t *testing.T) { require.Nil(t, err) cli := gemini.NewClient(testClientTLS()) - response, err := cli.RoundTrip(&sr.Request{URL: u}) + response, err := cli.RoundTrip(&types.Request{URL: u}) require.Nil(t, err) assert.Equal(t, gemini.StatusSuccess, response.Status) @@ -54,7 +54,7 @@ func TestTitanRequest(t *testing.T) { require.Nil(t, err) invoked := false - handler := sr.HandlerFunc(func(ctx context.Context, request *sr.Request) *sr.Response { + handler := types.HandlerFunc(func(ctx context.Context, request *types.Request) *types.Response { invoked = true body := gemini.GetTitanRequestBody(request) |