wisski-cloud-distillery/internal/wisski/ingredient/info/snapshots.go
Tom Wiesing 890022ae64
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.
2022-11-30 11:08:46 +01:00

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
}