Merge commit 'b012bf39ee36334f30ba7b29245a89f6b609a995' into ja
This commit is contained in:
@@ -236,6 +236,10 @@ Go里面有一个关键字`iota`,这个关键字用来声明`enum`的时候采
|
||||
)
|
||||
|
||||
const v = iota // 每遇到一个const关键字,iota就会重置,此时v == 0
|
||||
|
||||
const (
|
||||
e, f, g = iota, iota, iota //e=0,f=0,g=0 iota在同一行值相同
|
||||
)
|
||||
|
||||
### Go程序设计的一些规则
|
||||
Go之所以会那么简洁,是因为它有一些默认的行为:
|
||||
|
||||
Reference in New Issue
Block a user