fix: 修复win下gorm无法open的问题,实际是timezone读取的问题

main
NorthLan 2 years ago
parent b05ea363b3
commit ca411e9e2c

@ -12,6 +12,8 @@ import (
"live-service/app/user_center/rpc/internal/svc"
"live-service/app/user_center/rpc/pb"
"live-service/common/interceptor/rpcserver"
"os"
"path/filepath"
"github.com/zeromicro/go-zero/core/service"
"github.com/zeromicro/go-zero/zrpc"
@ -30,6 +32,11 @@ func main() {
var cg config.GameConfig
config.MustLoad(*configFile, &cg)
err := os.Setenv("ZONEINFO", filepath.Join("./", "zoneinfo.zip"))
if err != nil {
panic(err)
}
ctx := svc.NewServiceContext(&c, &cg)
svr := server.NewUserCenterServer(ctx)

Loading…
Cancel
Save