golang/xenlight: export keyed union interface types
authorNick Rosbrook <rosbrookn@gmail.com>
Mon, 24 May 2021 20:36:45 +0000 (16:36 -0400)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 21 Jun 2021 15:49:08 +0000 (16:49 +0100)
commitbc9f632e31ee66be3f1860fc7303fe91a42e56a6
tree48921ebbfeac2f6dff512215da8f3fadc50c42b5
parent1422d8db1b3dfdf7d9179944e594876e5e356a4b
golang/xenlight: export keyed union interface types

For structs that have a keyed union, e.g. DomainBuildInfo, the TypeUnion
field must be exported so that package users can get/set the fields
within. This means that users are aware of the existence of the
interface type used in those fields (see [1]), so it is awkward that the
interface itself is not exported. However, the single method within the
interface must remain unexported so that users cannot mistakenly "implement"
those interfaces.

Since there seems to be no reason to do otherwise, export the keyed
union interface types.

[1] https://pkg.go.dev/xenbits.xenproject.org/git-http/xen.git/tools/golang/xenlight?tab=doc#DeviceUsbdev

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/gengotypes.py
tools/golang/xenlight/types.gen.go