fix: ensure pointers can be detected as bools
This required adding a BoolMapperExt interface.
This commit is contained in:
@@ -318,6 +318,9 @@ func (v *Value) IsMap() bool {
|
||||
|
||||
// IsBool returns true if the underlying value is a boolean.
|
||||
func (v *Value) IsBool() bool {
|
||||
if m, ok := v.Mapper.(BoolMapperExt); ok && m.IsBoolFromValue(v.Target) {
|
||||
return true
|
||||
}
|
||||
if m, ok := v.Mapper.(BoolMapper); ok && m.IsBool() {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user