2021-02-09 20:17:06 +01:00
|
|
|
package rifs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
"os"
|
|
|
|
|
2021-02-10 01:00:02 +01:00
|
|
|
"github.com/dsoprea/go-logging"
|
2021-02-09 20:17:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetOffset returns the current offset of the Seeker and just panics if unable
|
|
|
|
// to find it.
|
|
|
|
func GetOffset(s io.Seeker) int64 {
|
|
|
|
offsetRaw, err := s.Seek(0, os.SEEK_CUR)
|
|
|
|
log.PanicIf(err)
|
|
|
|
|
|
|
|
return offsetRaw
|
|
|
|
}
|