// PreRead default reutrn value
189714
func (sm *BaseMiddleware) PreRead(conn IOSession) (bool, interface{}, error) {
	return true, nil, nil
}
495129
func (g *Git) DefaultRevision() (string, string) {
	// Check if there's unstaged changes, if so, return dot
	contents, _ := exec.Command("git", "--git-dir", g.dir, "ls-files", "-m").Output()
	if len(contents) > 0 {
		return "HEAD", "."
	}
	return "HEAD~1", "HEAD"
}
152
func (wp WeightedPages) Prev(cur Page) Page {
	for x, c := range wp {
		if c.Page == cur {
			if x == 0 {
				return wp[len(wp)-1].Page
			}
			return wp[x-1].Page
		}
	}
	return nil
}
1170980
func (kv *protoKeyVal) GetPrevValue(msg proto.Message) (prevValueExist bool, err error) {
	prevVal := kv.pair.GetPrevValue()
	if prevVal == nil {
		return false, nil
	}
	err = kv.serializer.Unmarshal(prevVal, msg)
	if err != nil {
		return true, err
	}
	return true, nil
}
976661
func ReadPreimage(db ethdb.Reader, hash common.Hash) []byte {
	data, _ := db.Get(preimageKey(hash))
	return data
}
1225286
func bdrvPread(child *BdrvChild, offset int64, res interface{}, byt uintptr) error {
	f, err := os.Open(child.Name)
	if err != nil {
		return err
	}

	if offset != 0 {
		f.Seek(offset, 0)
	}

	var buf []byte
	if _, err := f.ReadAt(buf, int64(byt)); err != nil {
		return err
	}

	res = &buf
	return nil
}
1020713
func (f *FollowingList) Prev() (*FollowingList, error) {
	if f.offset <= 0 {
		return nil, NoPrevPageError
	}
	limit := f.limit
	if limit < 1 {
		limit = uint(len(f.Blogs))
	}
	var newOffset uint = f.offset - limit
	if limit >= f.offset {
		newOffset = 0
	}
	return GetFollowing(f.client, newOffset, limit)
}
1174885
func (a *EvaluateOnCallFrameArgs) SetGeneratePreview(generatePreview bool) *EvaluateOnCallFrameArgs {
	a.GeneratePreview = &generatePreview
	return a
}
486815
func AddDefaultOutput(uri string, classes ...LogClass) error {
	// generate it
	lo, err := createOutputWrapper(uri, classes)
	if err != nil {
		return err
	}
	if lo == nil {
		return nil
	}

	// Lock the default outputs
	defaultOutputMutex.Lock()
	defer defaultOutputMutex.Unlock()
	defaultOutputs = append(defaultOutputs, lo)
	return nil
}
1044252
func (s *Scanner) unread() {
	if err := s.buf.UnreadRune(); err != nil {
		panic(err) // this is user fault, we should catch it
	}
	s.srcPos = s.prevPos // put back last position
}
876144
func (_class PoolUpdateClass) Precheck(sessionID SessionRef, self PoolUpdateRef, host HostRef) (_retval LivepatchStatus, _err error) {
	_method := "pool_update.precheck"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPoolUpdateRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_hostArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "host"), host)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg, _hostArg)
	if _err != nil {
		return
	}
	_retval, _err = convertEnumLivepatchStatusToGo(_method + " -> ", _result.Value)
	return
}
93236
func (zip GobMeddler) PreRead(fieldAddr interface{}) (scanTarget interface{}, err error) {
	// give a pointer to a byte buffer to grab the raw data
	return new([]byte), nil
}
1237582
func (q *query) CommitPrepared(ctx context.Context, request *querypb.CommitPreparedRequest) (response *querypb.CommitPreparedResponse, err error) {
	defer q.server.HandlePanic(&err)
	ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx),
		request.EffectiveCallerId,
		request.ImmediateCallerId,
	)
	if err := q.server.CommitPrepared(ctx, request.Target, request.Dtid); err != nil {
		return nil, vterrors.ToGRPC(err)
	}

	return &querypb.CommitPreparedResponse{}, nil
}
1095325
func (a *EvaluateArgs) SetGeneratePreview(generatePreview bool) *EvaluateArgs {
	a.GeneratePreview = &generatePreview
	return a
}
989855
func (p *Pager) Prev() *Pager {
	if !p.HasPrev() {
		return nil
	}
	return p.pagers[p.PageNumber()-2]
}
487613
func (c *Config) ReadDefault(id string, defaultValue string) string {
	val, ok := c.Options[id]
	if !ok {
		return defaultValue
	}
	return val
}
211922
func (s *ShapeIndexIterator) Prev() bool {
	if s.position <= 0 {
		return false
	}

	s.position--
	s.refresh()
	return true
}