EqualBool reports whether b is equal to v. If b is empty or not a valid bool, it reports false.
(v bool)
| 97 | // EqualBool reports whether b is equal to v. |
| 98 | // If b is empty or not a valid bool, it reports false. |
| 99 | func (b Bool) EqualBool(v bool) bool { |
| 100 | p, ok := b.Get() |
| 101 | return ok && p == v |
| 102 | } |
| 103 | |
| 104 | var ( |
| 105 | trueBytes = []byte(True) |