...

Source file src/syscall/mksyscall_windows.go

     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		"os"
    11		"os/exec"
    12		"path/filepath"
    13		"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	}
    27	

View as plain text