From 615889e00e744f76a8e4e1bade2367bde8598878 Mon Sep 17 00:00:00 2001 From: ewy Date: Wed, 22 Apr 2026 17:09:06 +0200 Subject: add "invocation" method which expects a target to output its own magic spell --- runner/base.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runner') 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() } -- cgit v1.3.1