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
| switch initialization { | |
| case val1: | |
| ... | |
| case val2: | |
| ... | |
| default: | |
| ... | |
| } | |
| switch result := calculate(); { |
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
| switch { | |
| case condition1: | |
| ... | |
| case condition2: | |
| ... | |
| default: | |
| ... | |
| } |
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
| switch var1 { | |
| case val1: | |
| ... | |
| case val2: | |
| ... | |
| default: | |
| ... | |
| } |
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
| if value, ok := readData(); ok { | |
| … | |
| } |
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
| if err := file.Chmod(0664); err != nil { | |
| fmt.Println(err) | |
| return err | |
| } |
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
| if err != nil { | |
| fmt.Printf("Program stopping with error %v", err) | |
| os.Exit(1) | |
| } |
NewerOlder