mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-05 12:25:04 +00:00
17 lines
241 B
Go
17 lines
241 B
Go
package internal
|
|
|
|
type Flag uint64
|
|
|
|
func (flag Flag) Has(other Flag) bool {
|
|
return flag&other != 0
|
|
}
|
|
|
|
func (flag Flag) Set(other Flag) Flag {
|
|
return flag | other
|
|
}
|
|
|
|
func (flag Flag) Remove(other Flag) Flag {
|
|
flag &= ^other
|
|
return flag
|
|
}
|