diff --git a/cmd/influxd/inspect/type_conflicts/schema.go b/cmd/influxd/inspect/type_conflicts/schema.go index 7e6a33d137a..6359e1a35db 100644 --- a/cmd/influxd/inspect/type_conflicts/schema.go +++ b/cmd/influxd/inspect/type_conflicts/schema.go @@ -125,7 +125,7 @@ func (s Schema) WriteConflictsFile(filename string) error { func (s Schema) encodeSchema(filename string) (rErr error) { schemaFile, err := os.Create(filename) - defer errors2.Capture(&rErr, schemaFile.Close) + defer errors2.Capture(&rErr, schemaFile.Close)() if err != nil { return fmt.Errorf("unable to create schema file: %w", err) } diff --git a/sqlite/sqlite.go b/sqlite/sqlite.go index 8176b9fd77b..c0110a7b898 100644 --- a/sqlite/sqlite.go +++ b/sqlite/sqlite.go @@ -138,7 +138,7 @@ func (s *SqlStore) BackupSqlStore(ctx context.Context, w io.Writer) (rErr error) if err != nil { return err } - defer errors2.Capture(&rErr, dest.Close) + defer errors2.Capture(&rErr, dest.Close)() if err := backup(ctx, dest, s); err != nil { return err @@ -227,7 +227,7 @@ func (s *SqlStore) RestoreSqlStore(ctx context.Context, r io.Reader) (rErr error if err != nil { return err } - defer errors2.Capture(&rErr, f.Close) + defer errors2.Capture(&rErr, f.Close)() // Copy the contents of r to the temporary file if _, err := io.Copy(f, r); err != nil {