How do I seek for holes and data in a sparse file in golang

82 Views Asked by At

I have a sparse file in linux and I wish to seek to a location containing data within that file. In C unistd.h gives me access to the constant SEEK_DATA for the whence flag of lseek. However I can't find an equivalent constant in golang.

I've examined "io", "os", "x/sys/unix" and did a text search through the golang standard library.

Do I just have to hard code the value in?

0

There are 0 best solutions below