gollum icon indicating copy to clipboard operation
gollum copied to clipboard

Configure is not called unless a component is public.

Open arnecls opened this issue 6 years ago • 1 comments

During the check for struct tags, nested components are iterated, too (if they are not pointers). If a component has a configure method it is called. However this does only work if the component is public.

type Foo struct {
    sub1 Component // Configure is not called
    Sub2 Component // Configure is called
}

See if there is a way to make this work on private members, too.

arnecls avatar Jul 20 '17 12:07 arnecls

As a sidenote: Due to the embedded structs being public they show up in the godocs documentation. This is important as configuration parameters are inherited but not shown in the godocs pages. Clicking on the embedded members somewhat solves this problem.

arnecls avatar Jul 24 '17 08:07 arnecls