From c237f8c566b6d21521ed708d3d44430ef73eb8a4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 5 Sep 2023 06:02:56 +0400 Subject: [PATCH] Moved httpr_test.go to httpr package to get access to private funcs. --- httpr_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/httpr_test.go b/httpr_test.go index 4eafbd0..128aafe 100644 --- a/httpr_test.go +++ b/httpr_test.go @@ -1,4 +1,4 @@ -package httpr_test +package httpr import ( "net/http" @@ -6,12 +6,10 @@ import ( "os" "strings" "testing" - - "git.arav.su/Arav/httpr" ) func Test(t *testing.T) { - r := httpr.New() + r := New() err := r.Handler(http.MethodGet, "/", func(w http.ResponseWriter, r *http.Request) {}) if err != nil { @@ -53,7 +51,7 @@ func Test(t *testing.T) { func TestPaths(t *testing.T) { found := false - r := httpr.New() + r := New() err := r.Handler(http.MethodGet, "/:lel", func(w http.ResponseWriter, r *http.Request) { found = true }) if err != nil { @@ -88,7 +86,7 @@ func TestPaths(t *testing.T) { func TestSubPaths(t *testing.T) { found := true - r := httpr.New() + r := New() s := r.Sub("/api/v1")