mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:08:31 +02:00
feat: trie implementation
This commit is contained in:
13
internal/utils/trie/any_debug.go
Normal file
13
internal/utils/trie/any_debug.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build debug
|
||||
|
||||
package trie
|
||||
|
||||
import "fmt"
|
||||
|
||||
func panicInvalidAssignment() {
|
||||
// assigned anything after manually assigning nil
|
||||
// will panic because of type mismatch (zeroValue and v.(type))
|
||||
if r := recover(); r != nil {
|
||||
panic(fmt.Errorf("attempt to assign non-nil value on edge node or assigning mismatched type: %v", r))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user