code: func (v *ValidationMessages) getWarnings() error {
  	var messages []string
  	for _, msg := range v.Messages {
  		if msg.Typ == WARN || msg.Typ == CRIT {
  			messages = append(messages, msg.Message)
  		}
  	}
  	if len(messages) > 0 {
  		return fmt.Errorf("Validation failed: %s", strings.Join(messages, ","))
  	}
  	return nil
  }
docs: /// getWarnings returns an error with all messages of type WARN of above, or nil if no warnings were present