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
| type Permissions int | |
| const ( | |
| Read Permissions = 1 << iota // 1 << 0 = 00000001 | |
| Write // 1 << 1 = 00000010 | |
| Create // 1 << 2 = 00000100 | |
| Delete // 1 << 3 = 00001000 | |
| ) |
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
| type CarType int | |
| const ( | |
| BMW CarType = iota // 0 | |
| Audi // 1 | |
| Mercedes // 2 | |
| _ | |
| _ | |
| XRay // 5 | |
| ) |
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 FormatMyValue(i int) string { | |
| return fmt.Sprintf(“there are %d my value”, i) | |
| } | |
| func main() { | |
| n := TypicalPhlegmaticPerson | |
| fmt.Println(FormatMyValue(n)) | |
| } | |
| // output: |
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
| type TemperamentЕype int | |
| const ( | |
| TypicalSanguinePerson TemperamentЕype = iota // 0 | |
| TypicalCholericSubject // 1 | |
| TypicalPhlegmaticPerson // 2 | |
| TypicalMelancholiac // 3 | |
| ) |
NewerOlder