From 046e46a2f360c6c81577981163d6eea3188b7b66 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 25 Dec 2024 17:45:34 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=94=99=E8=AF=AF=E6=98=BE=E7=A4=BA=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/conf/conf.go | 2 +- src/framework/config/config/config.default.yaml | 8 ++++---- src/framework/config/config/config.prod.yaml | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/core/conf/conf.go b/lib/core/conf/conf.go index 7e22479a..e43d3454 100644 --- a/lib/core/conf/conf.go +++ b/lib/core/conf/conf.go @@ -18,7 +18,7 @@ func InitConfig(configFile string) { // 读取配置文件 err := v.ReadInConfig() if err != nil { - fmt.Printf("读取配置文件失败: %v \n", err) + fmt.Printf("failure to read configuration file: %v \n", err) return } } diff --git a/src/framework/config/config/config.default.yaml b/src/framework/config/config/config.default.yaml index 13b1fffc..afda8e35 100644 --- a/src/framework/config/config/config.default.yaml +++ b/src/framework/config/config/config.default.yaml @@ -149,9 +149,9 @@ gorm: type: "mysql" host: "127.0.0.1" port: 3306 - username: "<用户名>" - password: "<密码>" - database: "<数据库>" + username: "" + password: "" + database: "" logging: false # 多个数据源时可以用这个指定默认的数据源 defaultDataSourceName: "default" @@ -162,7 +162,7 @@ redis: default: port: 6379 # Redis port host: "127.0.0.1" # Redis host - password: "<密码>" + password: "" db: 0 # Redis db_num # 多个数据源时可以用这个指定默认的数据源 defaultDataSourceName: "default" diff --git a/src/framework/config/config/config.prod.yaml b/src/framework/config/config/config.prod.yaml index 3125e341..7915c59f 100644 --- a/src/framework/config/config/config.prod.yaml +++ b/src/framework/config/config/config.prod.yaml @@ -6,27 +6,27 @@ server: # security 安全 security: csrf: - # 允许调用的域名地址的,例如:http:/// + # 允许调用的域名地址的,例如:http:/// refererWhiteList: - "127.0.0.1" - - "" + - "" # GORM 数据源 gorm: dataSource: default: type: "mysql" - host: "" + host: "" port: 3306 - username: "<用户名>" - password: "<密码>" - database: "<数据库>" + username: "" + password: "" + database: "" # Redis 缓存数据 redis: dataSource: default: port: 6379 # Redis port - host: "" - password: "<密码>" + host: "" + password: "" db: 0 # Redis db_num