// visitSequence will perform setters for sequences
visitSequence will perform setters for sequences
// visitSequence will perform setters for sequences
func (s *Set) visitSequence(object *yaml.RNode, p string, schema *openapi.ResourceSchema) error {
	ext, err := getExtFromComment(schema)
	if err != nil {
		return err
	}
	if ext == nil || ext.Setter == nil || !s.isMatch(ext.Setter.Name) ||
		len(ext.Setter.ListValues) == 0 {
		return nil
	}
	s.Count++
	var elements []*yaml.Node
	if len(ext.Setter.ListValues) > 0 {
		if err := validateAgainstSchema(ext, schema.Schema); err != nil {
			return err
		}
	}
	for i := range ext.Setter.ListValues {
		v := ext.Setter.ListValues[i]
		n := yaml.NewScalarRNode(v).YNode()
		n.Style = yaml.DoubleQuotedStyle
		elements = append(elements, n)
	}
	object.YNode().Content = elements
	object.YNode().Style = yaml.FoldedStyle
	return nil
}
func ( s * Set ) visitSequence ( object * yaml . RNode , p string , schema * openapi . ResourceSchema ) error { ext , err := getExtFromComment ( schema ) if err != nil { return err } if ext == nil || ext . Setter == nil || ! s . isMatch ( ext . Setter . Name ) || len ( ext . Setter . ListValues ) == 0 { return nil } s . Count ++ var elements [ ] * yaml . Node if len ( ext . Setter . ListValues ) > 0 { if err := validateAgainstSchema ( ext , schema . Schema ) ; err != nil { return err } } for i := range ext . Setter . ListValues { v := ext . Setter . ListValues [ i ] n := yaml . NewScalarRNode ( v ) . YNode ( ) n . Style = yaml . DoubleQuotedStyle elements = append ( elements , n ) } object . YNode ( ) . Content = elements object . YNode ( ) . Style = yaml . FoldedStyle return nil }
visitSequence will perform setters for sequences
visitSequence will perform setters for sequences
// setter was not invoked for this sequence // set the values on the sequences