From 3335f62a8f8d952215d71915b628d27e44678bd2 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 3 Oct 2025 18:38:01 +0200 Subject: [PATCH] Fix linter warnings --- cmd/restic/cmd_backup.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/cmd_backup.go b/cmd/restic/cmd_backup.go index 9cd22ae01..5e884de87 100644 --- a/cmd/restic/cmd_backup.go +++ b/cmd/restic/cmd_backup.go @@ -219,7 +219,7 @@ func readLines(filename string, stdin io.ReadCloser) ([]string, error) { // or stdin if filename is "-". Each filename is terminated by a zero byte, // which is stripped off. func readFilenamesFromFileRaw(filename string, stdin io.ReadCloser) (names []string, err error) { - var f io.ReadCloser = stdin + f := stdin if filename != "-" { if f, err = os.Open(filename); err != nil { return nil, err @@ -580,7 +580,7 @@ func runBackup(ctx context.Context, opts BackupOptions, gopts GlobalOptions, ter printer.V("read data from stdin") } filename := path.Join("/", opts.StdinFilename) - var source io.ReadCloser = term.InputRaw() + source := term.InputRaw() if opts.StdinCommand { source, err = fs.NewCommandReader(ctx, args, printer.E) if err != nil {