mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 15:00:00 +00:00
17 lines
245 B
Go
17 lines
245 B
Go
|
package internal
|
||
|
|
||
|
type Flag uint64
|
||
|
|
||
|
func (flag Flag) Has(other Flag) bool {
|
||
|
return flag&other == other
|
||
|
}
|
||
|
|
||
|
func (flag Flag) Set(other Flag) Flag {
|
||
|
return flag | other
|
||
|
}
|
||
|
|
||
|
func (flag Flag) Remove(other Flag) Flag {
|
||
|
flag &= ^other
|
||
|
return flag
|
||
|
}
|