// WithSelfForcePoll is like WithSelf but forces a poll. I.e., it will always go to the server for
// a merkle check, regardless of when the existing self was cached.
160678
func (m *CachedFullSelf) WithSelfForcePoll(ctx context.Context, f func(u *User) error) error {
	arg := NewLoadUserArg(m.G()).WithPublicKeyOptional().WithSelf(true).WithNetContext(ctx).WithForcePoll(true)
	return m.WithUser(arg, f)
}
475299
func (e *merryErr) WithValue(key, value interface{}) Error {
	if e == nil {
		return nil
	}
	return &merryErr{
		err:   e,
		key:   key,
		value: value,
	}
}
1127284
func AccountWithSecret(bundle *stellar1.Bundle, accountID stellar1.AccountID) (*WithSecret, error) {
	secret, ok := bundle.AccountBundles[accountID]
	if !ok {
		return nil, libkb.NotFoundError{}
	}
	// ugh
	var found *stellar1.BundleEntry
	for _, a := range bundle.Accounts {
		if a.AccountID == accountID {
			found = &a
			break
		}
	}
	if found == nil {
		// this is bad: secret found but not visible portion
		return nil, libkb.NotFoundError{}
	}
	return &WithSecret{
		AccountID: found.AccountID,
		Mode:      found.Mode,
		Name:      found.Name,
		Revision:  found.AcctBundleRevision,
		Signers:   secret.Signers,
	}, nil
}
1198066
func AttributeForDistinctEqual(o1, o2 *AttributeForDistinctOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1032084
func (ai *Amqp) WithExchange(exchange, kind string, durable bool) error {
	if ai.passiveExchange {
		return ai.ch.ExchangeDeclarePassive(exchange, kind, durable, false, false, false, nil)
	}

	return ai.ch.ExchangeDeclare(exchange, kind, durable, false, false, false, nil)
}
1353070
func (builder *FetchValueCommandBuilder) WithConflictResolver(resolver ConflictResolver) *FetchValueCommandBuilder {
	builder.resolver = resolver
	return builder
}
461649
func withHealthCheckFunc(f internal.HealthChecker) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.healthCheckFunc = f
	})
}
212923
func (builder *StoreValueCommandBuilder) WithConflictResolver(resolver ConflictResolver) *StoreValueCommandBuilder {
	builder.resolver = resolver
	return builder
}
443617
func ServicePoll(config *poll.Settings) {
	// Override the default pollSettings for `service` resource here ...
	config.Timeout = 30 * time.Second
	config.Delay = 100 * time.Millisecond
	if runtime.GOARCH == "arm64" || runtime.GOARCH == "arm" {
		config.Timeout = 90 * time.Second
	}
}
447842
func (cs *ConsensusState) isProposalComplete() bool {
	if cs.Proposal == nil || cs.ProposalBlock == nil {
		return false
	}
	// we have the proposal. if there's a POLRound,
	// make sure we have the prevotes from it too
	if cs.Proposal.POLRound < 0 {
		return true
	}
	// if this is false the proposer is lying or we haven't received the POL yet
	return cs.Votes.Prevotes(cs.Proposal.POLRound).HasTwoThirdsMajority()

}
1295351
func (gv GroupVersion) WithKind(kind string) GroupVersionKind {
	return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind}
}
207150
func (s *Server) WithCertPool(pool *x509.CertPool) *Server {
	s.certPool = pool
	return s
}
194357
func WithIgnoreRevisions(parent context.Context, value ...bool) context.Context {
	v := true
	if len(value) == 1 {
		v = value[0]
	}
	return context.WithValue(contextOrBackground(parent), keyIgnoreRevs, v)
}
1105142
func MakeVoteInsertStatement(checked, updateOnConflict bool) string {
	if !checked {
		return InsertVoteRow
	}
	if updateOnConflict {
		return UpsertVoteRow
	}
	return InsertVoteRowOnConflictDoNothing
}
708193
func (c *Ctx) WithValue(key interface{}, val interface{}) {
	c.request = c.request.WithContext(context.WithValue(c.request.Context(), key, val)) // temporarily shallow copying to avoid problems with external libraries
}
66662
func WithServerName(serverName string) Option {
	return func(o *Orderer) error {
		o.serverName = serverName

		return nil
	}
}
688141
func WithTerminal(ctx context.Context, isTerm bool) context.Context {
	return context.WithValue(ctx, ctxKeyTerminal, isTerm)
}