// StaySetVariablesWrite prints the stay-set variables for which
// the passed function returns true to the passed writer.
341863
func StaySetVariablesWrite(w io.Writer, ff func(StaySetVariable) bool) error {
	fmt.Fprint(w, ssvTLine)
	fmt.Fprint(w, ssvHeader)
	fmt.Fprint(w, ssvTLine)
	if err := StaySetVariablesDo(func(ssv StaySetVariable) {
		if ff(ssv) {
			fmt.Fprintf(w, ssvFormat, ssv.ID(), ssv.Count(), ssv.ActValue(), ssv.MinValue(), ssv.MaxValue(), ssv.AvgValue())
		}
	}); err != nil {
		return err
	}
	fmt.Fprint(w, ssvTLine)
	return nil
}
730011
func Variables(dwarf *dwarf.Data, off dwarf.Offset, pc RelAddr, line int, onlyVisible bool) *VariableReader {
	reader := dwarf.Reader()
	reader.Seek(off)
	return &VariableReader{dwarf: dwarf, reader: reader, entry: nil, depth: 0, onlyVisible: onlyVisible, pc: uint64(pc), line: line, err: nil}
}
763220
func (p *UNSUBSCRIBE) setVariableHeader() {
	// Append the Packet Identifier to the variable header.
	p.variableHeader = append(p.variableHeader, encodeUint16(p.PacketID)...)
}
372038
func (s *UpdateAppInput) SetEnvironmentVariables(v map[string]*string) *UpdateAppInput {
	s.EnvironmentVariables = v
	return s
}
1312198
func SetVariablesFilter(f IDFilter) IDFilter {
	monitor.RLock()
	defer monitor.RUnlock()
	return monitor.backend().SetVariablesFilter(f)
}
928145
func (s *CreateStageInput) SetVariables(v map[string]*string) *CreateStageInput {
	s.Variables = v
	return s
}
516661
func SetGlobalVariable(endpoint, key string, value interface{}) error {
	var inst *Instance
	var exists bool
	if inst, exists = connectionPool[endpoint]; !exists {
		return errNotRegistered
	}
	if !globalKeyExp.MatchString(key) {
		return errKeyInvalid
	}
	if _, err := inst.connection.Exec(fmt.Sprintf("SET GLOBAL %s=?", key), value); err != nil {
		return err
	}
	return nil
}
238349
func (b *stdBackend) ReadVariable(id string) (StaySetVariable, error) {
	resp, err := b.command(cmdStaySetVariableRead, id)
	if err != nil {
		return nil, err
	}
	return resp.(StaySetVariable), nil
}
138007
func (v *MrbValue) SetInstanceVariable(variable string, value *MrbValue) {
	cs := C.CString(variable)
	defer C.free(unsafe.Pointer(cs))
	C._go_mrb_iv_set(v.state, v.value, C.mrb_intern_cstr(v.state, cs), value.value)
}
327825
func (s *Stage) SetVariables(v map[string]*string) *Stage {
	s.Variables = v
	return s
}
533712
func (g *Generator) SetVar(varName, varValue string) {
	g.vars[varName] = varValue
}
736432
func (p *CONNECT) setVariableHeader() {
	// Convert the Keep Alive to the slice.
	keepAlive := encodeUint16(p.keepAlive)

	// Create a variable header and set it to the Packet.
	p.variableHeader = []byte{
		0x00,             // Length MSB (0)
		0x04,             // Length LSB (4)
		0x4D,             // 'M'
		0x51,             // 'Q'
		0x54,             // 'T'
		0x54,             // 'T'
		0x04,             // Level(4)
		p.connectFlags(), // Connect Flags
		keepAlive[0],     // Keep Alive MSB
		keepAlive[1],     // Keep Alive LSB
	}
}
1133396
func (d *Debugger) SetVariableInScope(scope api.EvalScope, symbol, value string) error {
	d.processMutex.Lock()
	defer d.processMutex.Unlock()

	s, err := proc.ConvertEvalScope(d.target, scope.GoroutineID, scope.Frame, scope.DeferredCall)
	if err != nil {
		return err
	}
	return s.SetVariable(symbol, value)
}
1123579
func HasGetSetVarFunc(expr Expression) bool {
	scalaFunc, ok := expr.(*ScalarFunction)
	if !ok {
		return false
	}
	if scalaFunc.FuncName.L == ast.SetVar {
		return true
	}
	if scalaFunc.FuncName.L == ast.GetVar {
		return true
	}
	for _, arg := range scalaFunc.GetArgs() {
		if HasGetSetVarFunc(arg) {
			return true
		}
	}
	return false
}
134968
func setupEnvironmentVariables(a []string) map[string]string {
	r := make(map[string]string)
	for _, s := range a {
		arr := strings.SplitN(s, "=", 2)
		if len(arr) == 2 {
			r[arr[0]] = arr[1]
		}
	}
	return r
}
670212
func (s *GetStageOutput) SetStageVariables(v map[string]*string) *GetStageOutput {
	s.StageVariables = v
	return s
}
624872
func (p *PUBREC) setVariableHeader() {
	// Append the Packet Identifier to the variable header.
	p.variableHeader = append(p.variableHeader, encodeUint16(p.PacketID)...)
}