-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
Compile this file multiple times:
package p
import (
"bufio"
"bytes"
"crypto/x509"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"math"
"math/big"
"math/bits"
"net"
"net/http"
"os"
"path"
"path/filepath"
"regexp"
"strings"
)
The output varies. Two sample runs:
$ go tool compile x.go
x.go:6:2: imported and not used: "crypto/x509"
x.go:9:2: imported and not used: "io"
x.go:10:2: imported and not used: "io/ioutil"
x.go:11:2: imported and not used: "log"
x.go:12:2: imported and not used: "math"
x.go:13:2: imported and not used: "math/big"
x.go:16:2: imported and not used: "net/http"
x.go:18:2: imported and not used: "path"
x.go:19:2: imported and not used: "path/filepath"
x.go:21:2: imported and not used: "strings"
x.go:10:2: too many errors
$ go tool compile x.go
x.go:4:2: imported and not used: "bufio"
x.go:5:2: imported and not used: "bytes"
x.go:11:2: imported and not used: "log"
x.go:12:2: imported and not used: "math"
x.go:13:2: imported and not used: "math/big"
x.go:14:2: imported and not used: "math/bits"
x.go:15:2: imported and not used: "net"
x.go:17:2: imported and not used: "os"
x.go:20:2: imported and not used: "regexp"
x.go:21:2: imported and not used: "strings"
x.go:14:2: too many errors
It'd be preferable for the output to be deterministic.
Fix is easy and safe; CL soon.