]> Cypherpunks repositories - gostls13.git/commitdiff
os: deduplicate File definition
authorShenghou Ma <minux@golang.org>
Mon, 5 Sep 2016 09:19:30 +0000 (05:19 -0400)
committerMinux Ma <minux@golang.org>
Mon, 5 Sep 2016 21:21:05 +0000 (21:21 +0000)
Fixes #16993.

Change-Id: Ibe406f97d2a49acae94531d969c56dbac8ce53b2
Reviewed-on: https://go-review.googlesource.com/28511
Run-TryBot: Minux Ma <minux@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/file_plan9.go
src/os/file_unix.go
src/os/file_windows.go
src/os/types.go

index 9edb6bc0747d08fbacd3aded37af37fa1f6c1a81..880d56a16f6cf9d753962ddc2d6738f23c8fc1ac 100644 (file)
@@ -11,11 +11,6 @@ import (
        "time"
 )
 
-// File represents an open file descriptor.
-type File struct {
-       *file
-}
-
 // file is the real representation of *File.
 // The extra level of indirection ensures that no clients of os
 // can overwrite this data, which could cause the finalizer
index 5bc2b1162277aa2af20dc52fe119ce3df5b72b7b..83a814348fb539c8756b07b053bce67d6c482e05 100644 (file)
@@ -19,11 +19,6 @@ func rename(oldname, newname string) error {
        return nil
 }
 
-// File represents an open file descriptor.
-type File struct {
-       *file
-}
-
 // file is the real representation of *File.
 // The extra level of indirection ensures that no clients of os
 // can overwrite this data, which could cause the finalizer
index 722d4d0823b553cf3c88b3f8fdde8804c40e9b03..e1f9f1c33dfe7a3fd5c6eb5c821cb25b62726917 100644 (file)
@@ -15,11 +15,6 @@ import (
        "unsafe"
 )
 
-// File represents an open file descriptor.
-type File struct {
-       *file
-}
-
 // file is the real representation of *File.
 // The extra level of indirection ensures that no clients of os
 // can overwrite this data, which could cause the finalizer
index 12b593fa1eb00b8cd4e25425d974e7cea25b189d..c56548353f19b6dd1c3bd16930c93a4086d5ed07 100644 (file)
@@ -12,6 +12,11 @@ import (
 // Getpagesize returns the underlying system's memory page size.
 func Getpagesize() int { return syscall.Getpagesize() }
 
+// File represents an open file descriptor.
+type File struct {
+       *file // os specific
+}
+
 // A FileInfo describes a file and is returned by Stat and Lstat.
 type FileInfo interface {
        Name() string       // base name of the file