Commit 20011bc8 authored by Russ Cox's avatar Russ Cox
Browse files

unused imports

R=r
OCL=34731
CL=34731
parent 1401151a
......@@ -13,7 +13,6 @@ import (
"io";
"os";
"path";
"sort";
"strings";
)
......@@ -47,7 +46,7 @@ func extractEBNF(src []byte) []byte {
i += len(open);
// write as many newlines as found in the excluded text
// to maintain correct line numbers in error messages
// to maintain correct line numbers in error messages
for _, ch := range src[0 : i] {
if ch == '\n' {
buf.WriteByte('\n');
......
......@@ -40,13 +40,11 @@ import (
"http";
"io";
"log";
"net";
"os";
pathutil "path";
"sort";
"strings";
"sync";
"syscall";
"template";
"time";
)
......
......@@ -11,10 +11,8 @@ import (
"go/parser";
"go/printer";
"go/scanner";
"io";
"os";
pathutil "path";
"sort";
"strings";
)
......
......@@ -86,11 +86,23 @@ MAKELEVEL=
importpath=$(make -s importpath)
{
# test functions are named TestFoo
# the grep -v eliminates methods and other special names
# that have multiple dots.
pattern='Test([^a-z].*)?'
tests=$(6nm -s _test/$importpath.a $xofile | egrep ' T .*·'$pattern'$' | grep -v '·.*[.·]' | sed 's/.* //; s/·/./')
if [ "x$tests" = x ]; then
echo 'gotest: error: no tests matching '$pattern in _test/$importpath.a $xofile 1>&2
exit 2
fi
# package spec
echo 'package main'
echo
# imports
echo 'import "'$importpath'"'
if echo "$tests" | egrep -v '_test\.' >/dev/null; then
echo 'import "'$importpath'"'
fi
if $havex; then
echo 'import "./_xtest_"'
fi
......@@ -98,20 +110,10 @@ importpath=$(make -s importpath)
# test array
echo
echo 'var tests = []testing.Test {'
# test functions are named TestFoo
# the grep -v eliminates methods and other special names
# that have multiple dots.
pattern='Test([^a-z].*)?'
tests=$(6nm -s _test/$importpath.a $xofile | egrep ' T .*·'$pattern'$' | grep -v '·.*[.·]' | sed 's/.* //; s/·/./')
if [ "x$tests" = x ]; then
echo 'gotest: warning: no tests matching '$pattern in _test/$importpath.a $xofile 1>&2
else
for i in $tests
do
echo ' testing.Test{ "'$i'", '$i' },'
done
fi
for i in $tests
do
echo ' testing.Test{ "'$i'", '$i' },'
done
echo '}'
# body
echo
......
......@@ -6,7 +6,6 @@ package tar
import (
"bytes";
"fmt";
"io";
"os";
"reflect";
......
......@@ -8,9 +8,6 @@ import (
"bytes";
"fmt";
"io";
"os";
"reflect";
"strings";
"testing";
)
......
......@@ -10,11 +10,7 @@ package flate
import (
"bytes";
"bufio";
"io";
"os";
"reflect";
"strconv";
"testing";
)
......
......@@ -6,7 +6,6 @@ package gzip
import (
"bytes";
"fmt";
"io";
"os";
"testing";
......
......@@ -5,7 +5,6 @@
package aes
import (
"fmt";
"testing";
)
......
......@@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)
......
......@@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)
......
......@@ -7,10 +7,7 @@
package block
import (
"io";
"os";
)
import "os"
const (
// minimal irreducible polynomial of degree b
......
......@@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)
......
......@@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)
......
......@@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)
......
......@@ -203,15 +203,12 @@ package datafmt
import (
"bytes";
"container/vector";
"fmt";
"go/token";
"io";
"os";
"reflect";
"runtime";
"strconv";
"strings";
)
......
......@@ -6,7 +6,6 @@ package datafmt
import (
"fmt";
"os";
"strings";
"testing";
)
......
......@@ -6,7 +6,6 @@ package datafmt
import (
"container/vector";
"fmt";
"go/scanner";
"go/token";
"os";
......
......@@ -10,10 +10,7 @@
package dwarf
import (
"os";
"strconv";
)
import "os"
// a single entry's description: a sequence of attributes
type abbrev struct {
......
......@@ -9,7 +9,6 @@ package dwarf
import (
"debug/binary";
"fmt";
"os";
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment