Iterating a file object yields one line at a time, which is the difference between a constant footprint and an OOM.
Tag
Snippets tagged io
os.ReadFile replaced ioutil.ReadFile in 1.16 and is the one-liner for small files.
Snippets tagged io
Iterating a file object yields one line at a time, which is the difference between a constant footprint and an OOM.
os.ReadFile replaced ioutil.ReadFile in 1.16 and is the one-liner for small files.