diff --git a/server/order/order.go b/server/order/order.go index 50d3e0ab..5d0508bc 100644 --- a/server/order/order.go +++ b/server/order/order.go @@ -13,7 +13,6 @@ import ( "fusenapi/server/order/internal/handler" "fusenapi/server/order/internal/svc" - "github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/rest" ) @@ -22,9 +21,8 @@ var configFile = flag.String("f", "etc/order.yaml", "the config file") func main() { flag.Parse() - cfgContent := fsconfig.StartNacosConfig(*configFile, nil) var c config.Config - conf.LoadConfigFromYamlBytes([]byte(cfgContent), &c) + fsconfig.StartNacosConfig(*configFile, &c, nil) c.Timeout = int64(time.Second * 15) server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {