示例#1
0
文件: opts.go 项目: WeiZhang555/hyper
func LabelListVar(values *[]string, names []string, usage string) {
	flag.Var(newListOptsRef(values, ValidateLabel), names, usage)
}
示例#2
0
文件: opts.go 项目: WeiZhang555/hyper
func UlimitMapVar(values map[string]*ulimit.Ulimit, names []string, usage string) {
	flag.Var(NewUlimitOpt(values), names, usage)
}
示例#3
0
文件: opts.go 项目: WeiZhang555/hyper
func DnsSearchListVar(values *[]string, names []string, usage string) {
	flag.Var(newListOptsRef(values, ValidateDnsSearch), names, usage)
}
示例#4
0
文件: opts.go 项目: WeiZhang555/hyper
func IPVar(value *net.IP, names []string, defaultValue, usage string) {
	flag.Var(NewIpOpt(value, defaultValue), names, usage)
}
示例#5
0
文件: opts.go 项目: WeiZhang555/hyper
func IPListVar(values *[]string, names []string, usage string) {
	flag.Var(newListOptsRef(values, ValidateIPAddress), names, usage)
}
示例#6
0
文件: opts.go 项目: WeiZhang555/hyper
func HostListVar(values *[]string, names []string, usage string) {
	flag.Var(newListOptsRef(values, ValidateHost), names, usage)
}
示例#7
0
文件: opts.go 项目: WeiZhang555/hyper
func LogOptsVar(values map[string]string, names []string, usage string) {
	flag.Var(newMapOpt(values, nil), names, usage)
}
示例#8
0
文件: opts.go 项目: WeiZhang555/hyper
func ListVar(values *[]string, names []string, usage string) {
	flag.Var(newListOptsRef(values, nil), names, usage)
}
示例#9
0
// InstallFlags adds command-line options to the top-level flag parser for
// the current process.
func (options *Options) InstallFlags() {
	options.Mirrors = opts.NewListOpts(ValidateMirror)
	flag.Var(&options.Mirrors, []string{"-registry-mirror"}, "Preferred Docker registry mirror")
	options.InsecureRegistries = opts.NewListOpts(ValidateIndexName)
	flag.Var(&options.InsecureRegistries, []string{"-insecure-registry"}, "Enable insecure registry communication")
}