From 0ffbfd41fbef8ffcf9b62b0b0aa3a5873ed7a4fe Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 2 Aug 2018 19:25:30 +0000 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- unix/aliases.go | 14 ++++++++++++++ windows/aliases.go | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 unix/aliases.go create mode 100644 windows/aliases.go diff --git a/unix/aliases.go b/unix/aliases.go new file mode 100644 index 00000000..d87a681b --- /dev/null +++ b/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 diff --git a/windows/aliases.go b/windows/aliases.go new file mode 100644 index 00000000..af3af60d --- /dev/null +++ b/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