完成nacos和数据库等配置文件

This commit is contained in:
2022-05-25 18:43:49 +08:00
parent 9bb43f4484
commit af58c03c7c
9 changed files with 128 additions and 0 deletions

9
config/nacos.go Normal file
View File

@@ -0,0 +1,9 @@
package config
// nacosConfig Nacos配置
type nacosConfig struct {
Host string `env:"NACOS_HOST"` // 主机
Port uint64 `env:"NACOS_PORT" envDefault:"8848"` // 端口
NamespaceId string `env:"NACOS_NAMESPACE"` // 命名空间
CenterConfigName string `env:"NACOS_CONFIG_NAME" envDefault:"gtest.yml"` // 外部配置文件名,多个以逗号隔开
}