aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-07-10 06:17:14 +0200
committerGitHub <noreply@github.com>2020-07-10 06:17:14 +0200
commite626226dea1d1e843b5295519f40cecdaa21004c (patch)
treef2ba63ba7b70e4c399630e08830772c883559804 /remote.go
parent58ac8636795fa45f6dbb3dcd6f3c3ebb01da8627 (diff)
parentd872dd9af2091b0f2d2cf1e80827a3a8e18be64f (diff)
downloadgo-git-e626226dea1d1e843b5295519f40cecdaa21004c.tar.gz
Merge pull request #123 from cristaloleg/check-err-fix
*: skip error check explicitly
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/remote.go b/remote.go
index e642c57..2c5d806 100644
--- a/remote.go
+++ b/remote.go
@@ -218,9 +218,9 @@ func (r *Remote) newReferenceUpdateRequest(
if o.Progress != nil {
req.Progress = o.Progress
if ar.Capabilities.Supports(capability.Sideband64k) {
- req.Capabilities.Set(capability.Sideband64k)
+ _ = req.Capabilities.Set(capability.Sideband64k)
} else if ar.Capabilities.Supports(capability.Sideband) {
- req.Capabilities.Set(capability.Sideband)
+ _ = req.Capabilities.Set(capability.Sideband)
}
}
@@ -1037,11 +1037,13 @@ func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
}
var resultRefs []*plumbing.Reference
- refs.ForEach(func(ref *plumbing.Reference) error {
+ err = refs.ForEach(func(ref *plumbing.Reference) error {
resultRefs = append(resultRefs, ref)
return nil
})
-
+ if err != nil {
+ return nil, err
+ }
return resultRefs, nil
}