mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
fix static check errors
This commit is contained in:
parent
b705414d6b
commit
6ca13bfc1e
@ -560,7 +560,7 @@ func shouldRenderPlan(run *tfe.Run) bool {
|
||||
|
||||
func shouldGenerateConfig(out string, run *tfe.Run) bool {
|
||||
return (run.Plan.Status == tfe.PlanErrored || run.Plan.Status == tfe.PlanFinished) &&
|
||||
run.Plan.GeneratedConfiguration == true && len(out) > 0
|
||||
run.Plan.GeneratedConfiguration && len(out) > 0
|
||||
}
|
||||
|
||||
const planDefaultHeader = `
|
||||
|
@ -1044,7 +1044,7 @@ func (m *MockRuns) Create(ctx context.Context, options tfe.RunCreateOptions) (*t
|
||||
r.RefreshOnly = *options.RefreshOnly
|
||||
}
|
||||
|
||||
if options.AllowConfigGeneration != nil && *options.AllowConfigGeneration == true {
|
||||
if options.AllowConfigGeneration != nil && *options.AllowConfigGeneration {
|
||||
r.Plan.GeneratedConfiguration = true
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,8 @@ import (
|
||||
)
|
||||
|
||||
func ShouldWriteConfig(out string) bool {
|
||||
if len(out) == 0 {
|
||||
// No specified out file, so don't write anything.
|
||||
return false
|
||||
}
|
||||
return true
|
||||
// No specified out file, so don't write anything.
|
||||
return len(out) != 0
|
||||
}
|
||||
|
||||
func ValidateTargetFile(out string) (diags tfdiags.Diagnostics) {
|
||||
|
Loading…
Reference in New Issue
Block a user