Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nvanthao committed Oct 30, 2024
1 parent 68359fa commit f8e34bb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/analyze/host_filesystem_performance.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ func (a *AnalyzeHostFilesystemPerformance) analyzeSingleNode(content collectedCo

for _, outcome := range hostAnalyzer.Outcomes {

if outcome.Fail != nil {
switch {
case outcome.Fail != nil:
if outcome.Fail.When == "" {
result.IsFail = true
result.Message = renderFSPerfOutcome(outcome.Fail.Message, fsPerf)
Expand All @@ -211,7 +212,7 @@ func (a *AnalyzeHostFilesystemPerformance) analyzeSingleNode(content collectedCo

return []*AnalyzeResult{result}, nil
}
} else if outcome.Warn != nil {
case outcome.Warn != nil:
if outcome.Warn.When == "" {
result.IsWarn = true
result.Message = renderFSPerfOutcome(outcome.Warn.Message, fsPerf)
Expand All @@ -232,7 +233,7 @@ func (a *AnalyzeHostFilesystemPerformance) analyzeSingleNode(content collectedCo

return []*AnalyzeResult{result}, nil
}
} else if outcome.Pass != nil {
case outcome.Pass != nil:
if outcome.Pass.When == "" {
result.IsPass = true
result.Message = renderFSPerfOutcome(outcome.Pass.Message, fsPerf)
Expand All @@ -253,7 +254,8 @@ func (a *AnalyzeHostFilesystemPerformance) analyzeSingleNode(content collectedCo

return []*AnalyzeResult{result}, nil
}

default:
return nil, errors.New("unexpected outcome")
}
}

Expand Down

0 comments on commit f8e34bb

Please sign in to comment.