From 155aefe0c182f3788e44596db5f09cf94d2c6a3e Mon Sep 17 00:00:00 2001 From: Tim Cooper Date: Fri, 26 Jan 2018 22:29:55 -0400 Subject: os/exec: remove "binary" when talking about executables The use of binary was incorrect as executable files can also be scripts. The docs for Error are also reworded. The old docs implied that Error was returned when attempting to start an executable, which is not correct: it was returned by LookPath when the file was not found or did not have the attributes of an executable. Change-Id: I757a44b16612936df4498b43c45c12e4c14956d2 Reviewed-on: https://go-review.googlesource.com/90315 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/os/exec/exec.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/os/exec/exec.go') diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go index 5ef9540141..41fbf96370 100644 --- a/src/os/exec/exec.go +++ b/src/os/exec/exec.go @@ -34,11 +34,13 @@ import ( "syscall" ) -// Error records the name of a binary that failed to be executed -// and the reason it failed. +// Error is returned by LookPath when it fails to classify a file as an +// executable. type Error struct { + // Name is the file name for which the error occurred. Name string - Err error + // Err is the underlying error. + Err error } func (e *Error) Error() string { -- cgit v1.3