cmd/cover: check error

The variable was assigned but not used, as caught by a tool
written by gorden.klaus@gmail.com.

Change-Id: I84ca3d00896287a35561bd122a0cf64212854a86
Reviewed-on: https://go-review.googlesource.com/10610
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Rob Pike 2015-06-01 21:02:04 -07:00
parent 68353d2750
commit 27e692e6ec
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ func TestCover(t *testing.T) {
lines[i] = bytes.Replace(line, []byte("LINE"), []byte(fmt.Sprint(i+1)), -1)
}
err = ioutil.WriteFile(coverInput, bytes.Join(lines, []byte("\n")), 0666)
if err != nil {
t.Fatal(err)
}
// defer removal of test_line.go
if !debug {