优化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
+4 -3
View File
@@ -1,10 +1,11 @@
package config
type Timer struct {
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
WithSeconds bool `mapstructure:"with_seconds" json:"with_seconds" yaml:"with_seconds"` // 是否精确到秒
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"`
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
WithSeconds bool `mapstructure:"with_seconds" json:"with_seconds" yaml:"with_seconds"` // 是否精确到秒
}
type Detail struct {