Commit 96cfe7b9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #36734 from YuPengZTE/devPunctuation

Automatic merge from submit-queue error strings should not end with punctuation **What this PR does / why we need it**: Delete the end punctuation of error strings **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: https://github.com/golang/go/wiki/CodeReviewComments#error-strings **Release note**: ```release-note ``` Signed-off-by: 's avataryupeng <yu.peng36@zte.com.cn>
parents 914c57eb 31c46e1d
...@@ -183,7 +183,7 @@ func getRemoteKubeletConfig(s *options.KubeletServer, kubeDeps *kubelet.KubeletD ...@@ -183,7 +183,7 @@ func getRemoteKubeletConfig(s *options.KubeletServer, kubeDeps *kubelet.KubeletD
if kubeDeps != nil && kubeDeps.Cloud != nil { if kubeDeps != nil && kubeDeps.Cloud != nil {
instances, ok := kubeDeps.Cloud.Instances() instances, ok := kubeDeps.Cloud.Instances()
if !ok { if !ok {
err = fmt.Errorf("failed to get instances from cloud provider, can't determine nodename.") err = fmt.Errorf("failed to get instances from cloud provider, can't determine nodename")
return nil, err return nil, err
} }
nodename, err = instances.CurrentNodeName(hostname) nodename, err = instances.CurrentNodeName(hostname)
...@@ -754,7 +754,7 @@ func RunKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *kubelet ...@@ -754,7 +754,7 @@ func RunKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *kubelet
// NewMainKubelet should have set up a pod source config if one didn't exist // NewMainKubelet should have set up a pod source config if one didn't exist
// when the builder was run. This is just a precaution. // when the builder was run. This is just a precaution.
if kubeDeps.PodConfig == nil { if kubeDeps.PodConfig == nil {
return fmt.Errorf("failed to create kubelet, pod source config was nil!") return fmt.Errorf("failed to create kubelet, pod source config was nil")
} }
podCfg := kubeDeps.PodConfig podCfg := kubeDeps.PodConfig
......
...@@ -413,7 +413,7 @@ func (g openAPITypeWriter) generateProperty(m *types.Member) error { ...@@ -413,7 +413,7 @@ func (g openAPITypeWriter) generateProperty(m *types.Member) error {
} }
switch t.Kind { switch t.Kind {
case types.Builtin: case types.Builtin:
return fmt.Errorf("please add type %v to getOpenAPITypeFormat function.", t) return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", t)
case types.Map: case types.Map:
if err := g.generateMapProperty(t); err != nil { if err := g.generateMapProperty(t); err != nil {
return err return err
...@@ -425,7 +425,7 @@ func (g openAPITypeWriter) generateProperty(m *types.Member) error { ...@@ -425,7 +425,7 @@ func (g openAPITypeWriter) generateProperty(m *types.Member) error {
case types.Struct, types.Interface: case types.Struct, types.Interface:
g.generateReferenceProperty(t) g.generateReferenceProperty(t)
default: default:
return fmt.Errorf("cannot generate spec for type %v.", t) return fmt.Errorf("cannot generate spec for type %v", t)
} }
g.Do("},\n},\n", nil) g.Do("},\n},\n", nil)
return g.Error() return g.Error()
......
...@@ -141,9 +141,9 @@ func getDnsZone(dnsZoneName string, dnsZoneID string, dnsZonesInterface dnsprovi ...@@ -141,9 +141,9 @@ func getDnsZone(dnsZoneName string, dnsZoneID string, dnsZonesInterface dnsprovi
} }
if len(dnsZones) == 0 { if len(dnsZones) == 0 {
return nil, fmt.Errorf("DNS zone %s not found.", name) return nil, fmt.Errorf("DNS zone %s not found", name)
} else { } else {
return nil, fmt.Errorf("DNS zone %s is ambiguous (please specify zoneID).", name) return nil, fmt.Errorf("DNS zone %s is ambiguous (please specify zoneID)", name)
} }
} }
......
...@@ -421,7 +421,7 @@ func (s *ServiceController) init() error { ...@@ -421,7 +421,7 @@ func (s *ServiceController) init() error {
} }
zones, ok := s.dns.Zones() zones, ok := s.dns.Zones()
if !ok { if !ok {
return fmt.Errorf("the dns provider does not support zone enumeration, which is required for creating dns records.") return fmt.Errorf("the dns provider does not support zone enumeration, which is required for creating dns records")
} }
s.dnsZones = zones s.dnsZones = zones
matchingZones, err := getDnsZones(s.zoneName, s.zoneID, s.dnsZones) matchingZones, err := getDnsZones(s.zoneName, s.zoneID, s.dnsZones)
......
...@@ -519,13 +519,13 @@ type kops struct { ...@@ -519,13 +519,13 @@ type kops struct {
func NewKops() (*kops, error) { func NewKops() (*kops, error) {
if *kopsPath == "" { if *kopsPath == "" {
return nil, fmt.Errorf("--kops must be set to a valid binary path for kops deployment.") return nil, fmt.Errorf("--kops must be set to a valid binary path for kops deployment")
} }
if *kopsCluster == "" { if *kopsCluster == "" {
return nil, fmt.Errorf("--kops-cluster must be set to a valid cluster name for kops deployment.") return nil, fmt.Errorf("--kops-cluster must be set to a valid cluster name for kops deployment")
} }
if *kopsState == "" { if *kopsState == "" {
return nil, fmt.Errorf("--kops-state must be set to a valid S3 path for kops deployment.") return nil, fmt.Errorf("--kops-state must be set to a valid S3 path for kops deployment")
} }
sshKey := *kopsSSHKey sshKey := *kopsSSHKey
if sshKey == "" { if sshKey == "" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment