From 05c414a169a75ca933402e5be19a5c4304aa4f00 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 26 Mar 2018 23:18:54 +0200 Subject: *: Use CheckClose with named returns Previously some close errors were losts. This is specially problematic in go-git as lots of work is done here like generating indexes and moving packfiles. Signed-off-by: Javi Fontan --- plumbing/object/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/object/file.go') diff --git a/plumbing/object/file.go b/plumbing/object/file.go index 40b5206..1c5fdbb 100644 --- a/plumbing/object/file.go +++ b/plumbing/object/file.go @@ -44,7 +44,7 @@ func (f *File) Contents() (content string, err error) { } // IsBinary returns if the file is binary or not -func (f *File) IsBinary() (bool, error) { +func (f *File) IsBinary() (bin bool, err error) { reader, err := f.Reader() if err != nil { return false, err -- cgit