mirror of https://github.com/knative/func.git
18 lines
347 B
Go
18 lines
347 B
Go
package mock
|
|
|
|
import "context"
|
|
|
|
type Remover struct {
|
|
RemoveInvoked bool
|
|
RemoveFn func(string, string) error
|
|
}
|
|
|
|
func NewRemover() *Remover {
|
|
return &Remover{RemoveFn: func(string, string) error { return nil }}
|
|
}
|
|
|
|
func (r *Remover) Remove(ctx context.Context, name, ns string) error {
|
|
r.RemoveInvoked = true
|
|
return r.RemoveFn(name, ns)
|
|
}
|