mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 09:54:47 +01:00
d684302864
tests expected that a KeepRule returns a *keep* list whereas it actually returns a *destroy* list.
16 lines
338 B
Go
16 lines
338 B
Go
package pruning
|
|
|
|
type KeepNotReplicated struct {
|
|
forceConstructor struct{}
|
|
}
|
|
|
|
func (*KeepNotReplicated) KeepRule(snaps []Snapshot) (destroyList []Snapshot) {
|
|
return filterSnapList(snaps, func(snapshot Snapshot) bool {
|
|
return snapshot.Replicated()
|
|
})
|
|
}
|
|
|
|
func NewKeepNotReplicated() *KeepNotReplicated {
|
|
return &KeepNotReplicated{}
|
|
}
|