From: Rob Pike Date: Mon, 28 Sep 2009 00:59:36 +0000 (-0700) Subject: add a data section and start populating it with info about allocation, arrays X-Git-Tag: weekly.2009-11-06~472 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2e5a136e458e6641b09fb3a0db72ce729a9f4f66;p=gostls13.git add a data section and start populating it with info about allocation, arrays R=rsc DELTA=331 (266 added, 61 deleted, 4 changed) OCL=35024 CL=35030 --- diff --git a/doc/effective_go.html b/doc/effective_go.html index bdea687f1f..facc86405b 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -306,6 +306,11 @@ which is a clear, concise name. Moreover, because imported entities are always addressed with their package name, 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.

@@ -367,7 +372,7 @@ func CopyInBackground(dst, src chan Item) {

-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:

@@ -711,7 +716,7 @@ of 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) {
 }
 
-

More to come

+

Data

-