14 lines
411 B
Go
Raw Permalink Normal View History

package common
type Base struct {
ID int `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
// init 函数会在包被导入时自动调用,可以用来进行一些初始化操作
// 执行顺序: stack 结构, 最后的包 最先被执行, 只有子包的init了才能执行父包的init
func init() {
println("common 包的 init 函数被调用")
}