From 9a2da81b11ad0064cca24ce7974827d032309369 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 1 May 2023 07:56:25 -0600 Subject: name change gus -> sliderule --- contrib/tlsauth/gemini_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'contrib/tlsauth/gemini_test.go') diff --git a/contrib/tlsauth/gemini_test.go b/contrib/tlsauth/gemini_test.go index 7823de6..655307a 100644 --- a/contrib/tlsauth/gemini_test.go +++ b/contrib/tlsauth/gemini_test.go @@ -8,38 +8,38 @@ import ( "github.com/stretchr/testify/assert" - "tildegit.org/tjp/gus" - "tildegit.org/tjp/gus/contrib/tlsauth" - "tildegit.org/tjp/gus/gemini" + sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/contrib/tlsauth" + "tildegit.org/tjp/sliderule/gemini" ) func TestGeminiAuth(t *testing.T) { - handler1 := gus.HandlerFunc(func(_ context.Context, request *gus.Request) *gus.Response { + handler1 := sr.HandlerFunc(func(_ context.Context, request *sr.Request) *sr.Response { if !strings.HasPrefix(request.Path, "/one") { return nil } return gemini.Success("", &bytes.Buffer{}) }) - handler2 := gus.HandlerFunc(func(_ context.Context, request *gus.Request) *gus.Response { + handler2 := sr.HandlerFunc(func(_ context.Context, request *sr.Request) *sr.Response { if !strings.HasPrefix(request.Path, "/two") { return nil } return gemini.Success("", &bytes.Buffer{}) }) - handler3 := gus.HandlerFunc(func(_ context.Context, request *gus.Request) *gus.Response { + handler3 := sr.HandlerFunc(func(_ context.Context, request *sr.Request) *sr.Response { if !strings.HasPrefix(request.Path, "/three") { return nil } return gemini.Success("", &bytes.Buffer{}) }) - handler4 := gus.HandlerFunc(func(_ context.Context, request *gus.Request) *gus.Response { + handler4 := sr.HandlerFunc(func(_ context.Context, request *sr.Request) *sr.Response { return gemini.Success("", &bytes.Buffer{}) }) - handler := gus.FallthroughHandler( + handler := sr.FallthroughHandler( tlsauth.GeminiAuth(tlsauth.Allow)(handler1), tlsauth.GeminiAuth(tlsauth.Allow)(handler2), tlsauth.GeminiAuth(tlsauth.Reject)(handler3), @@ -73,8 +73,8 @@ func TestGeminiAuth(t *testing.T) { } func TestGeminiOptionalAuth(t *testing.T) { - pathHandler := func(path string) gus.Handler { - return gus.HandlerFunc(func(_ context.Context, request *gus.Request) *gus.Response { + pathHandler := func(path string) sr.Handler { + return sr.HandlerFunc(func(_ context.Context, request *sr.Request) *sr.Response { if !strings.HasPrefix(request.Path, path) { return nil } @@ -82,7 +82,7 @@ func TestGeminiOptionalAuth(t *testing.T) { }) } - handler := gus.FallthroughHandler( + handler := sr.FallthroughHandler( tlsauth.GeminiOptionalAuth(tlsauth.Allow)(pathHandler("/one")), tlsauth.GeminiOptionalAuth(tlsauth.Allow)(pathHandler("/two")), tlsauth.GeminiOptionalAuth(tlsauth.Reject)(pathHandler("/three")), -- cgit v1.2.3