]> Cypherpunks repositories - gostls13.git/commitdiff
os: improve documentation on Rename
authorJeff R. Allen <jra@nella.org>
Fri, 17 Jul 2015 14:33:51 +0000 (16:33 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 17 Jul 2015 15:07:39 +0000 (15:07 +0000)
Rename should document that it returns *LinkError,
like Create and Stat do.

Fixes #10061

Change-Id: I7bfe8b0267f6c4a57dd6b26cba44928714711724
Reviewed-on: https://go-review.googlesource.com/12353
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/file.go

index f332bc83462825645bf3016f4d2372028fbc6623..f1366110cc5410d3ddabc759392e2fa3b89e0bbe 100644 (file)
@@ -259,6 +259,7 @@ func Create(name string) (file *File, err error) {
 var lstat = Lstat
 
 // Rename renames (moves) a file. OS-specific restrictions might apply.
+// If there is an error, it will be of type *LinkError.
 func Rename(oldpath, newpath string) error {
        return rename(oldpath, newpath)
 }