chore: enable a few linters
Description
This MR enables copyloopvar, makezero, mirror, and nilnesserr linters in golangci-lint configuration.
copyloopvar detects constructs like test := test that can be removed since Go 1.22.
makezero founds issue in the Remotes.UniqueHosts method.
mirror suggests simplifying tmpFile.Write([]byte(defaultContent)) to tmpFile.WriteString(defaultContent).
nilnesserr detects issue with nil error here:
if opts.IO.StartPager() != nil {
return fmt.Errorf("failed to start pager: %q", err)
}
opts.IO.StartPager() returns an error and it should be returned.
How has this been tested?
$ golangci-lint run
$ make test