Merge pull request #1633 from c9s/narumi/fix-common-strategy-init

FIX: fix strategy initialization
This commit is contained in:
なるみ 2024-05-16 16:32:22 +08:00 committed by GitHub
commit ad6efaf449
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 4 deletions

View File

@ -38,7 +38,9 @@ type Strategy struct {
}
func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}
return nil
}

View File

@ -42,7 +42,9 @@ func (s *Strategy) Defaults() error {
}
func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}
return nil
}

View File

@ -65,7 +65,9 @@ type Strategy struct {
}
func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}
return nil
}

View File

@ -55,7 +55,9 @@ func (s *Strategy) Defaults() error {
}
func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}
return nil
}