forked from jasder/antlr
io.Copy surprisingly returns the number of bytes it copies so we need to explicitly ignore that.
This commit is contained in:
parent
81b8078860
commit
fc8b14b1dc
|
@ -28,9 +28,9 @@ func NewFileStream(fileName string) (*FileStream, error) {
|
|||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
err = io.Copy(buf, f)
|
||||
_, err = io.Copy(buf, f)
|
||||
if err != nil {
|
||||
return nil, er
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fs := new(FileStream)
|
||||
|
|
Loading…
Reference in New Issue