"fs.sys.Size" (fs being fileStat in the os package) returns the apparent size of a file. This isn't ideal when dealing with sparse files.
Is there a way to get the actual file size in GO? Or all applications are bound to get the converted metadata that represent empty blocks as real ones?
Looks like the Stat_t structure filled using stat/fstat calls from the Syscall package is all you need. Just multiply Blocks by 512 to get the disk space consumed.