Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d7df39c481
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (36 sloc) 0.685 kb
package model
import "strconv"
func NewBool(value bool) *Bool {
return (*Bool)(&value)
Bool model value.
Struct tag attributes:
type Bool bool
func (self *Bool) Get() bool {
return bool(*self)
func (self *Bool) Set(value bool) {
*self = Bool(value)
func (self *Bool) String() string {
return strconv.FormatBool(self.Get())
func (self *Bool) SetString(str string) error {
value, err := strconv.ParseBool(str)
if err == nil {
return err
func (self *Bool) IsEmpty() bool {
return false
func (self *Bool) Required(metaData *MetaData) bool {
return false
func (self *Bool) Validate(metaData *MetaData) error {
return nil
Jump to Line
Something went wrong with that request. Please try again.