// 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.
438084
func (fs *FlagSet) StringVar(p *string, names []string, value string, usage string) {
	fs.Var(newStringValue(value, p), names, usage)
}
1211473
func Var(r *http.Request, n string) string {
	vars.Lock()
	defer vars.Unlock()

	if session, ok := vars.sessions[r]; ok {
		if v, ok := session[n]; ok {
			return v
		}
	}
	return ""
}
539720
func (cmd *CLI) DefineInt64FlagVar(p *int64, name string, value int64, usage string) {
	cmd.DefineFlag(values.NewInt64(value, p), name, usage)
}
32174
func (c Flags) String(name string) string {
	f := c.Get(name)
	if f == nil {
		return ""
	}
	return *f.Value.(*string) //*f.Value if string
}
742158
func DurationVar(p *time.Duration, names []string, value time.Duration, usage string) {
	CommandLine.Var(newDurationValue(value, p), names, usage)
}
440647
func (r *Regression) GetVar(i int) string {
	x := r.names.vars[i]
	if x == "" {
		s := []string{"X", strconv.Itoa(i)}
		return strings.Join(s, "")
	}
	return x
}
604542
func IntSliceVar(p *[]int, value []int, name, usage string) {
	flag.Var(NewIntSlice(value, p), name, usage)
}
223045
func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {
	f.Var(newInt64Value(value, p), name, usage)
}
620980
func (fs *FlagSet) Float64Var(p *float64, names []string, value float64, usage string) {
	fs.Var(newFloat64Value(value, p), names, usage)
}
705694
func getStringArrayVar(key string, defaultVal string) []string {
	valueString := os.Getenv(key)

	if valueString == "" {
		valueString = defaultVal
	}

	valueSlice := splitDelimmitedString(valueString, stringListDelimitRegex)

	return valueSlice
}
1157791
func (v *Variable) String() string {
	if l := len(v.Data); l > 0 && v.Data[l-1] == 0x00 {
		return string(v.Data[:l-1])
	}
	return string(v.Data)
}
1192072
func (p *Param) tmpVar() string {
	if p.tmpVarIdx < 0 {
		p.tmpVarIdx = p.fn.curTmpVarIdx
		p.fn.curTmpVarIdx++
	}
	return fmt.Sprintf("_p%d", p.tmpVarIdx)
}
514701
func (cmd *CLI) DefineIntFlagVar(p *int, name string, value int, usage string) {
	cmd.DefineFlag(values.NewInt(value, p), name, usage)
}
174926
func variableNV(ln *line) (string, string, error) {
	s := strings.TrimSpace(ln.s)

	if !strings.HasPrefix(s, dollarMark) {
		return "", "", fmt.Errorf("variable must start with %q [line: %d]", dollarMark, ln.no)
	}

	nv := strings.SplitN(s, space, 2)

	if len(nv) < 2 {
		return "", "", fmt.Errorf("variable's name and value should be divided by a space [line: %d]", ln.no)
	}

	if !strings.HasSuffix(nv[0], colon) {
		return "", "", fmt.Errorf("variable's name should end with a colon [line: %d]", ln.no)
	}

	return strings.TrimSuffix(strings.TrimPrefix(nv[0], dollarMark), colon), nv[1], nil
}
1334292
func (getter Getter) GetVar(name string) (Value, bool) {
	if getter == nil {
		return nilValue, false
	}
	v, ok := getter[name]
	return v, ok
}
595807
func Uint16Var(p *uint16, names []string, value uint16, usage string) {
	CommandLine.Var(newUint16Value(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
}