gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

flag.go (241B)


      1 package internal
      2 
      3 type Flag uint64
      4 
      5 func (flag Flag) Has(other Flag) bool {
      6 	return flag&other != 0
      7 }
      8 
      9 func (flag Flag) Set(other Flag) Flag {
     10 	return flag | other
     11 }
     12 
     13 func (flag Flag) Remove(other Flag) Flag {
     14 	flag &= ^other
     15 	return flag
     16 }