-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalue_uint.go
More file actions
86 lines (68 loc) · 3.78 KB
/
Copy pathvalue_uint.go
File metadata and controls
86 lines (68 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package conf
// UintVar defines a uint flag and environment variable with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag and/or environment variable.
func (c *Configurator) UintVar(p *uint, name string, value uint, usage string) {
c.env().UintVar(p, name, value, usage)
c.flag().UintVar(p, name, value, usage)
}
// Uint defines a uint flag and environment variable 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 and/or environment variable.
func (c *Configurator) Uint(name string, value uint, usage string) *uint {
p := new(uint)
c.UintVar(p, name, value, usage)
return p
}
// UintVarE defines a uint environment variable with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the environment variable.
func (c *Configurator) UintVarE(p *uint, name string, value uint, usage string) {
c.env().UintVar(p, name, value, usage)
}
// UintE defines a uint environment variable with specified name, default value, and usage string.
// The return value is the address of a uint variable that stores the value of the environment variable.
func (c *Configurator) UintE(name string, value uint, usage string) *uint {
p := new(uint)
c.UintVarE(p, name, value, usage)
return p
}
// UintVarF defines a uint flag with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag.
func (c *Configurator) UintVarF(p *uint, name string, value uint, usage string) {
c.flag().UintVar(p, name, value, usage)
}
// UintF 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.
func (c *Configurator) UintF(name string, value uint, usage string) *uint {
p := new(uint)
c.UintVarF(p, name, value, usage)
return p
}
// UintVar defines a uint flag and environment variable with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag and/or environment variable.
func UintVar(p *uint, name string, value uint, usage string) {
Global.UintVar(p, name, value, usage)
}
// Uint defines a uint flag and environment variable 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 and/or environment variable.
func Uint(name string, value uint, usage string) *uint {
return Global.Uint(name, value, usage)
}
// UintVarE defines a uint environment variable with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the environment variable.
func UintVarE(p *uint, name string, value uint, usage string) {
Global.UintVarE(p, name, value, usage)
}
// UintE defines a uint environment variable with specified name, default value, and usage string.
// The return value is the address of a uint variable that stores the value of the environment variable.
func UintE(name string, value uint, usage string) *uint {
return Global.UintE(name, value, usage)
}
// UintVarF defines a uint flag with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag.
func UintVarF(p *uint, name string, value uint, usage string) {
Global.UintVarF(p, name, value, usage)
}
// UintF 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.
func UintF(name string, value uint, usage string) *uint {
return Global.UintF(name, value, usage)
}