// Validate Validate the specified workflow
Validate Validate the specified workflow
// Validate Validate the specified workflow
func Validate(workflowSpec *v1.WorkflowSpec) error {
	if len(workflowSpec.Steps) == 0 {
		return newValidationError("Workflow must contain at least 1 step!")
	}
	stepSelector := make([]int, 1, 2)
	for stepNumber, step := range workflowSpec.Steps {
		stepSelector[0] = stepNumber
		err := validateStepInternal(&step, stepSelector, false)
		if err != nil {
			return err
		}
	}
	return nil
}
func Validate ( workflowSpec * v1 . WorkflowSpec ) error { if len ( workflowSpec . Steps ) == 0 { return newValidationError ( " " ) } stepSelector := make ( [ ] int , 1 , 2 ) for stepNumber , step := range workflowSpec . Steps { stepSelector [ 0 ] = stepNumber err := validateStepInternal ( & step , stepSelector , false ) if err != nil { return err } } return nil }
Validate Validate the specified workflow
Validate Validate the specified workflow