mirror of https://github.com/knative/func.git
23 lines
311 B
Go
23 lines
311 B
Go
package mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
fn "knative.dev/kn-plugin-func"
|
|
)
|
|
|
|
type Runner struct {
|
|
RunInvoked bool
|
|
RootRequested string
|
|
}
|
|
|
|
func NewRunner() *Runner {
|
|
return &Runner{}
|
|
}
|
|
|
|
func (r *Runner) Run(ctx context.Context, f fn.Function) error {
|
|
r.RunInvoked = true
|
|
r.RootRequested = f.Root
|
|
return nil
|
|
}
|