From 3f06121dd01666af37ac5071efcba1f44900a641 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 21 Feb 2018 21:06:19 +0100 Subject: [PATCH] Add Version getter for index reader --- index/index.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index/index.go b/index/index.go index 2689b5691..3cad716c0 100644 --- a/index/index.go +++ b/index/index.go @@ -653,6 +653,11 @@ func newReader(b ByteSlice, c io.Closer) (*Reader, error) { return r, nil } +// Version returns the file format version of the underlying index. +func (r *Reader) Version() int { + return r.version +} + // Range marks a byte range. type Range struct { Start, End int64