func getSegmentSize(dir string, index int) (int64, error) {
	i := int64(-1)
	fi, err := os.Stat(wal.SegmentName(dir, index))
	if err == nil {
		i = fi.Size()
	}
	return i, err
}
func getSegmentSize(dir string, index int) (int64, error) {
	i := int64(-1)
	fi, err := os.Stat(wal.SegmentName(dir, index))
	if err == nil {
		i = fi.Size()
	}
	return i, err
}
func getSegmentSize ( dir string , index int ) ( int64 , error ) { i := int64 ( - 1 ) fi , err := os . Stat ( wal . SegmentName ( dir , index ) ) if err == nil { i = fi . Size ( ) } return i , err }
// Get size of segment.
Get size of segment .