code: 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
  }
docs: // Get size of segment.