| 1 |
// Deprecated: this package is deprecated. |
| 2 |
package pkg |
| 3 |
|
| 4 |
import _ "example.com/CheckDeprecated.assist" //@ diag(`Alas, it is deprecated.`) |
| 5 |
import _ "example.com/AnotherCheckDeprecated.assist" //@ diag(`Alas, it is deprecated.`) |
| 6 |
import foo "example.com/AnotherCheckDeprecated.assist" //@ diag(`Alas, it is deprecated.`) |
| 7 |
import "example.com/AnotherCheckDeprecated.assist" //@ diag(`Alas, it is deprecated.`) |
| 8 |
|
| 9 |
func init() { |
| 10 |
foo.Fn() |
| 11 |
AnotherCheckDeprecatedassist.Fn() |
| 12 |
|
| 13 |
// Field is deprecated, but we're using it from the same package, which is fine. |
| 14 |
var s S |
| 15 |
_ = s.Field |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
type S struct { |
| 20 |
// Deprecated: this is deprecated. |
| 21 |
Field int |
| 22 |
} |