From 7b1bfc80a43168ae2ca572445f50bb0595429ee3 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 30 Jun 2021 05:49:43 +0300 Subject: [PATCH] add fallback Signed-off-by: Vasiliy Tolstov --- flow/options.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flow/options.go b/flow/options.go index 0db4d324..f3066311 100644 --- a/flow/options.go +++ b/flow/options.go @@ -190,6 +190,7 @@ type StepOptions struct { ID string Context context.Context Requires []string + Fallback string } type StepOption func(*StepOptions) @@ -213,3 +214,9 @@ func StepRequires(steps ...string) StepOption { o.Requires = steps } } + +func StepFallback(step string) StepOption { + return func(o *StepOptions) { + o.Fallback = step + } +}