优化config字段排列,使得内存对齐 (#1521)

* 调整字段顺序,解决config包内存对齐问题

* fix(config):修复内存对齐
This commit is contained in:
andywu1998
2023-08-21 18:14:44 +08:00
committed by GitHub
parent 0d5c55a3b5
commit 208346a480
8 changed files with 39 additions and 38 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
package config
type Redis struct {
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
}