diff --git a/doc/effective_go.html b/doc/effective_go.html index a58989ab55..41c7206b8b 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -1996,7 +1996,7 @@ func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) { http.ResponseWriter.) For reference, here's how to attach such a server to a node on the URL tree.
-import "http"
+import "net/http"
 ...
 ctr := new(Counter)
 http.Handle("/counter", ctr)
@@ -2925,12 +2925,13 @@ An explanation follows.
 
 import (
     "flag"
-    "http"
     "log"
-    "template"
+    "net/http"
+    "text/template"
 )
 
-var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18
+var // Q=17, R=18
+addr = flag.String("addr", ":1718", "http service address")
 
 var templ = template.Must(template.New("qr").Parse(templateStr))
 
diff --git a/doc/effective_go.tmpl b/doc/effective_go.tmpl
index 842f026e10..22e1c1d80a 100644
--- a/doc/effective_go.tmpl
+++ b/doc/effective_go.tmpl
@@ -1934,7 +1934,7 @@ func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
 http.ResponseWriter.)
 For reference, here's how to attach such a server to a node on the URL tree.
 
-import "http"
+import "net/http"
 ...
 ctr := new(Counter)
 http.Handle("/counter", ctr)
diff --git a/src/pkg/deps.bash b/src/pkg/deps.bash
index ad752a093e..c4c44f6b40 100755
--- a/src/pkg/deps.bash
+++ b/src/pkg/deps.bash
@@ -23,36 +23,6 @@ dirpat=$(echo $dirs C | awk '{
 	}
 }')
 
-# Append old names of renamed packages. TODO: clean up after renaming.
-dirpat="$dirpat
-/^(asn1)$/
-/^(big)$/
-/^(cmath)$/
-/^(csv)$/
-/^(exec)$/
-/^(exp\/template\/html)$/
-/^(gob)$/
-/^(http)/
-/^(http\/cgi)$/
-/^(http\/fcgi)$/
-/^(http\/httptest)$/
-/^(http\/pprof)$/
-/^(json)$/
-/^(mail)$/
-/^(rand)$/
-/^(rpc)$/
-/^(scanner)$/
-/^(smtp)$/
-/^(syslog)$/
-/^(tabwriter)$/
-/^(url)$/
-/^(template)$/
-/^(template\/parse)$/
-/^(utf16)$/
-/^(utf8)$/
-/^(xml)$/
-"
-
 for dir in $dirs; do (
 	cd $dir >/dev/null || exit 1
 
@@ -69,35 +39,6 @@ for dir in $dirs; do (
 		awk "$dirpat" |
 		grep -v "^$dir\$" |
 		sed 's/$/.install/' |
-		# TODO: rename the dependencies for renamed directories.  TODO: clean up after renaming.
-		sed 's;^asn1.install$;encoding/asn1.install;
-		s;^big.install$;math/big.install;
-		s;^cmath.install$;math/cmplx.install;
-		s;^csv.install$;encoding/csv.install;
-		s;^exec.install$;os/exec.install;
-		s;^exp/template/html.install$;html/template.install;
-		s;^gob.install$;encoding/gob.install;
-		s;^http.install$;net/http.install;
-		s;^http/cgi.install$;net/http/cgi.install;
-		s;^http/fcgi.install$;net/http/fcgi.install;
-		s;^http/httptest.install$;net/http/httptest.install;
-		s;^http/pprof.install$;net/http/pprof.install;
-		s;^json.install$;encoding/json.install;
-		s;^mail.install$;net/mail.install;
-		s;^rpc.install$;net/rpc.install;
-		s;^rpc/jsonrpc.install$;net/rpc/jsonrpc.install;
-		s;^scanner.install$;text/scanner.install;
-		s;^smtp.install$;net/smtp.install;
-		s;^syslog.install$;log/syslog.install;
-		s;^tabwriter.install$;text/tabwriter.install;
-		s;^template.install$;text/template.install;
-		s;^template/parse.install$;text/template/parse.install;
-		s;^rand.install$;math/rand.install;
-		s;^url.install$;net/url.install;
-		s;^utf16.install$;unicode/utf16.install;
-		s;^utf8.install$;unicode/utf8.install;
-		s;^xml.install$;encoding/xml.install;' |
-		# TODO: end of renamings.
 		sed 's;^C\.install;runtime/cgo.install;' |
 		sort -u
 	)
diff --git a/src/pkg/encoding/asn1/Makefile b/src/pkg/encoding/asn1/Makefile
index 692c469878..1c046dc369 100644
--- a/src/pkg/encoding/asn1/Makefile
+++ b/src/pkg/encoding/asn1/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=asn1
+TARG=encoding/asn1
 GOFILES=\
 	asn1.go\
 	common.go\
diff --git a/src/pkg/encoding/csv/Makefile b/src/pkg/encoding/csv/Makefile
index 7476d816a1..9e04c5b90d 100644
--- a/src/pkg/encoding/csv/Makefile
+++ b/src/pkg/encoding/csv/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=csv
+TARG=encoding/csv
 GOFILES=\
 	reader.go\
 	writer.go\
diff --git a/src/pkg/encoding/gob/Makefile b/src/pkg/encoding/gob/Makefile
index 70ea22f94b..6c7693cba3 100644
--- a/src/pkg/encoding/gob/Makefile
+++ b/src/pkg/encoding/gob/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=gob
+TARG=encoding/gob
 GOFILES=\
 	decode.go\
 	decoder.go\
diff --git a/src/pkg/encoding/json/Makefile b/src/pkg/encoding/json/Makefile
index 203cf3ca98..37223e75e9 100644
--- a/src/pkg/encoding/json/Makefile
+++ b/src/pkg/encoding/json/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=json
+TARG=encoding/json
 GOFILES=\
 	decode.go\
 	encode.go\
diff --git a/src/pkg/encoding/xml/Makefile b/src/pkg/encoding/xml/Makefile
index 731d2ad959..dccb1009fd 100644
--- a/src/pkg/encoding/xml/Makefile
+++ b/src/pkg/encoding/xml/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=xml
+TARG=encoding/xml
 
 GOFILES=\
 	marshal.go\
diff --git a/src/pkg/html/template/Makefile b/src/pkg/html/template/Makefile
index 57f0346149..d27601a33b 100644
--- a/src/pkg/html/template/Makefile
+++ b/src/pkg/html/template/Makefile
@@ -4,7 +4,7 @@
 
 include ../../../Make.inc
 
-TARG=exp/template/html
+TARG=html/template
 GOFILES=\
 	attr.go\
 	clone.go\
diff --git a/src/pkg/html/template/attr.go b/src/pkg/html/template/attr.go
index 6a36c7b718..3ea02880d4 100644
--- a/src/pkg/html/template/attr.go
+++ b/src/pkg/html/template/attr.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"strings"
diff --git a/src/pkg/html/template/clone.go b/src/pkg/html/template/clone.go
index 803a64de12..d0d8ea4673 100644
--- a/src/pkg/html/template/clone.go
+++ b/src/pkg/html/template/clone.go
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
-	"template/parse"
+	"text/template/parse"
 )
 
 // clone clones a template Node.
