Stop using relative imports and add a go.mod file. Tested against Go 1.6 through Go pre-1.13, and gccgo.
17 lines
168 B
Go
17 lines
168 B
Go
package main
|
|
|
|
import . "naturalvar"
|
|
|
|
func main() {
|
|
f := NewFoo()
|
|
b := NewBar()
|
|
|
|
b.SetF(f)
|
|
|
|
SetS("hello")
|
|
b.SetS("hello")
|
|
|
|
if b.GetS() != GetS() {
|
|
panic(0)
|
|
}
|
|
}
|