mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
13 lines
334 B
Go
13 lines
334 B
Go
//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))
|
|
}
|
|
}
|