// StringVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a string variable in which to store the value of the flag.
514581
func (f *FlagSet) StringVar(p *string, name string, value string, usage string) {
	f.Var(newStringValue(value, p), name, usage)
}
1330152
func (cmd *Cmd) GetVar(k string) (string, bool) {
	return cmd.context.GetVar(k)
}
773019
func (fs *FlagSet) String(names []string, value string, usage string) *string {
	p := new(string)
	fs.StringVar(p, names, value, usage)
	return p
}
360513
func (p *Param) StringTmpVarCode() string {
	errvar := p.fn.Rets.ErrorVarName()
	if errvar == "" {
		errvar = "_"
	}
	tmp := p.tmpVar()
	const code = `var %s %s
	%s, %s = %s(%s)`
	s := fmt.Sprintf(code, tmp, p.fn.StrconvType(), tmp, errvar, p.fn.StrconvFunc(), p.Name)
	if errvar == "-" {
		return s
	}
	const morecode = `
	if %s != nil {
		return
	}`
	return s + fmt.Sprintf(morecode, errvar)
}
1256444
func (fv FlagValues) String(name string, defaultValue string) string {
	value, found := fv[name]
	if !found {
		return defaultValue
	}
	return value
}
831586
func IPVar(p *net.IP, name string, value net.IP, usage string) {
	CommandLine.VarP(newIPValue(value, p), name, "", usage)
}
226128
func Float64Var(p *float64, name string, value float64, usage string) {
	CommandLine.Var(newFloat64Value(value, p), name, usage)
}
426625
func (*GoFlags) IntVar(i *int, o string, d int, c string) {
	flag.IntVar(i, o, d, c)
}
618575
func Float64Var(flagVar *float64, short string, long string, value float64, usage string) *float64 {
	flag.Float64Var(flagVar, short, value, usage)
	flag.Float64Var(flagVar, long, value, usage)
	addKeyDescription(short, long, value, usage)
	return flagVar
}
665547
func (p *parserMixin) BytesVar(target *units.Base2Bytes) {
	p.SetValue(newBytesValue(target))
}
906525
func (fs *FlagSet) IntVar(p *int, names []string, value int, usage string) {
	fs.Var(newIntValue(value, p), names, usage)
}
1350230
func (cmd *CLI) DefineStringFlag(name string, value string, usage string) *string {
	p := new(string)
	cmd.DefineStringFlagVar(p, name, value, usage)
	return p
}
341736
func (v Variable) String() string {
	return fmt.Sprintf("{Variable (%s): %+v}", v.Type, v.Value)
}
552914
func (*GoFlags) StringList(o, d, c string) *[]*string {
	return &[]*string{flag.String(o, d, c)}
}
561854
func varNameForVar(raw config.InterpolatedVariable) string {
	switch v := raw.(type) {
	case *config.ModuleVariable:
		return fmt.Sprintf("module.%s.output.%s", v.Name, v.Field)
	case *config.ResourceVariable:
		return v.ResourceId()
	case *config.UserVariable:
		return fmt.Sprintf("var.%s", v.Name)
	default:
		return ""
	}
}
949043
func Uint64Var(p *uint64, name string, value uint64, usage string) {
	CommandLine.Var(newUint64Value(value, p), name, usage)
}
1119590
func (a *stmtCompiler) defineVar(ident *ast.Ident, t Type) *Variable {
	v, prev := a.block.DefineVar(ident.Name, ident.Pos(), t)
	if prev != nil {
		if prev.Pos().IsValid() {
			a.diagAt(ident.Pos(), "variable %s redeclared in this block\n\tprevious declaration at %s", ident.Name, a.fset.Position(prev.Pos()))
		} else {
			a.diagAt(ident.Pos(), "variable %s redeclared in this block", ident.Name)
		}
		return nil
	}

	// Initialize the variable
	index := v.Index
	if v.Index >= 0 {
		a.push(func(v *Thread) { v.f.Vars[index] = t.Zero() })
	}
	return v
}