View methods of embedded type in "Structure" pane?

Consider the following simple struct which embeds another struct:

 

type Address struct {
street string
}

func (a Address) Street() string {
return a.street
}

type Person struct {
Address

name string
}

func main() {
p := Person{
Address: Address{ street: "123 Main St" },
name: "Jonah",
}

fmt.Println(p.Street())
}



Which is displayed like this in the structure pane:

 

 

As you can see, "Person" does not list the "Street()" method, even though that method is available on Person through the embedded struct Address.

Is there a setting which will show it?

0
1 comment

Hi Jonah,

there is no such option at this time, please watch/vote for https://youtrack.jetbrains.com/issue/GO-8213.

 

0

Please sign in to leave a comment.