1
0
mirror of https://github.com/golang/go synced 2024-11-21 19:54:41 -07:00

unused imports

R=r
OCL=34731
CL=34731
This commit is contained in:
Russ Cox 2009-09-17 10:27:04 -07:00
parent 1401151ab2
commit 20011bc878
83 changed files with 45 additions and 159 deletions

View File

@ -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');

View File

@ -40,13 +40,11 @@ import (
"http";
"io";
"log";
"net";
"os";
pathutil "path";
"sort";
"strings";
"sync";
"syscall";
"template";
"time";
)

View File

@ -11,10 +11,8 @@ import (
"go/parser";
"go/printer";
"go/scanner";
"io";
"os";
pathutil "path";
"sort";
"strings";
)

View File

@ -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

View File

@ -6,7 +6,6 @@ package tar
import (
"bytes";
"fmt";
"io";
"os";
"reflect";

View File

@ -8,9 +8,6 @@ import (
"bytes";
"fmt";
"io";
"os";
"reflect";
"strings";
"testing";
)

View File

@ -10,11 +10,7 @@ package flate
import (
"bytes";
"bufio";
"io";
"os";
"reflect";
"strconv";
"testing";
)

View File

@ -6,7 +6,6 @@ package gzip
import (
"bytes";
"fmt";
"io";
"os";
"testing";

View File

@ -5,7 +5,6 @@
package aes
import (
"fmt";
"testing";
)

View File

@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)

View File

@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)

View File

@ -7,10 +7,7 @@
package block
import (
"io";
"os";
)
import "os"
const (
// minimal irreducible polynomial of degree b

View File

@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)

View File

@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)

View File

@ -14,7 +14,6 @@ import (
"bytes";
"crypto/aes";
"io";
"os";
"testing";
)

View File

@ -203,15 +203,12 @@ package datafmt
import (
"bytes";
"container/vector";
"fmt";
"go/token";
"io";
"os";
"reflect";
"runtime";
"strconv";
"strings";
)

View File

@ -6,7 +6,6 @@ package datafmt
import (
"fmt";
"os";
"strings";
"testing";
)

View File

