fgetpos在Go中可用吗? 想要找到File.Position

I have a File and I want to find the file offset/position, what would be fgetpos in stdio. I can't seem to find it in http://golang.org/pkg/io/. Do I have to count it myself or is there a build in method?

You should be able to do a Seek() to 0 bytes from the current position, which returns the resulting position. I'm not 100% sure the result is the absolute position you're after, but I would expect it to be.

offset, err := f.Seek(0, os.SEEK_CUR)
if err != nil {
    // handle error
}
// offset is the current position