// PushReturn calls PushDefaultHook with a function that returns the given
// values.
427170
func (f *BackoffNextIntervalFunc) PushReturn(r0 time.Duration) {
	f.PushHook(func() time.Duration {
		return r0
	})
}
1012412
func (p *Pusher) Push(ctx context.Context) error {
	if p.PushFormat == "" {
		p.PushFormat = expfmt.FmtText
	}

	resps := make(chan (error))
	go func() {
		resps <- p.push(ctx)
	}()

	select {
	case err := <-resps:
		return err
	case <-ctx.Done():
		return ctx.Err()
	}
}
763109
func (_m *APIClient) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) {
	ret := _m.Called(ctx, name, registryAuth)

	var r0 io.ReadCloser
	if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok {
		r0 = rf(ctx, name, registryAuth)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(io.ReadCloser)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, name, registryAuth)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
75543
func (c *Config) AutomaticallyRetryHooks() bool {
	if val, ok := c.defined["automatically-retry-hooks"].(bool); !ok {
		return true
	} else {
		return val
	}
}
333795
func (f *BackoffCloneFunc) SetDefaultReturn(r0 backoff.Backoff) {
	f.SetDefaultHook(func() backoff.Backoff {
		return r0
	})
}
1360709
func (r *Rets) SetReturnValuesCode() string {
	if r.Name == "" && !r.ReturnsError {
		return ""
	}
	retvar := "r0"
	if r.Name == "" {
		retvar = "r1"
	}
	errvar := "_"
	if r.ReturnsError {
		errvar = "e1"
	}
	return fmt.Sprintf("%s, _, %s := ", retvar, errvar)
}
227260
func (vf *vindexFunc) PushFilter(pb *primitiveBuilder, filter sqlparser.Expr, whereType string, _ builder) error {
	if vf.eVindexFunc.Opcode != engine.VindexNone {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (multiple filters)")
	}

	// Check LHS.
	comparison, ok := filter.(*sqlparser.ComparisonExpr)
	if !ok {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (not a comparison)")
	}
	if comparison.Operator != sqlparser.EqualStr {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (not equality)")
	}
	colname, ok := comparison.Left.(*sqlparser.ColName)
	if !ok {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (lhs is not a column)")
	}
	if !colname.Name.EqualString("id") {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (lhs is not id)")
	}

	// Check RHS.
	// We have to check before calling NewPlanValue because NewPlanValue allows lists also.
	if !sqlparser.IsValue(comparison.Right) {
		return errors.New("unsupported: where clause for vindex function must be of the form id = <val> (rhs is not a value)")
	}
	var err error
	vf.eVindexFunc.Value, err = sqlparser.NewPlanValue(comparison.Right)
	if err != nil {
		return fmt.Errorf("unsupported: where clause for vindex function must be of the form id = <val>: %v", err)
	}
	vf.eVindexFunc.Opcode = engine.VindexMap
	return nil
}
169727
func (s *PutItemInput) SetReturnValues(v string) *PutItemInput {
	s.ReturnValues = &v
	return s
}
887106
func (l *CList) PushBack(v interface{}) *CElement {
	l.mtx.Lock()

	// Construct a new element
	e := &CElement{
		prev:       nil,
		prevWg:     waitGroup1(),
		prevWaitCh: make(chan struct{}),
		next:       nil,
		nextWg:     waitGroup1(),
		nextWaitCh: make(chan struct{}),
		removed:    false,
		Value:      v,
	}

	// Release waiters on FrontWait/BackWait maybe
	if l.len == 0 {
		l.wg.Done()
		close(l.waitCh)
	}
	if l.len >= l.maxLen {
		panic(fmt.Sprintf("clist: maximum length list reached %d", l.maxLen))
	}
	l.len++

	// Modify the tail
	if l.tail == nil {
		l.head = e
		l.tail = e
	} else {
		e.SetPrev(l.tail) // We must init e first.
		l.tail.SetNext(e) // This will make e accessible.
		l.tail = e        // Update the list.
	}
	l.mtx.Unlock()
	return e
}
799523
func (s *RPCServer) FunctionReturnLocations(in FunctionReturnLocationsIn, out *FunctionReturnLocationsOut) error {
	addrs, err := s.debugger.FunctionReturnLocations(in.FnName)
	if err != nil {
		return err
	}
	*out = FunctionReturnLocationsOut{
		Addrs: addrs,
	}
	return nil
}
343233
func (s *Put) SetReturnValuesOnConditionCheckFailure(v string) *Put {
	s.ReturnValuesOnConditionCheckFailure = &v
	return s
}
13463
func (ow *opWrapper) pushObject(vm *duktape.Context) {
	obj := vm.PushObject()

	vm.PushGoFunction(func(ctx *duktape.Context) int { ctx.PushInt(int(ow.op)); return 1 })
	vm.PutPropString(obj, "toNumber")

	vm.PushGoFunction(func(ctx *duktape.Context) int { ctx.PushString(ow.op.String()); return 1 })
	vm.PutPropString(obj, "toString")

	vm.PushGoFunction(func(ctx *duktape.Context) int { ctx.PushBoolean(ow.op.IsPush()); return 1 })
	vm.PutPropString(obj, "isPush")
}
1178079
func (g *Git) PushPull(ctx context.Context, op, remote, branch string) error {
	if !g.IsInitialized() {
		return store.ErrGitNotInit
	}

	if branch == "" {
		branch = g.defaultBranch(ctx)
	}
	if remote == "" {
		remote = g.defaultRemote(ctx, branch)
	}

	if v, err := g.ConfigGet(ctx, "remote."+remote+".url"); err != nil || v == "" {
		return store.ErrGitNoRemote
	}

	if err := g.Cmd(ctx, "gitPush", "pull", remote, branch); err != nil {
		if op == "pull" {
			return err
		}
		out.Yellow(ctx, "Failed to pull before git push: %s", err)
	}
	if op == "pull" {
		return nil
	}

	return g.Cmd(ctx, "gitPush", "push", remote, branch)
}
111726
func (p *pipelineChannel) PushBack(h HandlerTempl) {
	p.Handlers = append(p.Handlers, h)
}
1293688
func (cw *contractWrapper) pushObject(vm *duktape.Context) {
	obj := vm.PushObject()

	// Push the wrapper for contract.Caller
	vm.PushGoFunction(func(ctx *duktape.Context) int {
		ptr := ctx.PushFixedBuffer(20)
		copy(makeSlice(ptr, 20), cw.contract.Caller().Bytes())
		return 1
	})
	vm.PutPropString(obj, "getCaller")

	// Push the wrapper for contract.Address
	vm.PushGoFunction(func(ctx *duktape.Context) int {
		ptr := ctx.PushFixedBuffer(20)
		copy(makeSlice(ptr, 20), cw.contract.Address().Bytes())
		return 1
	})
	vm.PutPropString(obj, "getAddress")

	// Push the wrapper for contract.Value
	vm.PushGoFunction(func(ctx *duktape.Context) int {
		pushBigInt(cw.contract.Value(), ctx)
		return 1
	})
	vm.PutPropString(obj, "getValue")

	// Push the wrapper for contract.Input
	vm.PushGoFunction(func(ctx *duktape.Context) int {
		blob := cw.contract.Input

		ptr := ctx.PushFixedBuffer(len(blob))
		copy(makeSlice(ptr, uint(len(blob))), blob)
		return 1
	})
	vm.PutPropString(obj, "getInput")
}
683871
func (levelDB *LevelDB) PushKeyVal(key string, val string) bool {
	err := levelDB.GolDB.Put([]byte(key), []byte(val), nil)
	if err != nil {
		golerror.Boohoo("Key "+key+" insertion failed. It's value was "+val, false)
		return false
	}
	return true
}
216803
func (l *udpPacketList) PushBackList(m *udpPacketList) {
	if l.head == nil {
		l.head = m.head
		l.tail = m.tail
	} else if m.head != nil {
		udpPacketElementMapper{}.linkerFor(l.tail).SetNext(m.head)
		udpPacketElementMapper{}.linkerFor(m.head).SetPrev(l.tail)

		l.tail = m.tail
	}

	m.head = nil
	m.tail = nil
}