Commit 49e2888a authored by Anschel Schaffer-Cohen's avatar Anschel Schaffer-Cohen Committed by Rob Pike

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
parent 955aa159
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment