Skip to content

Commit

Permalink
Fix lint/go errors (gosimple)
Browse files Browse the repository at this point in the history
Signed-off-by: karamaru-alpha <[email protected]>
  • Loading branch information
karamaru-alpha committed Oct 19, 2023
1 parent dbc2819 commit 7351829
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pkg/app/piped/driftdetector/cloudrun/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func makeSyncState(r *provider.DiffResult, commit string) model.ApplicationSyncS
}
}

shortReason := fmt.Sprintf("The service manifest doesn't be synced")
shortReason := "The service manifest doesn't be synced"
if len(commit) >= 7 {
commit = commit[:7]
}
Expand Down
16 changes: 4 additions & 12 deletions pkg/app/piped/platformprovider/terraform/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ func (t *Terraform) Init(ctx context.Context, w io.Writer) error {
"init",
}
args = append(args, t.makeCommonCommandArgs()...)
for _, f := range t.options.initFlags {
args = append(args, f)
}
args = append(args, t.options.initFlags...)

Check warning on line 123 in pkg/app/piped/platformprovider/terraform/terraform.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/platformprovider/terraform/terraform.go#L123

Added line #L123 was not covered by tests

cmd := exec.CommandContext(ctx, t.execPath, args...)
cmd.Dir = t.dir
Expand Down Expand Up @@ -278,9 +276,7 @@ func (t *Terraform) Plan(ctx context.Context, w io.Writer) (PlanResult, error) {
"-detailed-exitcode",
}
args = append(args, t.makeCommonCommandArgs()...)
for _, f := range t.options.planFlags {
args = append(args, f)
}
args = append(args, t.options.planFlags...)

Check warning on line 279 in pkg/app/piped/platformprovider/terraform/terraform.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/platformprovider/terraform/terraform.go#L279

Added line #L279 was not covered by tests

var buf bytes.Buffer
stdout := io.MultiWriter(w, &buf)
Expand Down Expand Up @@ -316,9 +312,7 @@ func (t *Terraform) makeCommonCommandArgs() (args []string) {
for _, f := range t.options.varFiles {
args = append(args, fmt.Sprintf("-var-file=%s", f))
}
for _, f := range t.options.sharedFlags {
args = append(args, f)
}
args = append(args, t.options.sharedFlags...)

Check warning on line 315 in pkg/app/piped/platformprovider/terraform/terraform.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/platformprovider/terraform/terraform.go#L315

Added line #L315 was not covered by tests
return
}

Expand Down Expand Up @@ -398,9 +392,7 @@ func (t *Terraform) Apply(ctx context.Context, w io.Writer) error {
"-input=false",
}
args = append(args, t.makeCommonCommandArgs()...)
for _, f := range t.options.applyFlags {
args = append(args, f)
}
args = append(args, t.options.applyFlags...)

Check warning on line 395 in pkg/app/piped/platformprovider/terraform/terraform.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/platformprovider/terraform/terraform.go#L395

Added line #L395 was not covered by tests

cmd := exec.CommandContext(ctx, t.execPath, args...)
cmd.Dir = t.dir
Expand Down
1 change: 0 additions & 1 deletion pkg/model/application_live_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (s *ApplicationLiveStateSnapshot) DetermineAppHealthStatus() {
case ApplicationKind_CLOUDRUN:
s.determineCloudRunAppHealthStatus()
}
return
}

func (s *ApplicationLiveStateSnapshot) determineKubernetesAppHealthStatus() {
Expand Down

0 comments on commit 7351829

Please sign in to comment.