code: func (r *raftLog) getIndex(first bool) (uint64, error) {
  	tx, err := r.conn.Begin(false)
  	if err != nil {
  		return 0, err
  	}
  	var (
  		key []byte
  		idx uint64
  	)
  	curs := tx.Bucket(logsBucket).Cursor()
  	if first {
  		key, _ = curs.First()
  	} else {
  		key, _ = curs.Last()
  	}
  	if key != nil {
  		idx = binary.BigEndian.Uint64(key)
  	}
  	tx.Rollback()
  	return idx, nil
  }
docs: // returns either the first (if first is true) or the last
  // index of the logs bucket.