Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
if booleanExpression {
|
||||
statements
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
treadmill: for {
|
||||
switch {
|
||||
case true:
|
||||
break treadmill
|
||||
}
|
||||
}
|
||||
fmt.Println("I'm off!")
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
if booleanExpression {
|
||||
statements
|
||||
} else {
|
||||
other
|
||||
statements
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
if booleanExpression1 {
|
||||
statements
|
||||
} else if booleanExpression2 {
|
||||
otherStatements
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
if x := fetchSomething(); x > 0 {
|
||||
DoPos(x)
|
||||
} else {
|
||||
DoNeg(x)
|
||||
}
|
||||
11
Task/Conditional-structures/Go/conditional-structures-5.go
Normal file
11
Task/Conditional-structures/Go/conditional-structures-5.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
switch {
|
||||
case booleanExpression1:
|
||||
statements
|
||||
case booleanExpression2:
|
||||
other
|
||||
statements
|
||||
default:
|
||||
last
|
||||
resort
|
||||
statements
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
switch expressionOfAnyType {
|
||||
case value1:
|
||||
statements
|
||||
case value2, value3, value4:
|
||||
other
|
||||
statements
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
switch x := fetch(); {
|
||||
case x == "cheese":
|
||||
statements
|
||||
case otherBooleanExpression:
|
||||
other
|
||||
statements
|
||||
}
|
||||
10
Task/Conditional-structures/Go/conditional-structures-8.go
Normal file
10
Task/Conditional-structures/Go/conditional-structures-8.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
switch {
|
||||
case booleanExpression1:
|
||||
default:
|
||||
statements
|
||||
preliminaryToOtherStatements
|
||||
fallthrough
|
||||
case booleanExpression2:
|
||||
other
|
||||
statements
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
for {
|
||||
switch {
|
||||
case true:
|
||||
break
|
||||
}
|
||||
fmt.Println("I want out!")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue