Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rtalhouk committed Nov 22, 2023
1 parent 2ce0b6f commit 207e1a3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,10 @@ func (c *AppConfig) shouldLoadFieldSet(fieldSet *FieldSet) (bool, error) {
break
}

var err error

conditionFieldSetKey, conditionFieldSetFieldKeys := loadCondition.FieldDependency()
if conditionFieldSetKey != "" && len(conditionFieldSetFieldKeys) > 0 {
var err error
fieldValues := map[string]any{}

for _, conditionFieldSetFieldKey := range conditionFieldSetFieldKeys {
Expand All @@ -672,8 +673,6 @@ func (c *AppConfig) shouldLoadFieldSet(fieldSet *FieldSet) (bool, error) {
continue
}

var err error

loadFieldSet, err = loadCondition.Load(nil)
if err != nil {
return false, fmt.Errorf("problem getting load condition outcome: %w", err)
Expand All @@ -700,8 +699,9 @@ func (c *AppConfig) shouldLoadField(field *Field, fieldSetKey string) (bool, err
conditionFieldSetKey = fieldSetKey
}

var err error

if conditionFieldSetKey != "" && len(conditionFieldSetFieldKeys) > 0 {
var err error
fieldValues := map[string]any{}

for _, conditionFieldSetFieldKey := range conditionFieldSetFieldKeys {
Expand All @@ -719,8 +719,6 @@ func (c *AppConfig) shouldLoadField(field *Field, fieldSetKey string) (bool, err
continue
}

var err error

loadField, err = loadCondition.Load(nil)
if err != nil {
return false, fmt.Errorf("problem getting load condition outcome: %w", err)
Expand Down

0 comments on commit 207e1a3

Please sign in to comment.