github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/src/pkg/packager/filters/empty.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: 2021-Present The Jackal Authors 3 4 // Package filters contains core implementations of the ComponentFilterStrategy interface. 5 package filters 6 7 import "github.com/Racer159/jackal/src/types" 8 9 // Empty returns a filter that does nothing. 10 func Empty() ComponentFilterStrategy { 11 return &emptyFilter{} 12 } 13 14 // emptyFilter is a filter that does nothing. 15 type emptyFilter struct{} 16 17 // Apply returns the components unchanged. 18 func (f *emptyFilter) Apply(pkg types.JackalPackage) ([]types.JackalComponent, error) { 19 return pkg.Components, nil 20 }