internal: Annotate all components with groups

This commit ensures that the compiler has to check every component
against the groups they implement by explicitly annotating the
appropriate interfaces.
This commit is contained in:
Tom Wiesing 2022-11-30 11:08:46 +01:00
parent 3455f491ca
commit 890022ae64
No known key found for this signature in database
29 changed files with 163 additions and 33 deletions

View file

@ -17,6 +17,10 @@ type Pathbuilder struct {
PHP *php.PHP
}
var (
_ ingredient.WissKIFetcher = (*Pathbuilder)(nil)
)
//go:embed pathbuilder.php
var pathbuilderPHP string

View file

@ -25,6 +25,10 @@ type Prefixes struct {
MStore *mstore.MStore
}
var (
_ ingredient.WissKIFetcher = (*Prefixes)(nil)
)
// NoPrefix checks if this WissKI instance is excluded from generating prefixes.
// TODO: Move this to the database!
func (prefixes *Prefixes) NoPrefix() bool {

View file

@ -16,6 +16,10 @@ type Stats struct {
PHP *php.PHP
}
var (
_ ingredient.WissKIFetcher = (*Stats)(nil)
)
//go:embed stats.php
var statsPHP string

View file

@ -18,6 +18,10 @@ type Users struct {
PHP *php.PHP
}
var (
_ ingredient.WissKIFetcher = (*Users)(nil)
)
//go:embed users.php
var usersPHP string