]> Cypherpunks repositories - gostls13.git/commitdiff
make use of forward method declaration
authorRuss Cox <rsc@golang.org>
Mon, 29 Jun 2009 22:13:56 +0000 (15:13 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 29 Jun 2009 22:13:56 +0000 (15:13 -0700)
R=r
DELTA=11  (0 added, 6 deleted, 5 changed)
OCL=30862
CL=30870

src/pkg/os/dir_darwin_386.go
src/pkg/os/dir_darwin_amd64.go
src/pkg/os/dir_linux_386.go
src/pkg/os/dir_linux_amd64.go
src/pkg/os/file.go

index 791499d8f9c3ed10f5eec8c7e6ee733c5e7724c5..8ae6ba70fbff1a9dbae52375a2a14ea8d3a34420 100644 (file)
@@ -15,7 +15,7 @@ const (
 )
 
 // Negative count means read until EOF.
-func readdirnames(file *File, count int) (names []string, err Error) {
+func (file *File) Readdirnames(count int) (names []string, err Error) {
        // If this file has no dirinfo, create one.
        if file.dirinfo == nil {
                file.dirinfo = new(dirInfo);
index 791499d8f9c3ed10f5eec8c7e6ee733c5e7724c5..8ae6ba70fbff1a9dbae52375a2a14ea8d3a34420 100644 (file)
@@ -15,7 +15,7 @@ const (
 )
 
 // Negative count means read until EOF.
-func readdirnames(file *File, count int) (names []string, err Error) {
+func (file *File) Readdirnames(count int) (names []string, err Error) {
        // If this file has no dirinfo, create one.
        if file.dirinfo == nil {
                file.dirinfo = new(dirInfo);
index d6d700b24bb8f5a2e075c3e1ffccc90daf2d4991..9b9a1763e866dfcf284f72eb5f7b20974938aefa 100644 (file)
@@ -28,7 +28,7 @@ func clen(n []byte) int {
 }
 
 // Negative count means read until EOF.
-func readdirnames(file *File, count int) (names []string, err Error) {
+func (file *File) Readdirnames(count int) (names []string, err Error) {
        // If this file has no dirinfo, create one.
        if file.dirinfo == nil {
                file.dirinfo = new(dirInfo);
index 8b1664f77407b7025f0c00ce8dcb9b07d8a14d95..c0a7ee8b7d610772c407fde98403f928491b9785 100644 (file)
@@ -24,7 +24,7 @@ func clen(n []byte) int {
 }
 
 // Negative count means read until EOF.
-func readdirnames(file *File, count int) (names []string, err Error) {
+func (file *File) Readdirnames(count int) (names []string, err Error) {
        // If this file has no dirinfo, create one.
        if file.dirinfo == nil {
                file.dirinfo = new(dirInfo);
index 8c76735fbcd8fc4b3e58acf33a0f4f8d594eef89..952348307c1ba38b01daa8816568ae99f59f8020 100644 (file)
@@ -257,18 +257,12 @@ func Lstat(name string) (dir *Dir, err Error) {
        return dirFromStat(name, new(Dir), &stat, &stat), nil
 }
 
-// Readdirnames has a non-portable implemenation so its code is separated into an
-// operating-system-dependent file.
-func readdirnames(file *File, count int) (names []string, err Error)
-
 // Readdirnames reads the contents of the directory associated with file and
 // returns an array of up to count names, in directory order.  Subsequent
 // calls on the same file will yield further names.
 // A negative count means to read until EOF.
 // Readdirnames returns the array and an Error, if any.
-func (file *File) Readdirnames(count int) (names []string, err Error) {
-       return readdirnames(file, count);
-}
+func (file *File) Readdirnames(count int) (names []string, err Error)
 
 // Readdir reads the contents of the directory associated with file and
 // returns an array of up to count Dir structures, as would be returned