From 3f22f7ea5f8b65ed9996b586f85360501ce5fe35 Mon Sep 17 00:00:00 2001 From: Tim Bray Date: Sat, 28 Jan 2023 10:38:02 -0800 Subject: [PATCH] pat: add prefix pattern fixes: #62 Signed-off-by: Tim Bray --- value_matcher.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/value_matcher.go b/value_matcher.go index e2f9b5e..b8856a5 100644 --- a/value_matcher.go +++ b/value_matcher.go @@ -119,8 +119,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher { newDfa = nfa2Dfa(newNfa) case prefixType: newDfa, nextField = makePrefixAutomaton(valBytes, nil) - default: - panic("unknown value type") } fields.startDfa = mergeDfas(fields.startDfa, newDfa) m.update(fields) @@ -153,9 +151,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher { fields.startDfa = newAutomaton m.update(fields) return nextField - - default: - panic("unknown value type") } } @@ -182,8 +177,6 @@ func (m *valueMatcher) addTransition(val typedVal) *fieldMatcher { newDfa = nfa2Dfa(newNfa) case prefixType: newDfa, nextField = makePrefixAutomaton(valBytes, nil) - default: - panic("unknown val type") } // now table is ready for use, nuke singleton to signal threads to use it