summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--model/target.go1
-rw-r--r--runner/base.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/model/target.go b/model/target.go
index 5be97ed..b503381 100644
--- a/model/target.go
+++ b/model/target.go
@@ -13,6 +13,7 @@ type Target interface {
Tags() Tags
ShortestId() string
Visible() bool
+ Invocation(src *Source) []string
}
type HydratedTarget interface {
diff --git a/runner/base.go b/runner/base.go
index 28ea4d5..7435fd7 100644
--- a/runner/base.go
+++ b/runner/base.go
@@ -22,6 +22,7 @@ func (t *BaseTarget) Matches(input string) bool {
func (t *BaseTarget) ShortestId() string {
return t.Reduced
}
+func (b *BaseTarget) Invocation(src *model.Source) []string {
func Hydrated[T model.Target](in T) BaseHydration[T] {
return BaseHydration[T]{
@@ -53,6 +54,10 @@ func (b BaseHydration[T]) Hydrate(src *model.Source) (model.HydratedTarget, erro
return b, nil
}
+func (b BaseHydration[T]) Invocation(src *model.Source) []string {
+ return b.BaseTarget.Invocation(src)
+}
+
func (b BaseHydration[T]) Visible() bool {
return b.BaseTarget.Visible()
}