]> Cypherpunks repositories - gostls13.git/commitdiff
html,log,math: renamings
authorRob Pike <r@golang.org>
Thu, 3 Nov 2011 19:42:57 +0000 (12:42 -0700)
committerRob Pike <r@golang.org>
Thu, 3 Nov 2011 19:42:57 +0000 (12:42 -0700)
This is Go 1 package renaming CL #2.
This one merely moves the source; the import strings will be
changed after the next weekly release.

exp/template/html -> html/template
big -> math/big
cmath -> math/cmplx
rand -> math/rand
syslog -> log/syslog

The only edits are in Makefiles and deps.bash.

Note that this CL moves exp/template/html out of exp. I decided
to do that so all the renamings can be done together, even though
the API (and that of template, for that matter) is still fluid.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5332053

64 files changed:
src/pkg/Makefile
src/pkg/deps.bash
src/pkg/html/template/Makefile [moved from src/pkg/exp/template/html/Makefile with 84% similarity]
src/pkg/html/template/attr.go [moved from src/pkg/exp/template/html/attr.go with 100% similarity]
src/pkg/html/template/clone.go [moved from src/pkg/exp/template/html/clone.go with 100% similarity]
src/pkg/html/template/clone_test.go [moved from src/pkg/exp/template/html/clone_test.go with 100% similarity]
src/pkg/html/template/content.go [moved from src/pkg/exp/template/html/content.go with 100% similarity]
src/pkg/html/template/content_test.go [moved from src/pkg/exp/template/html/content_test.go with 100% similarity]
src/pkg/html/template/context.go [moved from src/pkg/exp/template/html/context.go with 100% similarity]
src/pkg/html/template/css.go [moved from src/pkg/exp/template/html/css.go with 100% similarity]
src/pkg/html/template/css_test.go [moved from src/pkg/exp/template/html/css_test.go with 100% similarity]
src/pkg/html/template/doc.go [moved from src/pkg/exp/template/html/doc.go with 100% similarity]
src/pkg/html/template/error.go [moved from src/pkg/exp/template/html/error.go with 100% similarity]
src/pkg/html/template/escape.go [moved from src/pkg/exp/template/html/escape.go with 100% similarity]
src/pkg/html/template/escape_test.go [moved from src/pkg/exp/template/html/escape_test.go with 100% similarity]
src/pkg/html/template/html.go [moved from src/pkg/exp/template/html/html.go with 100% similarity]
src/pkg/html/template/html_test.go [moved from src/pkg/exp/template/html/html_test.go with 100% similarity]
src/pkg/html/template/js.go [moved from src/pkg/exp/template/html/js.go with 100% similarity]
src/pkg/html/template/js_test.go [moved from src/pkg/exp/template/html/js_test.go with 100% similarity]
src/pkg/html/template/transition.go [moved from src/pkg/exp/template/html/transition.go with 100% similarity]
src/pkg/html/template/url.go [moved from src/pkg/exp/template/html/url.go with 100% similarity]
src/pkg/html/template/url_test.go [moved from src/pkg/exp/template/html/url_test.go with 100% similarity]
src/pkg/log/syslog/Makefile [moved from src/pkg/syslog/Makefile with 80% similarity]
src/pkg/log/syslog/syslog.go [moved from src/pkg/syslog/syslog.go with 100% similarity]
src/pkg/log/syslog/syslog_test.go [moved from src/pkg/syslog/syslog_test.go with 100% similarity]
src/pkg/log/syslog/syslog_unix.go [moved from src/pkg/syslog/syslog_unix.go with 100% similarity]
src/pkg/math/big/Makefile [moved from src/pkg/big/Makefile with 83% similarity]
src/pkg/math/big/arith.go [moved from src/pkg/big/arith.go with 100% similarity]
src/pkg/math/big/arith_386.s [moved from src/pkg/big/arith_386.s with 100% similarity]
src/pkg/math/big/arith_amd64.s [moved from src/pkg/big/arith_amd64.s with 100% similarity]
src/pkg/math/big/arith_arm.s [moved from src/pkg/big/arith_arm.s with 100% similarity]
src/pkg/math/big/arith_decl.go [moved from src/pkg/big/arith_decl.go with 100% similarity]
src/pkg/math/big/arith_test.go [moved from src/pkg/big/arith_test.go with 100% similarity]
src/pkg/math/big/calibrate_test.go [moved from src/pkg/big/calibrate_test.go with 100% similarity]
src/pkg/math/big/hilbert_test.go [moved from src/pkg/big/hilbert_test.go with 100% similarity]
src/pkg/math/big/int.go [moved from src/pkg/big/int.go with 100% similarity]
src/pkg/math/big/int_test.go [moved from src/pkg/big/int_test.go with 100% similarity]
src/pkg/math/big/nat.go [moved from src/pkg/big/nat.go with 100% similarity]
src/pkg/math/big/nat_test.go [moved from src/pkg/big/nat_test.go with 100% similarity]
src/pkg/math/big/rat.go [moved from src/pkg/big/rat.go with 100% similarity]
src/pkg/math/big/rat_test.go [moved from src/pkg/big/rat_test.go with 100% similarity]
src/pkg/math/cmplx/Makefile [moved from src/pkg/cmath/Makefile with 85% similarity]
src/pkg/math/cmplx/abs.go [moved from src/pkg/cmath/abs.go with 100% similarity]
src/pkg/math/cmplx/asin.go [moved from src/pkg/cmath/asin.go with 100% similarity]
src/pkg/math/cmplx/cmath_test.go [moved from src/pkg/cmath/cmath_test.go with 100% similarity]
src/pkg/math/cmplx/conj.go [moved from src/pkg/cmath/conj.go with 100% similarity]
src/pkg/math/cmplx/exp.go [moved from src/pkg/cmath/exp.go with 100% similarity]
src/pkg/math/cmplx/isinf.go [moved from src/pkg/cmath/isinf.go with 100% similarity]
src/pkg/math/cmplx/isnan.go [moved from src/pkg/cmath/isnan.go with 100% similarity]
src/pkg/math/cmplx/log.go [moved from src/pkg/cmath/log.go with 100% similarity]
src/pkg/math/cmplx/phase.go [moved from src/pkg/cmath/phase.go with 100% similarity]
src/pkg/math/cmplx/polar.go [moved from src/pkg/cmath/polar.go with 100% similarity]
src/pkg/math/cmplx/pow.go [moved from src/pkg/cmath/pow.go with 100% similarity]
src/pkg/math/cmplx/rect.go [moved from src/pkg/cmath/rect.go with 100% similarity]
src/pkg/math/cmplx/sin.go [moved from src/pkg/cmath/sin.go with 100% similarity]
src/pkg/math/cmplx/sqrt.go [moved from src/pkg/cmath/sqrt.go with 100% similarity]
src/pkg/math/cmplx/tan.go [moved from src/pkg/cmath/tan.go with 100% similarity]
src/pkg/math/rand/Makefile [moved from src/pkg/rand/Makefile with 81% similarity]
src/pkg/math/rand/exp.go [moved from src/pkg/rand/exp.go with 100% similarity]
src/pkg/math/rand/normal.go [moved from src/pkg/rand/normal.go with 100% similarity]
src/pkg/math/rand/rand.go [moved from src/pkg/rand/rand.go with 100% similarity]
src/pkg/math/rand/rand_test.go [moved from src/pkg/rand/rand_test.go with 100% similarity]
src/pkg/math/rand/rng.go [moved from src/pkg/rand/rng.go with 100% similarity]
src/pkg/math/rand/zipf.go [moved from src/pkg/rand/zipf.go with 100% similarity]

