1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:14:49 -07:00

make use of forward method declaration

R=r
DELTA=11  (0 added, 6 deleted, 5 changed)
OCL=30862
CL=30870
This commit is contained in:
Russ Cox 2009-06-29 15:13:56 -07:00
parent 9435dc2bdf
commit 8f9a953760
5 changed files with 5 additions and 11 deletions

View 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);

View 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);

View 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);

View 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);

View 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