github.com/x04/go/src@v0.0.0-20200202162449-3d481ceb3525/syscall/mksyscall_windows.go (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build ignore 6 7 package main 8 9 import ( 10 "github.com/x04/go/src/os" 11 "github.com/x04/go/src/os/exec" 12 "github.com/x04/go/src/path/filepath" 13 "github.com/x04/go/src/runtime" 14 ) 15 16 func main() { 17 os.Stderr.WriteString("WARNING: Please switch from using:\n go run $GOROOT/src/syscall/mksyscall_windows.go\nto using:\n go run golang.org/x/sys/windows/mkwinsyscall\n") 18 args := append([]string{"run", "golang.org/x/sys/windows/mkwinsyscall"}, os.Args[1:]...) 19 cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) 20 cmd.Stdout = os.Stdout 21 cmd.Stderr = os.Stderr 22 err := cmd.Run() 23 if err != nil { 24 os.Exit(1) 25 } 26 }