zhangqian
2024-07-01 73b6baf6af3d88cdcb0e2df7932a9bd96b0b85c5
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
}