24 lines
276 B
Go
24 lines
276 B
Go
package withtests
|
|
|
|
import "fmt"
|
|
|
|
var varUsedOnlyInTests bool
|
|
|
|
func usedOnlyInTests() {}
|
|
|
|
type someType struct {
|
|
fieldUsedOnlyInTests bool
|
|
fieldUsedHere bool
|
|
}
|
|
|
|
func usedHere() {
|
|
v := someType{
|
|
fieldUsedHere: true,
|
|
}
|
|
fmt.Println(v)
|
|
}
|
|
|
|
func init() {
|
|
usedHere()
|
|
}
|