From 2e5a136e458e6641b09fb3a0db72ce729a9f4f66 Mon Sep 17 00:00:00 2001
From: Rob Pike bufio.Reader
does not conflict with io.Reader
.
+Similarly, the constructor for vector.Vector
+could be called NewVector
but since
+Vector
is the only type exported by the package, and since the
+package is called vector
, it's called just New
,
+which clients of the package see as vector.New
.
Use the package structure to help you choose good names.
-In fact, semicolons can omitted at the end of any "StatementList" in the
+In fact, semicolons can be omitted at the end of any "StatementList" in the
grammar, which includes things like cases in switch
statements:
io.ReadFull
that uses them well:
func ReadFull(r Reader, buf []byte) (n int, err os.Error) { - for len(buf) > 0 && err != nil { + for len(buf) > 0 && err != nil { var nr int; nr, err = r.Read(buf); n += nr; @@ -721,39 +726,272 @@ func ReadFull(r Reader, buf []byte) (n int, err os.Error) { }-