github.com/sagernet/sing-box@v1.9.0-rc.20/cmd/internal/build/main.go (about) 1 package main 2 3 import ( 4 "go/build" 5 "os" 6 "os/exec" 7 8 "github.com/sagernet/sing-box/cmd/internal/build_shared" 9 "github.com/sagernet/sing-box/log" 10 ) 11 12 func main() { 13 build_shared.FindSDK() 14 15 if os.Getenv("GOPATH") == "" { 16 os.Setenv("GOPATH", build.Default.GOPATH) 17 } 18 19 command := exec.Command(os.Args[1], os.Args[2:]...) 20 command.Stdout = os.Stdout 21 command.Stderr = os.Stderr 22 err := command.Run() 23 if err != nil { 24 log.Fatal(err) 25 } 26 }