INNER CODE UNIT · Go

func

kubernetes/enhancements · api/approval.go:51

func (prr *PRRApproval) Validate() error {
	v := validator.New()
	if err := v.Struct(prr); err != nil {
		return errors.Wrap(err, "running validation")
	}

	return nil
}

func (prr *PRRApproval) ApproverForStage(stage Stage) (string, error) {
	if err := stage.IsValid(); err != nil {
		return "", err
	}

	// KEPs are usually of 2 types:
	// 1. Features that go through Alpha->Beta->Stable
	// 2. Removals that go through Deprecated->Disabled->Removed
	if prr.Alpha == nil && prr.Beta == nil && prr.Stable == nil && prr.Deprecated == nil && prr.Disabled == nil && prr.Removed == nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…