github.com/diamondburned/arikawa/v2@v2.1.0/discord/discord.go (about) 1 // Package discord provides common structures that the whole repository uses. It 2 // does not (and should not) contain API-specific structures, or WS-specific 3 // structures. 4 package discord 5 6 // HasFlag is returns true if has is in the flag. In other words, it checks if 7 // has is OR'ed into flag. This function could be used for different constants 8 // such as Permission. 9 func HasFlag(flag, has uint64) bool { 10 return flag&has == has 11 }