diff options
Diffstat (limited to 'vendor/github.com/uptrace/bun/internal/flag.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/internal/flag.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/internal/flag.go b/vendor/github.com/uptrace/bun/internal/flag.go new file mode 100644 index 000000000..b42f59df7 --- /dev/null +++ b/vendor/github.com/uptrace/bun/internal/flag.go @@ -0,0 +1,16 @@ +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 +} |