From 5a349aeb5894226d6e35314513526da4741cc984 Mon Sep 17 00:00:00 2001 From: mqliang Date: Thu, 1 Oct 2015 20:00:46 +0800 Subject: [PATCH] capitalize the first letter of log files in module cmd --- cmd/genconversion/conversion.go | 10 +++++----- cmd/gendeepcopy/deep_copy.go | 14 +++++++------- cmd/integration/integration.go | 12 ++++++------ cmd/kube-apiserver/app/server.go | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cmd/genconversion/conversion.go b/cmd/genconversion/conversion.go index ea795a138fea4..63f665a17b8c9 100644 --- a/cmd/genconversion/conversion.go +++ b/cmd/genconversion/conversion.go @@ -85,7 +85,7 @@ func main() { _, err := data.WriteString(fmt.Sprintf("package %v\n", version)) if err != nil { - glog.Fatalf("error writing package line: %v", err) + glog.Fatalf("Error while writing package line: %v", err) } versionPath := pkgPath(group, version) @@ -99,12 +99,12 @@ func main() { continue } if err := generator.GenerateConversionsForType(version, knownType); err != nil { - glog.Errorf("error while generating conversion functions for %v: %v", knownType, err) + glog.Errorf("Error while generating conversion functions for %v: %v", knownType, err) } } generator.RepackImports(sets.NewString()) if err := generator.WriteImports(data); err != nil { - glog.Fatalf("error while writing imports: %v", err) + glog.Fatalf("Error while writing imports: %v", err) } if err := generator.WriteConversionFunctions(data); err != nil { glog.Fatalf("Error while writing conversion functions: %v", err) @@ -115,9 +115,9 @@ func main() { b, err := imports.Process("", data.Bytes(), nil) if err != nil { - glog.Fatalf("error while update imports: %v", err) + glog.Fatalf("Error while update imports: %v", err) } if _, err := funcOut.Write(b); err != nil { - glog.Fatalf("error while writing out the resulting file: %v", err) + glog.Fatalf("Error while writing out the resulting file: %v", err) } } diff --git a/cmd/gendeepcopy/deep_copy.go b/cmd/gendeepcopy/deep_copy.go index 097a43d59c572..cc4ce3862c4a5 100644 --- a/cmd/gendeepcopy/deep_copy.go +++ b/cmd/gendeepcopy/deep_copy.go @@ -105,7 +105,7 @@ func main() { _, err := data.WriteString(fmt.Sprintf("package %s\n", pkgname)) if err != nil { - glog.Fatalf("error writing package line: %v", err) + glog.Fatalf("Error while writing package line: %v", err) } versionPath := pkgPath(group, version) @@ -133,24 +133,24 @@ func main() { continue } if err := generator.AddType(knownType); err != nil { - glog.Errorf("error while generating deep copy functions for %v: %v", knownType, err) + glog.Errorf("Error while generating deep copy functions for %v: %v", knownType, err) } } generator.RepackImports() if err := generator.WriteImports(data); err != nil { - glog.Fatalf("error while writing imports: %v", err) + glog.Fatalf("Error while writing imports: %v", err) } if err := generator.WriteDeepCopyFunctions(data); err != nil { - glog.Fatalf("error while writing deep copy functions: %v", err) + glog.Fatalf("Error while writing deep copy functions: %v", err) } if err := generator.RegisterDeepCopyFunctions(data, registerTo); err != nil { - glog.Fatalf("error while registering deep copy functions: %v", err) + glog.Fatalf("Error while registering deep copy functions: %v", err) } b, err := imports.Process("", data.Bytes(), nil) if err != nil { - glog.Fatalf("error while update imports: %v", err) + glog.Fatalf("Error while update imports: %v", err) } if _, err := funcOut.Write(b); err != nil { - glog.Fatalf("error while writing out the resulting file: %v", err) + glog.Fatalf("Error while writing out the resulting file: %v", err) } } diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 2d3a5560696ad..96a91b746584b 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -163,7 +163,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string publicAddress := net.ParseIP(host) if publicAddress == nil { - glog.Fatalf("no public address for %s", host) + glog.Fatalf("No public address for %s", host) } // Create a master and install handlers into mux. @@ -483,7 +483,7 @@ func runAPIVersionsTest(c *client.Client) { v, err := c.ServerAPIVersions() clientVersion := c.APIVersion() if err != nil { - glog.Fatalf("failed to get api versions: %v", err) + glog.Fatalf("Failed to get api versions: %v", err) } // Verify that the server supports the API version used by the client. for _, version := range v.Versions { @@ -749,7 +749,7 @@ func runMasterServiceTest(client *client.Client) { time.Sleep(12 * time.Second) svcList, err := client.Services(api.NamespaceDefault).List(labels.Everything()) if err != nil { - glog.Fatalf("unexpected error listing services: %v", err) + glog.Fatalf("Unexpected error listing services: %v", err) } var foundRW bool found := sets.String{} @@ -762,13 +762,13 @@ func runMasterServiceTest(client *client.Client) { if foundRW { ep, err := client.Endpoints(api.NamespaceDefault).Get("kubernetes") if err != nil { - glog.Fatalf("unexpected error listing endpoints for kubernetes service: %v", err) + glog.Fatalf("Unexpected error listing endpoints for kubernetes service: %v", err) } if countEndpoints(ep) == 0 { - glog.Fatalf("no endpoints for kubernetes service: %v", ep) + glog.Fatalf("No endpoints for kubernetes service: %v", ep) } } else { - glog.Errorf("no RW service found: %v", found) + glog.Errorf("No RW service found: %v", found) glog.Fatal("Kubernetes service test failed") } glog.Infof("Master service test passed.") diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index a9a580a299a0b..112c7ea15b6a4 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -350,7 +350,7 @@ func (s *APIServer) Run(_ []string) error { } if (s.EtcdConfigFile != "" && len(s.EtcdServerList) != 0) || (s.EtcdConfigFile == "" && len(s.EtcdServerList) == 0) { - glog.Fatalf("specify either --etcd-servers or --etcd-config") + glog.Fatalf("Specify either --etcd-servers or --etcd-config") } capabilities.Initialize(capabilities.Capabilities{ @@ -427,7 +427,7 @@ func (s *APIServer) Run(_ []string) error { if enableExp { expGroup, err := latest.Group("experimental") if err != nil { - glog.Fatalf("experimental API is enabled in runtime config, but not enabled in the environment variable KUBE_API_VERSIONS. Error: %v", err) + glog.Fatalf("Experimental API is enabled in runtime config, but not enabled in the environment variable KUBE_API_VERSIONS. Error: %v", err) } if _, found := storageVersions[expGroup.Group]; !found { glog.Fatalf("Couldn't find the storage version for group: %q in storageVersions: %v", expGroup.Group, storageVersions) @@ -448,7 +448,7 @@ func (s *APIServer) Run(_ []string) error { if apiserver.IsValidServiceAccountKeyFile(s.TLSPrivateKeyFile) { s.ServiceAccountKeyFile = s.TLSPrivateKeyFile } else { - glog.Warning("no RSA key provided, service account token authentication disabled") + glog.Warning("No RSA key provided, service account token authentication disabled") } } authenticator, err := apiserver.NewAuthenticator(apiserver.AuthenticatorConfig{ @@ -483,15 +483,15 @@ func (s *APIServer) Run(_ []string) error { if s.CloudProvider == "gce" { instances, supported := cloud.Instances() if !supported { - glog.Fatalf("gce cloud provider has no instances. this shouldn't happen. exiting.") + glog.Fatalf("GCE cloud provider has no instances. this shouldn't happen. exiting.") } name, err := os.Hostname() if err != nil { - glog.Fatalf("failed to get hostname: %v", err) + glog.Fatalf("Failed to get hostname: %v", err) } addrs, err := instances.NodeAddresses(name) if err != nil { - glog.Warningf("unable to obtain external host address from cloud provider: %v", err) + glog.Warningf("Unable to obtain external host address from cloud provider: %v", err) } else { for _, addr := range addrs { if addr.Type == api.NodeExternalIP { @@ -580,7 +580,7 @@ func (s *APIServer) Run(_ []string) error { if len(s.ClientCAFile) > 0 { clientCAs, err := util.CertPoolFromFile(s.ClientCAFile) if err != nil { - glog.Fatalf("unable to load client CA file: %v", err) + glog.Fatalf("Unable to load client CA file: %v", err) } // Populate PeerCertificates in requests, but don't reject connections without certificates // This allows certificates to be validated by authenticators, while still allowing other auth types