github.com/nak3/source-to-image@v1.1.10-0.20180319140719-2ed55639898d/cmd/s2i/s2i.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "math/rand" 6 "os" 7 "path/filepath" 8 "runtime" 9 "time" 10 11 "github.com/openshift/source-to-image/pkg/cmd/cli" 12 ) 13 14 func main() { 15 rand.Seed(time.Now().UTC().UnixNano()) 16 if len(os.Getenv("GOMAXPROCS")) == 0 { 17 runtime.GOMAXPROCS(runtime.NumCPU()) 18 } 19 20 basename := filepath.Base(os.Args[0]) 21 command := cli.CommandFor(basename) 22 if err := command.Execute(); err != nil { 23 fmt.Println(fmt.Sprintf("S2I encountered the following error: %v", err)) 24 os.Exit(1) 25 } 26 }