index 105f3c4cfa117b39474f4cdd64a68be6df2390f9..036e9cae8bf0d4a8841f9ae6c8ac1c5b67b7e5c5 100644 (file)
@@ -16,10 +16,8 @@ all: install
 DIRS=\
        archive/tar\
        archive/zip\
-       big\
        bufio\
        bytes\
-       cmath\
        compress/bzip2\
        compress/flate\
        compress/gzip\
@@ -89,7 +87,6 @@ DIRS=\
        exp/spdy\
        exp/sql\
        exp/sql/driver\
-       exp/template/html\
        exp/types\
        expvar\
        flag\
@@ -107,6 +104,7 @@ DIRS=\
        hash/crc64\
        hash/fnv\
        html\
+       html/template\
        http\
        http/cgi\
        http/fcgi\
@@ -125,8 +123,12 @@ DIRS=\
        io\
        io/ioutil\
        log\
+       log/syslog\
        mail\
        math\
+       math/big\
+       math/cmplx\
+       math/rand\
        mime\
        mime/multipart\
        net\
@@ -141,7 +143,6 @@ DIRS=\
        patch\
        path\
        path/filepath\
-       rand\
        reflect\
        regexp\
        regexp/syntax\
@@ -159,7 +160,6 @@ DIRS=\
        sync\
        sync/atomic\
        syscall\
