Set GOMAXPROCS. Print errors on stderr.

This commit is contained in:
Daniel Smith
2015-02-19 10:30:31 -08:00
parent 1b5d14423c
commit fcddefa184
7 changed files with 45 additions and 4 deletions

View File

@@ -19,6 +19,10 @@ limitations under the License.
package main
import (
"fmt"
"os"
"runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/server"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
@@ -27,6 +31,7 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := server.NewAPIServer()
s.AddFlags(pflag.CommandLine)
@@ -36,5 +41,8 @@ func main() {
verflag.PrintAndExitIfRequested()
s.Run(pflag.CommandLine.Args())
if err := s.Run(pflag.CommandLine.Args()); err != nil {
fmt.Fprint(os.Stderr, err.Error)
os.Exit(1)
}
}