- Security with Go
- John Daniel Leon
- 65字
- 2021-06-30 19:06:49
goto
Go does have a goto statement, but it is very rarely used. Create a label with a name and a colon, then go to it using the goto keyword. Here is a basic example:
package main
import "fmt"
func main() {
goto customLabel
// Will never get executed because
// the goto statement will jump right
// past this line
fmt.Println("Hello")
customLabel:
fmt.Println("World")
}
推薦閱讀
- 線性代數(shù)選講
- Introduction to Blockchain and Ethereum
- 奇妙數(shù)學(xué)史:數(shù)字與生活
- 概率論與數(shù)理統(tǒng)計
- 一個數(shù)學(xué)家的辯白(雙語版)
- 紅發(fā)克拉拉的數(shù)學(xué)奇想
- 物性數(shù)學(xué)及其應(yīng)用
- 趣味魔方:一學(xué)就會的魔方秘笈
- 怎樣解題:數(shù)學(xué)競賽攻關(guān)寶典(第3版)
- 排序問題的數(shù)學(xué)規(guī)劃松弛方法
- Hyperledger Cookbook
- 特殊函數(shù)概論習(xí)題解答
- Security with Go
- 美妙的數(shù)學(xué)(插圖珍藏版)
- 不可思議的自然對數(shù)