Created
March 10, 2022 10:17
-
-
Save tebeka/9ced59bee292545c3a9bb1f571678056 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
func (p FilePerm) String() string { | |
switch p { | |
case Read: | |
return "read" | |
case Write: | |
return "write" | |
case Execute: | |
return "execute" | |
} | |
return fmt.Sprintf("<FilePerm: %d>", p) // don't use %s or %v here :) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment