Get file size given file descriptor in Go

Clash Royale CLAN TAG #URR8PPP Get file size given file descriptor in Go If given a path, I would use this to get file size file, _ := os.Open(path) fi, _ := file.Stat() fsuze := fi.Size() But if only given fd , how can I get the file size? Is there any way in golang like fd lseek(fd, 0, SEEK_END) in C Can I get File stat without opening the file? Just like C, given path int stat(const char*path, struct stat *statbuf) I just looked into the golang os package and found func Stat(name string) (FileInfo, error) just like C's int stat(const char*path, struct stat *statbuf) Just to clarify, does fd mean an integer file descriptor, as one would get from open() in C? – Jonathon Reinhart 41 mins ago fd open() Yes. I get this fd by calling os.File.stat().Fd() ...