[#302] Fix errcheck linter errors

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-01-11 18:14:16 +03:00 committed by Alex Vanin
parent 5e231c515a
commit 04c0c1b8f5

View file

@ -43,7 +43,10 @@ func (t *validatingTarget) WriteHeader(obj *object.RawObject) error {
} }
func (t *validatingTarget) Write(p []byte) (n int, err error) { func (t *validatingTarget) Write(p []byte) (n int, err error) {
t.hash.Write(p) n, err = t.hash.Write(p)
if err != nil {
return
}
return t.nextTarget.Write(p) return t.nextTarget.Write(p)
} }