Stop using relative imports and add a go.mod file. Tested against Go 1.6 through Go pre-1.13, and gccgo.
15 lines
212 B
Go
15 lines
212 B
Go
package main
|
|
|
|
import wrap "inherit_member"
|
|
|
|
func main() {
|
|
s := wrap.NewChild()
|
|
s.SetPvar("p")
|
|
s.SetCvar("c")
|
|
if s.GetPvar() != "p" {
|
|
panic(s.GetPvar())
|
|
}
|
|
if s.GetCvar() != "c" {
|
|
panic(s.GetCvar())
|
|
}
|
|
}
|