fix and code

This commit is contained in:
2025-03-17 15:59:09 +08:00
parent 8e8e6780c5
commit 15d9896c1d
32 changed files with 988 additions and 313 deletions

View File

@@ -4,13 +4,14 @@ import (
"context"
"flag"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"os"
"tydata-server/app/user/cmd/api/internal/config"
"tydata-server/app/user/cmd/api/internal/handler"
"tydata-server/app/user/cmd/api/internal/queue"
"tydata-server/app/user/cmd/api/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)
@@ -25,9 +26,9 @@ func main() {
// 根据 ENV 加载不同的配置文件
var defaultConfigFile string
if env == "development" {
defaultConfigFile = "etc/main.dev.yaml" // 开发环境配置
defaultConfigFile = "app/user/cmd/api/etc/main.dev.yaml"
} else {
defaultConfigFile = "etc/main.yaml" // 生产环境配置
defaultConfigFile = "app/user/cmd/api/etc/main.yaml"
}
configFile := flag.String("f", defaultConfigFile, "the config file")
flag.Parse()