-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalue_float32.go
More file actions
86 lines (68 loc) · 4.04 KB
/
Copy pathvalue_float32.go
File metadata and controls
86 lines (68 loc) · 4.04 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
// Float32Var defines a float32 flag and environment variable with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the flag and/or environment variable.
func (c *Configurator) Float32Var(p *float32, name string, value float32, usage string) {
c.env().Float32Var(p, name, value, usage)
c.flag().Float32Var(p, name, value, usage)
}
// Float32 defines a float32 flag and environment variable with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the flag and/or environment variable.
func (c *Configurator) Float32(name string, value float32, usage string) *float32 {
p := new(float32)
c.Float32Var(p, name, value, usage)
return p
}
// Float32VarE defines a float32 environment variable with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the environment variable.
func (c *Configurator) Float32VarE(p *float32, name string, value float32, usage string) {
c.env().Float32Var(p, name, value, usage)
}
// Float32E defines a float32 environment variable with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the environment variable.
func (c *Configurator) Float32E(name string, value float32, usage string) *float32 {
p := new(float32)
c.Float32VarE(p, name, value, usage)
return p
}
// Float32VarF defines a float32 flag with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the flag.
func (c *Configurator) Float32VarF(p *float32, name string, value float32, usage string) {
c.flag().Float32Var(p, name, value, usage)
}
// Float32F defines a float32 flag with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the flag.
func (c *Configurator) Float32F(name string, value float32, usage string) *float32 {
p := new(float32)
c.Float32VarF(p, name, value, usage)
return p
}
// Float32Var defines a float32 flag and environment variable with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the flag and/or environment variable.
func Float32Var(p *float32, name string, value float32, usage string) {
Global.Float32Var(p, name, value, usage)
}
// Float32 defines a float32 flag and environment variable with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the flag and/or environment variable.
func Float32(name string, value float32, usage string) *float32 {
return Global.Float32(name, value, usage)
}
// Float32VarE defines a float32 environment variable with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the environment variable.
func Float32VarE(p *float32, name string, value float32, usage string) {
Global.Float32VarE(p, name, value, usage)
}
// Float32E defines a float32 environment variable with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the environment variable.
func Float32E(name string, value float32, usage string) *float32 {
return Global.Float32E(name, value, usage)
}
// Float32VarF defines a float32 flag with specified name, default value, and usage string.
// The argument p points to a float32 variable in which to store the value of the flag.
func Float32VarF(p *float32, name string, value float32, usage string) {
Global.Float32VarF(p, name, value, usage)
}
// Float32F defines a float32 flag with specified name, default value, and usage string.
// The return value is the address of a float32 variable that stores the value of the flag.
func Float32F(name string, value float32, usage string) *float32 {
return Global.Float32F(name, value, usage)
}