engine: resources: Add some compile time checks for groupers
These can "break" silently and not autogroup if we change the resource and it no longer fulfills the interface. Add this compile time check to prevent that.
This commit is contained in:
@@ -70,6 +70,8 @@ func init() {
|
||||
engine.RegisterResource(httpServerUIKind, func() engine.Res { return &HTTPServerUIRes{} })
|
||||
}
|
||||
|
||||
var _ HTTPServerGroupableRes = &HTTPServerUIRes{} // compile time check
|
||||
|
||||
// HTTPServerUIGroupableRes is the interface that you must implement if you want
|
||||
// to allow a resource the ability to be grouped into the http server ui
|
||||
// resource. As an added safety, the Kind must also begin with
|
||||
|
||||
Reference in New Issue
Block a user