Merge pull request #10735 from Loyen/correct-message-spelling

Correct spelling in --insecure-registry validation error message
pull/10743/head
Medya Ghazizadeh 2021-03-06 14:30:55 -08:00 committed by GitHub
commit 3760bf765e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -1226,7 +1226,7 @@ func validateInsecureRegistry() {
i := strings.Index(addr, "//")
addr = addr[i+2:]
} else if strings.Contains(addr, "://") || strings.HasSuffix(addr, ":") {
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
}
hostnameOrIP, port, err := net.SplitHostPort(addr)
if err != nil {
@ -1238,15 +1238,15 @@ func validateInsecureRegistry() {
}
if !hostRe.MatchString(hostnameOrIP) && net.ParseIP(hostnameOrIP) == nil {
// fmt.Printf("This is not hostname or ip %s", hostnameOrIP)
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
}
if port != "" {
v, err := strconv.Atoi(port)
if err != nil {
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
}
if v < 0 || v > 65535 {
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
exit.Message(reason.Usage, "Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: <ip>[:<port>], <hostname>[:<port>] or <network>/<netmask>", out.V{"addr": addr})
}
}
}

View File

@ -420,7 +420,7 @@
"Sorry, Kubernetes {{.version}} is not supported by this release of minikube": "죄송합니다, 쿠버네티스 {{.version}} 는 해당 minikube 버전에서 지원하지 않습니다",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, please set the --output flag to one of the following valid options: [text,json]": "",
"Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: \u003cip\u003e:\u003cport\u003e, \u003chostname\u003e:\u003cport\u003e or \u003cnetwork\u003e/\u003cnetmask\u003e": "",
"Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: \u003cip\u003e:\u003cport\u003e, \u003chostname\u003e:\u003cport\u003e or \u003cnetwork\u003e/\u003cnetmask\u003e": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "",
"Sorry, the url provided with the --registry-mirror flag is invalid: {{.url}}": "",
"Sorry, {{.driver}} does not allow mounts to be changed after container creation (previous mount: '{{.old}}', new mount: '{{.new}})'": "",

View File

@ -370,7 +370,7 @@
"Sorry, Kubernetes {{.k8sVersion}} requires conntrack to be installed in root's path": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, please set the --output flag to one of the following valid options: [text,json]": "",
"Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formtas are: \u003cip\u003e:\u003cport\u003e, \u003chostname\u003e:\u003cport\u003e or \u003cnetwork\u003e/\u003cnetmask\u003e": "",
"Sorry, the address provided with the --insecure-registry flag is invalid: {{.addr}}. Expected formats are: \u003cip\u003e:\u003cport\u003e, \u003chostname\u003e:\u003cport\u003e or \u003cnetwork\u003e/\u003cnetmask\u003e": "",
"Sorry, the kubeadm.{{.parameter_name}} parameter is currently not supported by --extra-config": "",
"Sorry, the url provided with the --registry-mirror flag is invalid: {{.url}}": "",
"Sorry, {{.driver}} does not allow mounts to be changed after container creation (previous mount: '{{.old}}', new mount: '{{.new}})'": "",