// TabletTypeVar defines a TabletType flag with the specified name, default value and usage
// string. The argument 'p' points to a tabletType in which to store the value of the flag.
770331
func TabletTypeVar(p *topodatapb.TabletType, name string, defaultValue topodatapb.TabletType, usage string) {
	*p = defaultValue
	flag.Var((*TabletTypeFlag)(p), name, usage)
}
216263
func (*GoFlags) Float64Var(f *float64, o string, d float64, c string) {
	flag.Float64Var(f, o, d, c)
}
595807
func Uint16Var(p *uint16, names []string, value uint16, usage string) {
	CommandLine.Var(newUint16Value(value, p), names, usage)
}
158134
func parseTabletType(param string, types []topodatapb.TabletType) (topodatapb.TabletType, error) {
	tabletType, err := topoproto.ParseTabletType(param)
	if err != nil {
		return topodatapb.TabletType_UNKNOWN, fmt.Errorf("invalid tablet type %v: %v", param, err)
	}
	if !topoproto.IsTypeInList(topodatapb.TabletType(tabletType), types) {
		return topodatapb.TabletType_UNKNOWN, fmt.Errorf("type %v is not one of: %v", tabletType, strings.Join(topoproto.MakeStringTypeList(types), " "))
	}
	return tabletType, nil
}
375642
func TabletDbName(tablet *topodatapb.Tablet) string {
	if tablet.DbNameOverride != "" {
		return tablet.DbNameOverride
	}
	if tablet.Keyspace == "" {
		return ""
	}
	return vtDbPrefix + tablet.Keyspace
}
309677
func (cmd *CLI) DefineUint64FlagVar(p *uint64, name string, value uint64, usage string) {
	cmd.DefineFlag(values.NewUint64(value, p), name, usage)
}
1353500
func (cmd *CLI) DefineUintFlagVar(p *uint, name string, value uint, usage string) {
	cmd.DefineFlag(values.NewUint(value, p), name, usage)
}
787533
func TabletTypeLString(tabletType topodatapb.TabletType) string {
	value, ok := tabletTypeLowerName[int32(tabletType)]
	if !ok {
		return "unknown"
	}
	return value
}
489836
func IntVar(flagVar *int, short string, long string, value int, usage string) *int {
	flag.IntVar(flagVar, short, value, usage)
	flag.IntVar(flagVar, long, value, usage)
	addKeyDescription(short, long, value, usage)
	return flagVar
}
283655
func (p protobufLocator) CastTypeName(name types.Name) string {
	if name.Package == p.localGoPackage {
		return name.Name
	}
	return name.String()
}
223641
func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {
	CommandLine.VarP(newIPMaskValue(value, p), name, "", usage)
}
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
}
613293
func flagTypeVal(a *design.AttributeDefinition, key string, field string) string {
	switch a.Type {
	case design.Integer:
		return `intFlagVal("` + key + `", ` + field + ")"
	case design.String:
		return `stringFlagVal("` + key + `", ` + field + ")"
	case design.Number, design.Boolean, design.UUID, design.DateTime, design.Any:
		return "%s"
	default:
		return "&" + field
	}
}
1364515
func (fs *FlagSet) Uint16Var(p *uint16, names []string, value uint16, usage string) {
	fs.Var(newUint16Value(value, p), names, usage)
}
620980
func (fs *FlagSet) Float64Var(p *float64, names []string, value float64, usage string) {
	fs.Var(newFloat64Value(value, p), names, usage)
}
831586
func IPVar(p *net.IP, name string, value net.IP, usage string) {
	CommandLine.VarP(newIPValue(value, p), name, "", usage)
}
1369475
func (fs *FlagSet) Int64Var(p *int64, names []string, value int64, usage string) {
	fs.Var(newInt64Value(value, p), names, usage)
}