github.com/openshift/source-to-image@v1.4.1-0.20240516041539-bf52fc02204e/cmd/s2i/s2i.go (about) 1 package main 2 3 import ( 4 "flag" 5 "fmt" 6 "math/rand" 7 "os" 8 "runtime" 9 "time" 10 11 "k8s.io/klog/v2" 12 13 "github.com/openshift/source-to-image/pkg/cmd/cli" 14 ) 15 16 func init() { 17 klog.InitFlags(flag.CommandLine) 18 } 19 20 func main() { 21 rand.Seed(time.Now().UTC().UnixNano()) 22 if len(os.Getenv("GOMAXPROCS")) == 0 { 23 runtime.GOMAXPROCS(runtime.NumCPU()) 24 } 25 26 command := cli.CommandFor() 27 if err := command.Execute(); err != nil { 28 fmt.Println(fmt.Sprintf("S2I encountered the following error: %v", err)) 29 os.Exit(1) 30 } 31 }