constvar/const.go
@@ -339,3 +339,19 @@ } return true } // BoolType 布尔类型 type BoolType int const ( BoolTypeTrue BoolType = 1 // true BoolTypeFalse BoolType = 2 // false ) func (slf BoolType) IsValid() bool { return slf == BoolTypeTrue || slf == BoolTypeFalse } func (slf BoolType) Bool() bool { return slf == BoolTypeTrue }