feature(安装): 安装时新增选择语言包

- 安装时新增选择语言包
- 优化代码并删除无用的代码
This commit is contained in:
新亮
2021-06-26 12:06:20 +08:00
parent 44ca2698cd
commit eba8929b4d
60 changed files with 706 additions and 488 deletions

View File

@@ -63,6 +63,10 @@ type Config struct {
Secret string `toml:"secret"`
Length int `toml:"length"`
} `toml:"hashids"`
Language struct {
Local string `toml:"local"`
} `toml:"language"`
}
func init() {

View File

@@ -7,6 +7,9 @@ const (
// ProjectName 项目名称
ProjectName = "go-gin-api"
// ProjectDomain 项目域名
ProjectDomain = "http://127.0.0.1"
// ProjectPort 项目端口
ProjectPort = ":9999"
@@ -33,4 +36,10 @@ const (
// RedisKeyPrefixSignature Redis Key 前缀 - 签名验证信息
RedisKeyPrefixSignature = ProjectName + ":signature:"
// ZhCN 简体中文 - 中国
ZhCN = "zh-cn"
// EnUS 英文 - 美国
EnUS = "en-us"
)

View File

@@ -7,6 +7,9 @@
expireduration = 24
secret = "i1ydX9RtHyuJTrw7frcu"
[language]
local = "zh-cn"
[mail]
host = "smtp.163.com"
pass = ""
@@ -24,13 +27,13 @@
[mysql.read]
addr = "127.0.0.1:3306"
name = "go_gin_api"
pass = "root"
pass = "123456789"
user = "root"
[mysql.write]
addr = "127.0.0.1:3306"
name = "go_gin_api"
pass = "root"
pass = "123456789"
user = "root"
[redis]