zhangqian
2024-07-01 84346bdafad764c8964256829dc7dc564fe95769
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
}