var file, err = os.OpenFile(Big, os.O_RDONLY, 0666)
if err != nil {
log.Fatal(err)
}
defer file.Close()
var info, _ = file.Stat()
var buf = make([]byte, info.Size())
for {
_, err = file.Read(buf)
if err == io.EOF {
break
}
}
i'm dealing with a rather large file (8GB) that i want to completely read into the buf... am i doing this correctly, or does go impose some kind of read limit (i've encountered this in C# unfortunately) where you can only read a certain amount of data from a file?
my bad