1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:04:41 -07:00

html,log,math: renamings

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
This commit is contained in:
Rob Pike 2011-11-03 12:42:57 -07:00
parent 53493a22fe
commit 5cb4a15320
64 changed files with 30 additions and 20 deletions

View File

@ -16,10 +16,8 @@ all: install
DIRS=\ DIRS=\
archive/tar\ archive/tar\
archive/zip\ archive/zip\
big\
bufio\ bufio\
bytes\ bytes\
cmath\
compress/bzip2\ compress/bzip2\
compress/flate\ compress/flate\
compress/gzip\ compress/gzip\
@ -89,7 +87,6 @@ DIRS=\
exp/spdy\ exp/spdy\
exp/sql\ exp/sql\
exp/sql/driver\ exp/sql/driver\
exp/template/html\
exp/types\ exp/types\
expvar\ expvar\
flag\ flag\
@ -107,6 +104,7 @@ DIRS=\
hash/crc64\ hash/crc64\
hash/fnv\ hash/fnv\
html\ html\
html/template\
http\ http\
http/cgi\ http/cgi\
http/fcgi\ http/fcgi\
@ -125,8 +123,12 @@ DIRS=\
io\ io\
io/ioutil\ io/ioutil\
log\ log\
log/syslog\
mail\ mail\
math\ math\
math/big\
math/cmplx\
math/rand\
mime\ mime\
mime/multipart\ mime/multipart\
net\ net\
@ -141,7 +143,6 @@ DIRS=\
patch\ patch\
path\ path\
path/filepath\ path/filepath\
rand\
reflect\ reflect\
regexp\ regexp\
regexp/syntax\ regexp/syntax\
@ -159,7 +160,6 @@ DIRS=\
sync\ sync\
sync/atomic\ sync/atomic\
syscall\ syscall\
syslog\
tabwriter\ tabwriter\
template\ template\
template/parse\ template/parse\

View File

@ -26,9 +26,14 @@ dirpat=$(echo $dirs C | awk '{
# Append old names of renamed packages. TODO: clean up after renaming. # Append old names of renamed packages. TODO: clean up after renaming.
dirpat="$dirpat dirpat="$dirpat
/^(asn1)$/ /^(asn1)$/
/^(big)$/
/^(cmath)$/
/^(csv)$/ /^(csv)$/
/^(exp\/template\/html)$/
/^(gob)$/ /^(gob)$/
/^(json)$/ /^(json)$/
/^(rand)$/
/^(syslog)$/
/^(xml)$/ /^(xml)$/
" "
@ -49,11 +54,16 @@ for dir in $dirs; do (
grep -v "^$dir\$" | grep -v "^$dir\$" |
sed 's/$/.install/' | sed 's/$/.install/' |
# TODO: rename the dependencies for renamed directories. TODO: clean up after renaming. # TODO: rename the dependencies for renamed directories. TODO: clean up after renaming.
sed 's;^asn1.install$;encoding/asn1.install;' | sed 's;^asn1.install$;encoding/asn1.install;
sed 's;^csv.install$;encoding/csv.install;' | s;^big.install$;math/big.install;
sed 's;^gob.install$;encoding/gob.install;' | s;^cmath.install$;math/cmplx.install;
sed 's;^json.install$;encoding/json.install;' | s;^csv.install$;encoding/csv.install;
sed 's;^xml.install$;encoding/xml.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. # TODO: end of renamings.
sed 's;^C\.install;runtime/cgo.install;' | sed 's;^C\.install;runtime/cgo.install;' |
sort -u sort -u

View File

@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../../../Make.inc include ../../../Make.inc
TARG=exp/template/html TARG=exp/template/html
GOFILES=\ GOFILES=\
@ -19,4 +19,4 @@ GOFILES=\
transition.go\ transition.go\
url.go\ url.go\
include ../../../../Make.pkg include ../../../Make.pkg

View File

@ -2,11 +2,11 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../Make.inc include ../../../Make.inc
TARG=syslog TARG=syslog
GOFILES=\ GOFILES=\
syslog.go\ syslog.go\
syslog_unix.go\ syslog_unix.go\
include ../../Make.pkg include ../../../Make.pkg

View File

@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../Make.inc include ../../../Make.inc
TARG=big TARG=big
GOFILES=\ GOFILES=\
@ -15,4 +15,4 @@ GOFILES=\
OFILES=\ OFILES=\
arith_$(GOARCH).$O\ arith_$(GOARCH).$O\
include ../../Make.pkg include ../../../Make.pkg

View File

@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../Make.inc include ../../../Make.inc
TARG=cmath TARG=cmath
@ -22,4 +22,4 @@ GOFILES=\
sqrt.go\ sqrt.go\
tan.go\ tan.go\
include ../../Make.pkg include ../../../Make.pkg

View File

@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../Make.inc include ../../../Make.inc
TARG=rand TARG=rand
GOFILES=\ GOFILES=\
@ -12,4 +12,4 @@ GOFILES=\
rng.go\ rng.go\
zipf.go\ zipf.go\
include ../../Make.pkg include ../../../Make.pkg