Last active
July 1, 2020 18:39
-
-
Save hazge/e21440d3e98e6355643714c574e09bc3 to your computer and use it in GitHub Desktop.
iota groups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Group uint | |
const ( | |
Black Group = 1 | |
Pink = 1 << iota | |
Grey | |
None = 0 | |
) | |
// Combine | |
var gb Group = Black | Grey | |
// Check if contains group | |
if gb & Pink != None { | |
// Contains Pink (it's not) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment