github.com/Finschia/finschia-sdk@v0.48.1/store/types/validity.go (about) 1 package types 2 3 // Check if the key is valid(key is not nil) 4 func AssertValidKey(key []byte) { 5 if len(key) == 0 { 6 panic("key is nil") 7 } 8 } 9 10 // Check if the value is valid(value is not nil) 11 func AssertValidValue(value []byte) { 12 if value == nil { 13 panic("value is nil") 14 } 15 }