From 2e5a136e458e6641b09fb3a0db72ce729a9f4f66 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Sun, 27 Sep 2009 17:59:36 -0700 Subject: [PATCH] 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 --- doc/effective_go.html | 321 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 262 insertions(+), 59 deletions(-) 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

-