@ -6,7 +6,6 @@ package datafmt
import (
"container/vector";
"fmt";
"go/scanner";
"go/token";
"os";

View File

@ -10,10 +10,7 @@
package dwarf
import (
"os";
"strconv";
)
import "os"
// a single entry's description: a sequence of attributes
type abbrev struct {

View File

@ -9,7 +9,6 @@ package dwarf
import (
"debug/binary";
"fmt";
"os";
)

View File

@ -8,10 +8,7 @@
package gosym
import (
"debug/binary";
"io";
)
import "debug/binary"
type LineTable struct {
Data []byte;

View File

@ -6,8 +6,6 @@ package gosym
import (
"debug/elf";
"exec";
"io";
"os";
"testing";
"syscall";

View File

@ -13,15 +13,15 @@ package proc
// and proc_darwin.go do, because deps.bash only looks at
// this file.
import (
"container/vector";
"fmt";
"io";
_ "container/vector";
_ "fmt";
_ "io";
"os";
"runtime";
_ "runtime";
"strconv";
"strings";
"sync";
"syscall";
_ "strings";
_ "sync";
_ "syscall";
)
type Word uint64

View File

@ -24,12 +24,9 @@ package ebnf
import (
"container/vector";
"fmt";
"go/scanner";
"go/token";
"os";
"strconv";
"strings";
"unicode";
"utf8";
)

View File

@ -6,14 +6,10 @@ package ebnf
import (
"container/vector";
"fmt";
"go/scanner";
"go/token";
"os";
"strconv";
"strings";
"unicode";
"utf8";
)

View File

@ -11,7 +11,6 @@ import (
"bytes";
"fmt";
"http";
"io";
"log";
"strconv";
"sync";

View File

@ -5,7 +5,6 @@
package exvar
import (
"fmt";
"json";
"testing";
)

View File

@ -6,7 +6,6 @@ package flag_test
import (
. "flag";
"fmt";
"testing";
)

View File

@ -10,7 +10,6 @@ import (
"math";
"strings";
"testing";
"unsafe";
)
func TestFmtInterface(t *testing.T) {

View File

@ -4,9 +4,6 @@
package ast
import "go/token";
type Scope struct {
Outer *Scope;
Names map[string]*Ident

View File

@ -7,7 +7,6 @@
package doc
import (
"fmt";
"go/ast";
"io";
"once";

View File

@ -6,13 +6,10 @@ package doc
import (
"container/vector";
"fmt";
"go/ast";
"go/token";
"io";
"regexp";
"sort";
"strings";
)

View File

@ -8,11 +8,9 @@ package parser
import (
"bytes";
"container/vector";
"fmt";
"go/ast";
"go/scanner";
"go/token";
"io";
"os";
pathutil "path";

View File

@ -10,15 +10,11 @@
package parser
import (
"bytes";
"container/vector";
"fmt";
"go/ast";
"go/scanner";
"go/token";
"io";
"os";
"strings";
)

View File

@ -5,7 +5,6 @@
package parser
import (
"go/ast";
"os";
"testing";
)

View File

@ -10,7 +10,6 @@ import (
"io";
"go/ast";
"go/parser";
"os";
"path";
"testing";
)

View File

@ -8,7 +8,6 @@ import (
"bytes";
"io";
"os";
"reflect";
"sync";
)

View File

@ -10,7 +10,6 @@ import (
"math";
"os";
"reflect";
"sync";
"unsafe";
)

View File

@ -11,7 +11,6 @@ import (
"reflect";
"strings";
"testing";
"unsafe";
)
type ET2 struct {

View File

@ -8,9 +8,7 @@ import (
"fmt";
"os";
"reflect";
"strings";
"sync";
"unicode";
)
type kind reflect.Type

View File

@ -5,7 +5,6 @@
package gob
import (
"os";
"reflect";
"testing";
)

View File

@ -10,7 +10,6 @@ import (
"bufio";
"fmt";
"io";
"log";
"net";
"os";
"strconv";

View File

@ -7,7 +7,6 @@
package http
import (
"fmt";
"io";
"strings";
"testing";

View File

@ -4,11 +4,7 @@
package http
import (
"fmt";
"os";
"testing";
)
import "testing"
type stringMultimap map[string] []string

View File

@ -10,7 +10,6 @@
package io
import (
"bytes";
"os";
"strings";
)

View File

@ -12,10 +12,7 @@ package json
import (
"bytes";
"fmt";
"math";
"strconv";
"strings";
"utf8";
)

View File

@ -7,7 +7,6 @@ package net
import (
"flag";
"io";
"os";
"strings";
"syscall";
"testing";

View File

@ -16,7 +16,6 @@
package net
import (
"io";
"once";
"os";
"strings";

View File

@ -6,11 +6,7 @@
package net
import (
"io";
"os";
"strconv";
)
import "os"
type _DNS_Config struct {
servers []string; // servers to use

View File

@ -5,7 +5,6 @@
package net
import (
"os";
"regexp";
"testing";
)

View File

@ -7,7 +7,6 @@
package net
import (
"io";
"once";
"os";
)

View File

@ -6,7 +6,6 @@ package net
import (
"io";
"os";
"strings";
"syscall";
"testing";

View File

@ -5,7 +5,6 @@
package net
import (
"os";
"testing";
"time";
)

View File

@ -6,10 +6,7 @@
package os
import (
"syscall";
"unsafe";
)
import "syscall"
var Args []string; // provided by runtime
var Envs []string; // provided by runtime

View File

@ -7,7 +7,6 @@ package reflect
import (
"runtime";
"strconv";
"strings";
"unsafe";
)

View File

@ -12,7 +12,6 @@ import (
"log";
"net";
"os";
"strconv";
"sync";
)

View File

@ -11,10 +11,7 @@ package rpc
import (
"fmt";
"gob";
"http";
"io";
"log";
"os";
"sort";
"template";

View File

@ -5,9 +5,7 @@
package rpc
import (
"gob";
"http";
"io";
"log";
"net";
"once";

View File

@ -5,7 +5,6 @@
package strconv_test
import (
"fmt";
"os";
"reflect";
. "strconv";

View File

@ -5,7 +5,6 @@
package strconv_test
import (
"fmt";
"os";
"reflect";
. "strconv";

View File

@ -5,7 +5,6 @@
package strconv_test
import (
"fmt";
. "strconv";
"testing";
)

View File

@ -6,7 +6,6 @@ package strconv_test
import (
"bufio";
"fmt";
"io";
"os";
"strconv";
"strings";

View File

@ -5,8 +5,6 @@
package strconv_test
import (
"fmt";
"os";
. "strconv";
"testing";
)

View File

@ -11,8 +11,6 @@
// the manuals for the appropriate operating system.
package syscall
import "unsafe"
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)

View File

@ -10,7 +10,6 @@ import (
"bytes";
"fmt";
"io";
"reflect";
"strings";
)

View File

@ -9,8 +9,6 @@ import (
"container/vector";
"fmt";
"io";
"os";
"reflect";
"testing";
)

View File

@ -7,7 +7,6 @@ package time
import (
"os";
"syscall";
"unsafe";
)
// Sleep pauses the current goroutine for ns nanoseconds.

View File

@ -4,11 +4,6 @@
package time
import (
"syscall";
"unsafe";
)
// TODO(rsc): This implementation of Tick is a
// simple placeholder. Eventually, there will need to be
// a single central time server no matter how many tickers

View File

@ -6,7 +6,6 @@ package utf8_test
import (
"bytes";
"fmt";
"strings";
"testing";
. "utf8";

View File

@ -39,7 +39,6 @@ package main
import (
"flag";
"fmt";
"os";
)
var n = flag.Int("n", 15, "depth")

View File

@ -39,7 +39,6 @@ package main
import (
"flag";
"fmt";
"os";
)
var n = flag.Int("n", 15, "depth")

View File

@ -6,11 +6,6 @@
package main
import (
"fmt";
"os";
)
type T struct {
a float64;
b int64;

View File

@ -4,5 +4,5 @@
package bug1
import "./bug0"
import _ "./bug0"

View File

@ -6,6 +6,7 @@
package main
import os "os"
type _ os.Error
func f() (os int) {
// In the next line "os" should refer to the result variable, not
// to the package.

View File

@ -6,7 +6,9 @@
package foo
import "fmt"
func f() {
fmt.Println();
fmt := 1;
_ = fmt;
}

View File

@ -4,7 +4,7 @@
package bug2
import "./bug1"
import _ "./bug1"
import "./bug0"
type T2 struct { t bug0.T }

View File

@ -6,8 +6,6 @@
package main
import "fmt"
func main() {
xy := 1; // ERROR "identifier"
}

View File

@ -5,7 +5,6 @@
// license that can be found in the LICENSE file.
package main
import "fmt"
import "reflect"
type S1 struct { i int }
type S2 struct { S1 }

View File

@ -9,6 +9,7 @@ package main
import "sort"
func main() {
sort.Sort(nil);
var x int;
sort(x); // ERROR "package"
}

View File

@ -7,3 +7,6 @@ package a
func init() {
println("a");
}
type T int;

View File

@ -7,3 +7,5 @@ package b
func init() {
println("b");
}
type V int;

View File

@ -9,5 +9,8 @@ package main
import . "./a"
import . "./b"
var _ T
var _ V
func main() {
}

View File

@ -12,7 +12,6 @@
package main
import "log"
import "time"
func f() {