Day of week
Go Switch / case
switch + default
Flowchart (ISO 5807)
Source code
func day(d int) string {
switch d {
case 1:
return "Пн"
case 2:
return "Вт"
default:
return "?"
}
} switch + default
func day(d int) string {
switch d {
case 1:
return "Пн"
case 2:
return "Вт"
default:
return "?"
}
}