// SetDoneFunc sets a handler which is called when the user presses on the
// following keys: Escape, Enter, Tab, Backtab. The key is passed to the
// handler.
770788
func (t *TextView) SetDoneFunc(handler func(key tcell.Key)) *TextView {
	t.done = handler
	return t
}
1341747
func (r *router) setDefaultHandler(handler MessageHandler) {
	r.Lock()
	defer r.Unlock()
	r.defaultHandler = handler
}
1237409
func setDefGw(pid int, gw, gw6, intfName string) error {
	nsenterPath, err := osexec.LookPath("nsenter")
	if err != nil {
		return err
	}
	routePath, err := osexec.LookPath("route")
	if err != nil {
		return err
	}
	// set default gw
	nsPid := fmt.Sprintf("%d", pid)
	out, err := osexec.Command(nsenterPath, "-t", nsPid, "-n", "-F", "--", routePath, "add",
		"default", "gw", gw, intfName).CombinedOutput()
	if err != nil {
		log.Errorf("unable to set default gw %s. Error: %s - %s", gw, err, out)
		return nil
	}

	if gw6 != "" {
		out, err := osexec.Command(nsenterPath, "-t", nsPid, "-n", "-F", "--", routePath,
			"-6", "add", "default", "gw", gw6, intfName).CombinedOutput()
		if err != nil {
			log.Errorf("unable to set default IPv6 gateway %s. Error: %s - %s", gw6, err, out)
			return nil
		}
	}

	return nil
}
805807
func (s *BatchWriteOperation) SetDetachFromIndex(v *BatchDetachFromIndex) *BatchWriteOperation {
	s.DetachFromIndex = v
	return s
}
48204
func (c *ConfigLocal) SetCodec(co kbfscodec.Codec) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.codec = co
	RegisterOps(c.codec)
}
1112826
func (s *FunctionConfiguration) SetDeadLetterConfig(v *DeadLetterConfig) *FunctionConfiguration {
	s.DeadLetterConfig = v
	return s
}
884887
func (qr *Rule) SetQueryCond(pattern string) (err error) {
	qr.query.name = pattern
	qr.query.Regexp, err = regexp.Compile(makeExact(pattern))
	return
}
385327
func (s *AudioCodecSettings) SetCodec(v string) *AudioCodecSettings {
	s.Codec = &v
	return s
}
357547
func (s *CreateFunctionInput) SetDeadLetterConfig(v *DeadLetterConfig) *CreateFunctionInput {
	s.DeadLetterConfig = v
	return s
}
331112
func (s *UdpOutputSettings) SetBufferMsec(v int64) *UdpOutputSettings {
	s.BufferMsec = &v
	return s
}
323891
func (s *Statement) LitRuneFunc(f func() rune) *Statement {
	t := token{
		typ:     literalRuneToken,
		content: f(),
	}
	*s = append(*s, t)
	return s
}
49439
func (s *BacktrackDBClusterOutput) SetBacktrackedFrom(v time.Time) *BacktrackDBClusterOutput {
	s.BacktrackedFrom = &v
	return s
}
285727
func (c *Runtime) SetAsyncCallStackDepth(maxDepth int) (*gcdmessage.ChromeResponse, error) {
	var v RuntimeSetAsyncCallStackDepthParams
	v.MaxDepth = maxDepth
	return c.SetAsyncCallStackDepthWithParams(&v)
}
255209
func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig {
	s.EncodedKey = &v
	return s
}
292282
func (s *UDPSession) SetReadBuffer(bytes int) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	if s.l == nil {
		if nc, ok := s.conn.(setReadBuffer); ok {
			return nc.SetReadBuffer(bytes)
		}
	}
	return errors.New(errInvalidOperation)
}
120613
func (s *UpdateUserDefinedFunctionInput) SetFunctionInput(v *UserDefinedFunctionInput) *UpdateUserDefinedFunctionInput {
	s.FunctionInput = v
	return s
}
1026856
func SetValueFunc(ctx context.Context, label string, f Func) bool {
	if metadata := ctx.Value(key{}); metadata != nil {
		if m, ok := metadata.(md); ok {
			m[label] = f
			return true
		}
	}
	return false
}