// NewSimpleFakeResourceFinder builds a super simple ResourceFinder that just iterates over the objects you provided func NewSimpleFakeResourceFinder(infos ...*resource.Info) *FakeResourceFinder { … } func (f *FakeResourceFinder) WithError(err error) *FakeResourceFinder { … } type FakeResourceFinder … // Do implements the interface func (f *FakeResourceFinder) Do() resource.Visitor { … } type fakeResourceResult … // Visit just iterates over info func (r *fakeResourceResult) Visit(fn resource.VisitorFunc) error { … }