Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
if booleanExpression {
statements
}

View file

@ -0,0 +1,7 @@
treadmill: for {
switch {
case true:
break treadmill
}
}
fmt.Println("I'm off!")

View file

@ -0,0 +1,6 @@
if booleanExpression {
statements
} else {
other
statements
}

View file

@ -0,0 +1,5 @@
if booleanExpression1 {
statements
} else if booleanExpression2 {
otherStatements
}

View file

@ -0,0 +1,5 @@
if x := fetchSomething(); x > 0 {
DoPos(x)
} else {
DoNeg(x)
}

View file

@ -0,0 +1,11 @@
switch {
case booleanExpression1:
statements
case booleanExpression2:
other
statements
default:
last
resort
statements
}

View file

@ -0,0 +1,7 @@
switch expressionOfAnyType {
case value1:
statements
case value2, value3, value4:
other
statements
}

View file

@ -0,0 +1,7 @@
switch x := fetch(); {
case x == "cheese":
statements
case otherBooleanExpression:
other
statements
}

View file

@ -0,0 +1,10 @@
switch {
case booleanExpression1:
default:
statements
preliminaryToOtherStatements
fallthrough
case booleanExpression2:
other
statements
}

View file

@ -0,0 +1,7 @@
for {
switch {
case true:
break
}
fmt.Println("I want out!")
}