mirror of
https://gitee.com/johng/gf
synced 2026-07-06 05:42:20 +08:00
fix bug: could not load time location: "unknown time zone Asia/Shanghai" The bug will appear when I use gf in windows to do "gf gen dao" for clickhouse.
33 lines
719 B
Go
33 lines
719 B
Go
// Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
|
|
//
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file,
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
package main
|
|
|
|
import (
|
|
_ "time/tzdata"
|
|
|
|
"github.com/gogf/gf/v2/errors/gerror"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
|
|
"github.com/gogf/gf/cmd/gf/v2/gfcmd"
|
|
"github.com/gogf/gf/cmd/gf/v2/internal/utility/mlog"
|
|
)
|
|
|
|
func main() {
|
|
var (
|
|
ctx = gctx.GetInitCtx()
|
|
command, err = gfcmd.GetCommand(ctx)
|
|
)
|
|
|
|
if err != nil {
|
|
mlog.Fatalf(`%+v`, err)
|
|
}
|
|
if command == nil {
|
|
panic(gerror.New(`retrieve root command failed for "gf"`))
|
|
}
|
|
command.Run(ctx)
|
|
}
|