From 49e2888a96404ee109817d32b8479231f4104f0a Mon Sep 17 00:00:00 2001 From: Anschel Schaffer-Cohen Date: Thu, 20 Jan 2011 19:58:08 -0800 Subject: [PATCH] Fixed documentation for netchan import() This was broken after the last update (2011-01-20). However, I'm not sure if the changed example is a sensible use of import(), so I'd appreciate comments. R=golang-dev, r CC=golang-dev https://golang.org/cl/4067043 --- src/pkg/netchan/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/netchan/import.go b/src/pkg/netchan/import.go index 22b0f69ba3..a694fb41f6 100644 --- a/src/pkg/netchan/import.go +++ b/src/pkg/netchan/import.go @@ -171,12 +171,12 @@ func (imp *Importer) Import(name string, chT interface{}, dir Dir, size int) os. // The channel to be bound to the remote site's channel is provided // in the call and may be of arbitrary channel type. // Despite the literal signature, the effective signature is -// ImportNValues(name string, chT chan T, dir Dir, n int) os.Error +// ImportNValues(name string, chT chan T, dir Dir, size, n int) os.Error // Example usage: // imp, err := NewImporter("tcp", "netchanserver.mydomain.com:1234") // if err != nil { log.Exit(err) } // ch := make(chan myType) -// err = imp.ImportNValues("name", ch, Recv, 1) +// err = imp.ImportNValues("name", ch, Recv, 1, 1) // if err != nil { log.Exit(err) } // fmt.Printf("%+v\n", <-ch) func (imp *Importer) ImportNValues(name string, chT interface{}, dir Dir, size, n int) os.Error { -- 2.50.0