-       syslog\
        tabwriter\
        template\
        template/parse\
index 598c1676619288e97d663c424629b6a214ec757b..3f2a3abc661cd60652a61f8130aa63dfcb4469e7 100755 (executable)
@@ -26,9 +26,14 @@ dirpat=$(echo $dirs C | awk '{
 # Append old names of renamed packages. TODO: clean up after renaming.
 dirpat="$dirpat
 /^(asn1)$/
+/^(big)$/
+/^(cmath)$/
 /^(csv)$/
+/^(exp\/template\/html)$/
 /^(gob)$/
 /^(json)$/
+/^(rand)$/
+/^(syslog)$/
 /^(xml)$/
 "
 
@@ -49,11 +54,16 @@ for dir in $dirs; do (
                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;' |
-               sed 's;^csv.install$;encoding/csv.install;' |
-               sed 's;^gob.install$;encoding/gob.install;' |
-               sed 's;^json.install$;encoding/json.install;' |
-               sed 's;^xml.install$;encoding/xml.install;' |
+               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;^exp/template/html.install$;html/template.install;
+               s;^gob.install$;encoding/gob.install;
+               s;^json.install$;encoding/json.install;
+               s;^syslog.install$;log/syslog.install;
+               s;^rand.install$;math/rand.install;
+               s;^xml.install$;encoding/xml.install;' |
                # TODO: end of renamings.
                sed 's;^C\.install;runtime/cgo.install;' |
                sort -u
similarity index 84%
rename from src/pkg/exp/template/html/Makefile
rename to src/pkg/html/template/Makefile
index 2ccbdd3e85af543f1eff8a1d9c5b26956a8a8a69..3b216ba61156503f81bb3eacfcf63d2384e98176 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../../Make.inc
+include ../../../Make.inc
 
 TARG=exp/template/html
 GOFILES=\
@@ -19,4 +19,4 @@ GOFILES=\
        transition.go\
        url.go\
 
-include ../../../../Make.pkg
+include ../../../Make.pkg
similarity index 80%
rename from src/pkg/syslog/Makefile
rename to src/pkg/log/syslog/Makefile
index 82baf7253a67d59385c1c8d40f7d3b83152ea595..27cdedb6f04e7494cfa072914b6fc3e1ee0aca3d 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.inc
+include ../../../Make.inc
 
 TARG=syslog
 GOFILES=\
        syslog.go\
        syslog_unix.go\
 
-include ../../Make.pkg
+include ../../../Make.pkg
similarity index 83%
rename from src/pkg/big/Makefile
rename to src/pkg/math/big/Makefile
index 3d4b56d789ac8e76afcee0777943a84f97514fc0..8e9f956dac984ce64033890624f8006571d069ef 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.inc
+include ../../../Make.inc
 
 TARG=big
 GOFILES=\
@@ -15,4 +15,4 @@ GOFILES=\
 OFILES=\
        arith_$(GOARCH).$O\
 
-include ../../Make.pkg
+include ../../../Make.pkg
similarity index 100%
rename from src/pkg/big/int.go
rename to src/pkg/math/big/int.go
similarity index 100%
rename from src/pkg/big/nat.go
rename to src/pkg/math/big/nat.go
similarity index 100%
rename from src/pkg/big/rat.go
rename to src/pkg/math/big/rat.go
similarity index 85%
rename from src/pkg/cmath/Makefile
rename to src/pkg/math/cmplx/Makefile
index 486caace46d94dca27c0fe75bd4628ec8554d376..c95b856826acf8da81064d02c528bdbd68582404 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.inc
+include ../../../Make.inc
 
 TARG=cmath
 
@@ -22,4 +22,4 @@ GOFILES=\
        sqrt.go\
        tan.go\
 
-include ../../Make.pkg
+include ../../../Make.pkg
similarity index 81%
rename from src/pkg/rand/Makefile
rename to src/pkg/math/rand/Makefile
index ec3b34180e6c9b75d44c148bd12923d6b1830d56..81c2d88c2b0cfef376ea24edb675e55d80cb99d1 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../Make.inc
+include ../../../Make.inc
 
 TARG=rand
 GOFILES=\
@@ -12,4 +12,4 @@ GOFILES=\
        rng.go\
        zipf.go\
 
-include ../../Make.pkg
+include ../../../Make.pkg
similarity index 100%
rename from src/pkg/rand/exp.go
rename to src/pkg/math/rand/exp.go
similarity index 100%
rename from src/pkg/rand/rng.go
rename to src/pkg/math/rand/rng.go