You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
package option
|
|
|
|
import (
|
|
"gitoa.ru/go-4devs/console/input/flag"
|
|
)
|
|
|
|
func Bool(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Bool))...)
|
|
}
|
|
|
|
func Duration(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Duration))...)
|
|
}
|
|
|
|
func Float64(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Float64))...)
|
|
}
|
|
|
|
func Int(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Int))...)
|
|
}
|
|
|
|
func Int64(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Int64))...)
|
|
}
|
|
|
|
func Time(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Time))...)
|
|
}
|
|
|
|
func Uint(name, description string, opts ...func(*Option)) Option {
|
|
return New(name, description, append(opts, Value(flag.Uint))...)
|
|
}
|
|
|
|
func Uint64(name, descriontion string, opts ...func(*Option)) Option {
|
|
return New(name, descriontion, append(opts, Value(flag.Uint64))...)
|
|
}
|
|
|