Created
March 9, 2022 08:14
-
-
Save tebeka/73c1bdb519738be39cb0070265e2357f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
filePerm := Read | Write // set permission (| is bitwise OR) | |
if filePerm&Write != 0 { // check permission (& is bitwise AND) | |
fmt.Println("can write") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment