github.com/cloudfoundry-community/cloudfoundry-cli@v6.44.1-0.20240130060226-cda5ed8e89a5+incompatible/util/manifestparser/validation.go (about)

     1  package manifestparser
     2  
     3  type validatorFunc func(Parser) error
     4  
     5  func (parser Parser) Validate() error {
     6  	var err error
     7  
     8  	for _, validator := range parser.validators {
     9  		err = validator(parser)
    10  		if err != nil {
    11  			return err
    12  		}
    13  	}
    14  
    15  	return nil
    16  }