move url.URL into base.URL (#459)

This commit is contained in:
Alessandro Ros
2023-11-07 16:51:45 +01:00
committed by GitHub
parent b8838ca595
commit 01b3bfc6ab
44 changed files with 268 additions and 259 deletions

30
pkg/base/path_test.go Normal file
View File

@@ -0,0 +1,30 @@
package base
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPathSplitQuery(t *testing.T) {
for _, ca := range []struct {
a string
b string
c string
}{
{
"test?a=b",
"test",
"a=b",
},
{
"test",
"test",
"",
},
} {
b, c := PathSplitQuery(ca.a)
require.Equal(t, ca.b, b)
require.Equal(t, ca.c, c)
}
}