mirror of https://github.com/golang/go.git
encoding: move asn1, csv, gob, json, xml into encoding
This is Go 1 package renaming CL #1. This one merely moves the source; the import strings will be changed after the next weekly release. The only edits are in Makefiles. R=r, rsc CC=golang-dev https://golang.org/cl/5331060
This commit is contained in:
parent
11075ed893
commit
f4cd80224a
|
|
@ -16,7 +16,6 @@ all: install
|
|||
DIRS=\
|
||||
archive/tar\
|
||||
archive/zip\
|
||||
asn1\
|
||||
big\
|
||||
bufio\
|
||||
bytes\
|
||||
|
|
@ -62,19 +61,23 @@ DIRS=\
|
|||
crypto/x509\
|
||||
crypto/x509/pkix\
|
||||
crypto/xtea\
|
||||
csv\
|
||||
debug/dwarf\
|
||||
debug/macho\
|
||||
debug/elf\
|
||||
debug/gosym\
|
||||
debug/pe\
|
||||
encoding/ascii85\
|
||||
encoding/asn1\
|
||||
encoding/base32\
|
||||
encoding/base64\
|
||||
encoding/binary\
|
||||
encoding/csv\
|
||||
encoding/git85\
|
||||
encoding/gob\
|
||||
encoding/hex\
|
||||
encoding/json\
|
||||
encoding/pem\
|
||||
encoding/xml\
|
||||
errors\
|
||||
exec\
|
||||
exp/ebnf\
|
||||
|
|
@ -98,7 +101,6 @@ DIRS=\
|
|||
go/printer\
|
||||
go/scanner\
|
||||
go/token\
|
||||
gob\
|
||||
hash\
|
||||
hash/adler32\
|
||||
hash/crc32\
|
||||
|
|
@ -122,7 +124,6 @@ DIRS=\
|
|||
index/suffixarray\
|
||||
io\
|
||||
io/ioutil\
|
||||
json\
|
||||
log\
|
||||
mail\
|
||||
math\
|
||||
|
|
@ -172,7 +173,6 @@ DIRS=\
|
|||
utf16\
|
||||
utf8\
|
||||
websocket\
|
||||
xml\
|
||||
../cmd/cgo\
|
||||
../cmd/godoc\
|
||||
../cmd/gofix\
|
||||
|
|
@ -236,6 +236,9 @@ TEST=\
|
|||
BENCH=\
|
||||
$(filter-out $(NOBENCH),$(TEST))
|
||||
|
||||
CRAP:
|
||||
echo $(DIRS)
|
||||
|
||||
clean.dirs: $(addsuffix .clean, $(DIRS))
|
||||
install.dirs: $(addsuffix .install, $(DIRS))
|
||||
nuke.dirs: $(addsuffix .nuke, $(DIRS))
|
||||
|
|
|
|||
|
|
@ -21,10 +21,17 @@ dirpat=$(echo $dirs C | awk '{
|
|||
gsub("/", "\\/", x)
|
||||
printf("/^(%s)$/\n", x)
|
||||
}
|
||||
}')
|
||||
}'
|
||||
# Add packages' old names. TODO: clean up after renaming.
|
||||
echo "/^(asn1)$/"
|
||||
echo "/^(csv)$/"
|
||||
echo "/^(gob)$/"
|
||||
echo "/^(json)$/"
|
||||
echo "/^(xml)$/"
|
||||
)
|
||||
|
||||
for dir in $dirs; do (
|
||||
cd $dir || exit 1
|
||||
cd $dir >/dev/null || exit 1
|
||||
|
||||
sources=$(sed -n 's/^[ ]*\([^ ]*\.go\)[ ]*\\*[ ]*$/\1/p' Makefile)
|
||||
sources=$(echo $sources | sed 's/\$(GOOS)/'$GOOS'/g')
|
||||
|
|
@ -39,6 +46,16 @@ 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.
|
||||
# awk is overkill but it's easy to understand.
|
||||
awk '
|
||||
/^asn1.install$/ { print "encoding/asn1.install"; next }
|
||||
/^csv.install$/ { print "encoding/csv.install"; next }
|
||||
/^gob.install$/ { print "encoding/gob.install"; next }
|
||||
/^json.install$/ { print "encoding/json.install"; next }
|
||||
/^xml.install$/ { print "encoding/xml.install"; next }
|
||||
{print}
|
||||
' |
|
||||
sed 's;^C\.install;runtime/cgo.install;' |
|
||||
sort -u
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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=asn1
|
||||
GOFILES=\
|
||||
|
|
@ -10,4 +10,4 @@ GOFILES=\
|
|||
common.go\
|
||||
marshal.go\
|
||||
|
||||
include ../../Make.pkg
|
||||
include ../../../Make.pkg
|
||||
|
|
@ -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=csv
|
||||
GOFILES=\
|
||||
reader.go\
|
||||
writer.go\
|
||||
|
||||
include ../../Make.pkg
|
||||
include ../../../Make.pkg
|
||||
|
|
@ -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=gob
|
||||
GOFILES=\
|
||||
|
|
@ -14,7 +14,7 @@ GOFILES=\
|
|||
error.go\
|
||||
type.go\
|
||||
|
||||
include ../../Make.pkg
|
||||
include ../../../Make.pkg
|
||||
|
||||
# Help for debugging. Requires adding debug.go to the gob package as well.
|
||||
|
||||
|
|
@ -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=json
|
||||
GOFILES=\
|
||||
|
|
@ -13,4 +13,4 @@ GOFILES=\
|
|||
stream.go\
|
||||
tags.go\
|
||||
|
||||
include ../../Make.pkg
|
||||
include ../../../Make.pkg
|
||||
|
|
@ -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=xml
|
||||
|
||||
|
|
@ -11,4 +11,4 @@ GOFILES=\
|
|||
read.go\
|
||||
xml.go\
|
||||
|
||||
include ../../Make.pkg
|
||||
include ../../../Make.pkg
|
||||
Loading…
Reference in New Issue