参考文献

代码说明

常规定义

const Name string = "axinblog"

const Type = 1

const name, id = "bimmler", 17

iota 枚举

const (
    StatusDisable = iota
    StatusEnable = iota
)
const (
	StatusDisable = iota // 状态关闭
	StatusEnable         // 状态开启
)

以上两种定义相等

const (
	Silent LogLevel = iota + 1
	Error
	Warn
	Info
)