Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- )
- const EXEC = 1 // 0001
- const WRITE = 2 // 0010
- const READ = 4 // 0100
- func main() {
- // Read only
- fmt.Println(READ)
- // Read and write
- fmt.Println(READ ^ WRITE)
- // Read and Exec
- fmt.Println(READ ^ EXEC)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement