1
0
mirror of https://github.com/golang/go synced 2024-10-04 23:21:20 -06:00
go/src/os
Brad Fitzpatrick 351c15f1ce all: remove public named return values when useless
Named returned values should only be used on public funcs and methods
when it contributes to the documentation.

Named return values should not be used if they're only saving the
programmer a few lines of code inside the body of the function,
especially if that means there's stutter in the documentation or it
was only there so the programmer could use a naked return
statement. (Naked returns should not be used except in very small
functions)

This change is a manual audit & cleanup of public func signatures.

Signatures were not changed if:

* the func was private (wouldn't be in public godoc)
* the documentation referenced it
* the named return value was an interesting name. (i.e. it wasn't
  simply stutter, repeating the name of the type)

There should be no changes in behavior. (At least: none intended)

Change-Id: I3472ef49619678fe786e5e0994bdf2d9de76d109
Reviewed-on: https://go-review.googlesource.com/20024
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-02-29 03:31:19 +00:00
..
exec all: remove public named return values when useless 2016-02-29 03:31:19 +00:00
signal all: use cannot instead of can not 2016-02-21 15:35:50 +00:00
user all: fix typos and spelling 2016-02-24 18:42:29 +00:00
dir_plan9.go
dir_unix.go
dir_windows.go
doc.go all: remove public named return values when useless 2016-02-29 03:31:19 +00:00
env_test.go os: eradicate smallpox after test 2015-05-06 17:38:57 +00:00
env_unix_test.go
env.go os: add LookupEnv, like Getenv but reports presence 2015-05-05 21:05:12 +00:00
error_plan9.go os: make IsPermission, IsExist, and IsNotExist unwrap SyscallError too 2015-10-10 21:20:14 +00:00
error_test.go os: make IsPermission, IsExist, and IsNotExist unwrap SyscallError too 2015-10-10 21:20:14 +00:00
error_unix.go os: make IsPermission, IsExist, and IsNotExist unwrap SyscallError too 2015-10-10 21:20:14 +00:00
error_windows.go os: make IsPermission, IsExist, and IsNotExist unwrap SyscallError too 2015-10-10 21:20:14 +00:00
error.go os: add document for ErrInvalid 2015-11-13 01:09:10 +00:00
exec_plan9.go
exec_posix.go
exec_unix.go
exec_windows.go os: fix a race between Process.signal() and wait() on Windows 2015-06-11 01:33:25 +00:00
exec.go os: fix a race between Process.signal() and wait() on Windows 2015-06-11 01:33:25 +00:00
export_test.go
file_plan9.go os: fix rename on Plan 9 2016-01-08 14:22:47 +00:00
file_posix.go os: remove stuttering return value names 2015-07-18 01:34:21 +00:00
file_unix.go os, runtime: better EPIPE behavior for command line programs 2016-01-05 00:32:50 +00:00
file_windows.go os: read only 10,000 bytes at a time from Windows console 2016-01-08 16:52:37 +00:00
file.go os: document that Rename overwrites existing file 2016-01-07 00:41:10 +00:00
getwd_darwin.go
getwd.go
os_test.go os: fix tests on brillo 2016-02-24 21:05:40 +00:00
os_unix_test.go os: make TestLchown actually test Lchown. 2015-12-14 22:42:55 +00:00
os_windows_test.go all: fix typos 2016-02-23 13:58:47 +00:00
path_plan9.go
path_test.go os: disable symlink tests on android. 2015-10-20 22:18:23 +00:00
path_unix.go
path_windows.go
path.go
pipe_bsd.go
pipe_linux.go
pipe_test.go os: remove unused import to fix build 2016-01-05 01:21:26 +00:00
proc.go
stat_darwin.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_dragonfly.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_freebsd.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_linux.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_nacl.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_netbsd.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_openbsd.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_plan9.go os: remove stuttering return value names 2015-07-18 01:34:21 +00:00
stat_solaris.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
stat_windows.go os: fix race condition between (*os.File).Stat and os.Chdir on windows 2015-12-30 06:37:08 +00:00
sticky_bsd.go
sticky_notbsd.go
str.go all: fix typos and spelling 2016-02-24 18:42:29 +00:00
sys_bsd.go
sys_darwin.go
sys_freebsd.go
sys_linux.go
sys_nacl.go
sys_plan9.go
sys_solaris.go
sys_unix.go
sys_windows.go
types_plan9.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
types_unix.go os: reduce allocations in Readdir on unix 2015-10-30 19:47:55 +00:00
types_windows.go
types.go