| 1 |
// Package pkg ... |
| 2 |
package pkg |
| 3 |
|
| 4 |
import ( |
| 5 |
"fmt" //@ diag(`package "fmt" is being imported more than once`) |
| 6 |
fmt1 "fmt" |
| 7 |
fmt2 "fmt" |
| 8 |
|
| 9 |
fine "net/http" |
| 10 |
|
| 11 |
"os" //@ diag(`package "os" is being imported more than once`) |
| 12 |
os1 "os" |
| 13 |
|
| 14 |
"C" |
| 15 |
_ "unsafe" |
| 16 |
|
| 17 |
// This imports the package for its side effects, and then again to use it. |
| 18 |
// If we flagged this, the user would have to remove the _ import. But if |
| 19 |
// later the user stopped using the package directly, they'd be prone to |
| 20 |
// removing the import, losing its side effects. |
| 21 |
"net/http/pprof" |
| 22 |
_ "net/http/pprof" |
| 23 |
|
| 24 |
_ "strconv" |
| 25 |
strconv1 "strconv" //@ diag(`package "strconv" is being imported more than once`) |
| 26 |
strconv2 "strconv" |
| 27 |
) |
| 28 |
|
| 29 |
var _ = fmt.Println |
| 30 |
var _ = fmt1.Println |
| 31 |
var _ = fmt2.Println |
| 32 |
var _ = fine.ListenAndServe |
| 33 |
var _ = os.Getenv |
| 34 |
var _ = os1.Getenv |
| 35 |
var _ = pprof.Cmdline |
| 36 |
var _ = strconv1.AppendBool |
| 37 |
var _ = strconv2.AppendBool |