From 55d8a9ee20466f0a008d527edba212ab9e121a08 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 19 Nov 2021 03:03:53 +0300 Subject: [PATCH] util/http: add type alias Signed-off-by: Vasiliy Tolstov --- util/http/trie.go | 2 ++ util/http/trie_test.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/util/http/trie.go b/util/http/trie.go index ec15a171..dd38c6e9 100644 --- a/util/http/trie.go +++ b/util/http/trie.go @@ -79,6 +79,8 @@ func NewTrie() *Node { return &Node{} } +type Trie = Node + type Node struct { // regexp matcher for regexp nodes rex *regexp.Regexp diff --git a/util/http/trie_test.go b/util/http/trie_test.go index 9d796bba..d4e0a4db 100644 --- a/util/http/trie_test.go +++ b/util/http/trie_test.go @@ -5,6 +5,10 @@ import ( "testing" ) +func TestTrieBackwards(t *testing.T) { + _ = &Trie{} +} + func TestTrieWildcardPathPrefix(t *testing.T) { var err error type handler struct {