瀏覽代碼

unix, windows: add type aliases to std syscall for Signal, Errno, SysProcAttr

To simplify the pkg syscall docs.

Change-Id: I3ed0bfc59564ada280141c4662a56e141d197e1f
Reviewed-on: https://go-review.googlesource.com/127656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Brad Fitzpatrick 7 年之前
父節點
當前提交
0ffbfd41fb
共有 2 個文件被更改,包括 27 次插入0 次删除
  1. 14 0
      unix/aliases.go
  2. 13 0
      windows/aliases.go

+ 14 - 0
unix/aliases.go

@@ -0,0 +1,14 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build go1.9
+
+package unix
+
+import "syscall"
+
+type Signal = syscall.Signal
+type Errno = syscall.Errno
+type SysProcAttr = syscall.SysProcAttr

+ 13 - 0
windows/aliases.go

@@ -0,0 +1,13 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build windows
+// +build go1.9
+
+package windows
+
+import "syscall"
+
+type Errno = syscall.Errno
+type SysProcAttr = syscall.SysProcAttr