Use BigFile to treat partitioned files as one.
For full documentation see pkg.go.dev.
package main
import (
"fmt"
"github.com/twharmon/bigfile"
)
func main() {
f := bigfile.Open("foo.txt", 10) // max file size of 10 bytes
content := []byte("foo bar baz")
f.Write(content) // notice two files were created
b := make([]byte, len(content))
f.Read(b)
fmt.Println(string(b)) // read "foo bar baz" from two files
}
Make a pull request.