diff --git a/src/pkg/html/template/clone_test.go b/src/pkg/html/template/clone_test.go
index 9e557d2880..ed1698acd8 100644
--- a/src/pkg/html/template/clone_test.go
+++ b/src/pkg/html/template/clone_test.go
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"bytes"
-	"template"
-	"template/parse"
 	"testing"
+	"text/template"
+	"text/template/parse"
 )
 
 func TestClone(t *testing.T) {
diff --git a/src/pkg/html/template/content.go b/src/pkg/html/template/content.go
index dcaff8c15c..d720d4ba68 100644
--- a/src/pkg/html/template/content.go
+++ b/src/pkg/html/template/content.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"fmt"
diff --git a/src/pkg/html/template/content_test.go b/src/pkg/html/template/content_test.go
index bee2ed1c18..c96a521a59 100644
--- a/src/pkg/html/template/content_test.go
+++ b/src/pkg/html/template/content_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"bytes"
diff --git a/src/pkg/html/template/context.go b/src/pkg/html/template/context.go
index c44df4debc..7202221b83 100644
--- a/src/pkg/html/template/context.go
+++ b/src/pkg/html/template/context.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"fmt"
diff --git a/src/pkg/html/template/css.go b/src/pkg/html/template/css.go
index c26ae78d17..b0a2f013d2 100644
--- a/src/pkg/html/template/css.go
+++ b/src/pkg/html/template/css.go
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"bytes"
 	"fmt"
 	"unicode"
-	"utf8"
+	"unicode/utf8"
 )
 
 // endsWithCSSKeyword returns whether b ends with an ident that
diff --git a/src/pkg/html/template/css_test.go b/src/pkg/html/template/css_test.go
index b3b83e855d..0d94bdcf18 100644
--- a/src/pkg/html/template/css_test.go
+++ b/src/pkg/html/template/css_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"strconv"
diff --git a/src/pkg/html/template/doc.go b/src/pkg/html/template/doc.go
index 8aca42f56b..0324c9c0ee 100644
--- a/src/pkg/html/template/doc.go
+++ b/src/pkg/html/template/doc.go
@@ -3,8 +3,9 @@
 // license that can be found in the LICENSE file.
 
 /*
-Package html is a specialization of package template that automates the
-construction of HTML output that is safe against code injection.
+Package template (html/template) is a specialization of package text/template
+that automates the construction of HTML output that is safe against code
+injection.
 
 
 Introduction
@@ -182,4 +183,4 @@ Least Surprise Property
 knows that contextual autoescaping happens should be able to look at a {{.}}
 and correctly infer what sanitization happens."
 */
-package html
+package template
diff --git a/src/pkg/html/template/error.go b/src/pkg/html/template/error.go
index cb2994bc8a..9622d7e48e 100644
--- a/src/pkg/html/template/error.go
+++ b/src/pkg/html/template/error.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"fmt"
diff --git a/src/pkg/html/template/escape.go b/src/pkg/html/template/escape.go
index e8eae8f174..8ac07eae24 100644
--- a/src/pkg/html/template/escape.go
+++ b/src/pkg/html/template/escape.go
@@ -2,14 +2,14 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"bytes"
 	"fmt"
 	"html"
-	"template"
-	"template/parse"
+	"text/template"
+	"text/template/parse"
 )
 
 // escape rewrites each action in the template to guarantee that the output is
diff --git a/src/pkg/html/template/escape_test.go b/src/pkg/html/template/escape_test.go
index f705947a0e..d8bfa32112 100644
--- a/src/pkg/html/template/escape_test.go
+++ b/src/pkg/html/template/escape_test.go
@@ -2,16 +2,16 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package html
+package template
 
 import (
 	"bytes"
+	"encoding/json"
 	"fmt"
-	"json"
 	"strings"
-	"template"
-	"template/parse"
 	"testing"
+	"text/template"
+	"text/template/parse"
 )
 
 type badMarshaler struct{}
@@ -224,7 +224,7 @@ func TestEscape(t *testing.T) {
 		{
 			"badMarshaller",
 			`