go 常量声明

package main

func main()  {
    //iota ,特殊常量可以认为是一个呗编译器修改的常量
    //可以被当做枚举使用
    const(
        //数字会一次增加不管你赋值如何
        a = iota//0
        s //1
        d  //2
        f = "haha"// haha   3
        j = iota // haha    4
        g = 100   //100   5
        h = iota    //6
    )


}
原文地址:https://www.cnblogs.com/yangxinpython/p/12802515.html