diff --git a/name.go b/name.go index a931ba6..e427411 100644 --- a/name.go +++ b/name.go @@ -150,13 +150,6 @@ func checkPathValueNames(in []string) error { } func (tn TemplateName) String() string { return tn.name } -func (tn TemplateName) Pattern() string { - return tn.method + " " + tn.path -} - -func (tn TemplateName) sameRoute(p TemplateName) bool { - return tn.endpoint == p.endpoint -} func (tn TemplateName) byPathThenMethod(d TemplateName) int { if n := cmp.Compare(tn.path, d.path); n != 0 { diff --git a/name_test.go b/name_test.go index 5f966da..77e618c 100644 --- a/name_test.go +++ b/name_test.go @@ -77,11 +77,12 @@ func TestPattern_parseHandler(t *testing.T) { }, } { t.Run(tt.Name, func(t *testing.T) { - _, err, ok := muxt.NewTemplateName(tt.In) + tn, err, ok := muxt.NewTemplateName(tt.In) if assert.Equal(t, tt.ExpMatch, ok) { if tt.ExpErr != "" { assert.ErrorContains(t, err, tt.ExpErr) } else { + assert.Equal(t, tt.In, tn.String()) assert.NoError(t, err) } }