From acf4dd4d56245edea2708dbffb959f8fb18d2506 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 2 Dec 2009 13:46:02 -0800 Subject: [PATCH] change the naming example from Vector to Ring due to loss of vector.New() R=rsc CC=golang-dev https://golang.org/cl/164082 --- doc/effective_go.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/effective_go.html b/doc/effective_go.html index 3ab05fc1cf..5c786b4514 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -308,12 +308,12 @@ 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 function to make new instances of vector.Vector—which +Similarly, the function to make new instances of ring.Ring—which is the definition of a constructor in Go—would -normally 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. -Clients of the package see that as vector.New. +normally be called NewRing, but since +Ring is the only type exported by the package, and since the +package is called ring, it's called just New. +Clients of the package see that as ring.New. Use the package structure to help you choose good names.