This commit ensures that the compiler has to check every component against the groups they implement by explicitly annotating the appropriate interfaces.
25 lines
469 B
Go
25 lines
469 B
Go
package info
|
|
|
|
import (
|
|
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
|
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
|
)
|
|
|
|
type SnapshotsFetcher struct {
|
|
ingredient.Base
|
|
|
|
Info *Info
|
|
}
|
|
|
|
var (
|
|
_ ingredient.WissKIFetcher = (*SnapshotsFetcher)(nil)
|
|
)
|
|
|
|
func (lbr *SnapshotsFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
|
|
if flags.Quick {
|
|
return
|
|
}
|
|
|
|
info.Snapshots, _ = lbr.Snapshots(flags.Context)
|
|
return
|
|
}
|