iota 并不是一定是从0开始
请看下例
package main
import (
"fmt"
)
const (
azero = iota
aone = iota
)
const (
info = "processing"
bzero = iota
bone = iota
)
func main() {
fmt.Println(azero,aone) //prints: 0 1
fmt.Println(bzero,bone) //prints: 1 2
}
iota 等于 const 块 的行数的值