Skip to content

Commit

Permalink
refactor isValidVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
patilpankaj212 committed Dec 4, 2021
1 parent 6c6af1a commit 6d7ce37
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/iac-providers/tfplan/v1/load-file.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,10 @@ func (t *TFPlan) isValidTFPlanJSON(tfjson []byte) error {
}

func isValidVersion(v string) bool {
var result bool = false
var validVersions = getTfPlanFormatVersions()
for _, x := range validVersions {
for _, x := range getTfPlanFormatVersions() {
if x == v {
result = true
break
return true
}
}
return result
return false
}

0 comments on commit 6d7ce37

Please sign in to comment.