Files
pipelines/internal/protocol/terminals.go
T

21 lines
481 B
Go

package protocol
const (
SuccessEnd = "#success"
FailureEnd = "#failure"
)
func IsTerminal(target string) bool { return target == SuccessEnd || target == FailureEnd }
// ResolveTarget preserves the original # shorthand while making its terminal
// result explicit in normalized definitions and legacy stored graphs.
func ResolveTarget(outcome, target string) string {
if target != "#" {
return target
}
if outcome == "error" {
return FailureEnd
}
return SuccessEnd
}