Skip to content

Commit a95367e

Browse files
committed
fix lint
1 parent f8cd157 commit a95367e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/provider/adc/adc.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,17 @@ func (d *adcClient) sync(task Task) error {
8080

8181
yaml, err := yaml.Marshal(task.Resources)
8282
if err != nil {
83+
return err
8384
}
8485

8586
tmpFile, err := os.CreateTemp("", "adc-task-*.yaml")
8687
if err != nil {
8788
return err
8889
}
89-
defer os.Remove(tmpFile.Name())
90-
defer tmpFile.Close()
90+
defer func() {
91+
_ = tmpFile.Close()
92+
_ = os.Remove(tmpFile.Name())
93+
}()
9194

9295
log.Debugw("syncing resources", zap.String("file", tmpFile.Name()), zap.String("yaml", string(yaml)))
9396

0 commit comments

Comments
 (0)