File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ func keyFuncFor(node *structtrie.Node) KeyFunc {
6363 return nil
6464 }
6565 if value := node .Value (); value != nil {
66- return value .(* keyFuncCaller )
66+ if fn , ok := value .(KeyFunc ); ok {
67+ return fn
68+ }
6769 }
6870 return nil
6971}
@@ -77,11 +79,11 @@ func BuildSliceKeyTrie(sliceKeys map[string]KeyFunc) (*structtrie.Node, error) {
7779
7880 root := structtrie .New ()
7981 for pattern , fn := range sliceKeys {
80- caller , err := newKeyFuncCaller (fn )
82+ _ , err := newKeyFuncCaller (fn )
8183 if err != nil {
8284 return nil , err
8385 }
84- if _ , err := structtrie .InsertString (root , pattern , caller ); err != nil {
86+ if _ , err := structtrie .InsertString (root , pattern , fn ); err != nil {
8587 return nil , err
8688 }
8789 }
You can’t perform that action at this time.
0 commit comments