mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
22 lines
269 B
Go
22 lines
269 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"zero/core/conf"
|
||
|
"zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type TimeHolder struct {
|
||
|
Date time.Time `json:"date"`
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
th := &TimeHolder{}
|
||
|
err := conf.LoadConfig("./date.yml", th)
|
||
|
if err != nil {
|
||
|
logx.Error(err)
|
||
|
}
|
||
|
logx.Infof("%+v", th)
|
||
|
}
|