// Uint defines a uint flag with specified name, default value, and usage string.
// The return value is the address of a uint  variable that stores the value of the flag.
511011
func Uint(name string, value uint, usage string) *uint {
	return CommandLine.Uint(name, value, usage)
}
992622
func UInts(input []uint) []uint {
	u := make([]uint, 0, len(input))
	m := make(map[uint]bool)

	for _, val := range input {
		if _, ok := m[val]; !ok {
			m[val] = true
			u = append(u, val)
		}
	}

	return u
}
776220
func (lr *LockedRand) Uint32() (n uint32) {
	lr.lk.Lock()
	n = lr.r.Uint32()
	lr.lk.Unlock()
	return
}
679725
func (c *Context) Uint(name string) uint {
	return lookupUint(name, c.flagSet)
}
299207
func (tr Row) Uint(nn int) (val uint) {
	val, err := tr.UintErr(nn)
	if err != nil {
		panic(err)
	}
	return
}
1212955
func (t Result) Uint() uint64 {
	switch t.Type {
	default:
		return 0
	case True:
		return 1
	case String:
		n, _ := parseUint(t.Str)
		return n
	case Number:
		// try to directly convert the float64 to uint64
		n, ok := floatToUint(t.Num)
		if !ok {
			// now try to parse the raw string
			n, ok = parseUint(t.Raw)
			if !ok {
				// fallback to a standard conversion
				return uint64(t.Num)
			}
		}
		return n
	}
}
353793
func NewUint(vals ...V) UintA {
	a := &arg{}

	d := Default.Get(vals)
	a.defv = d

	f := A(flagA).Get(vals)
	if f != nil {
		f := f.(flagT)
		a.defv = flag.Uint(f.name, f.defv.(uint), f.usage)
	}

	ai := a.getA()
	return func(i uint) V {
		return ai(i)
	}
}
573905
func (e Entry) UintDefault(def uint) (uint, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("uint", e.Key)
	}

	x64 := strconv.IntSize == 64
	var maxValue uint64 = math.MaxUint32
	if x64 {
		maxValue = math.MaxUint64
	}

	switch vv := v.(type) {
	case string:
		val, err := strconv.ParseUint(vv, 10, strconv.IntSize)
		if err != nil {
			return def, err
		}
		if val > uint64(maxValue) {
			return def, errFindParse.Format("uint", e.Key)
		}
		return uint(val), nil
	case uint:
		return vv, nil
	case uint8:
		return uint(vv), nil
	case uint16:
		return uint(vv), nil
	case uint32:
		return uint(vv), nil
	case uint64:
		if vv > uint64(maxValue) {
			return def, errFindParse.Format("uint", e.Key)
		}
		return uint(vv), nil
	case int:
		if vv < 0 || vv > int(maxValue) {
			return def, errFindParse.Format("uint", e.Key)
		}
		return uint(vv), nil
	}

	return def, errFindParse.Format("uint", e.Key)
}
680893
func (fs *FlagSet) UintVar(p *uint, names []string, value uint, usage string) {
	fs.Var(newUintValue(value, p), names, usage)
}
271256
func (p *parserMixin) Uint() (target *uint) {
	target = new(uint)
	p.UintVar(target)
	return
}
146950
func Uints(b0, b1 []uint) int {
	d := 0
	for i, x := range b0 {
		d += Uint(x, b1[i])
	}
	return d
}
1211669
func Uint(v uint) *uint {
	p := new(uint)
	*p = v
	return p
}
739205
func Uint32(name rune, value uint32, helpvalue ...string) *uint32 {
	return CommandLine.Uint32(name, value, helpvalue...)
}
842387
func (env *Env) Flags() (uint, error) {
	var _flags C.uint
	ret := C.mdb_env_get_flags(env._env, &_flags)
	if ret != success {
		return 0, operrno("mdb_env_get_flags", ret)
	}
	return uint(_flags), nil
}
1215384
func (val XMValue) UInt32() (v uint32) {
	encoding.ReadFrom(bytes.NewBuffer(val), &v)
	return
}
1185505
func (c *Context) Uint64(name string) uint64 {
	return lookupUint64(name, c.flagSet)
}
1098107
func (u Uint16) Get() (uint16, error) {
	if !u.Present() {
		var zero uint16
		return zero, errors.New("value not present")
	}
	return *u.value, nil
}