github.com/wolfi-dev/wolfictl@v0.16.11/pkg/configs/advisory/v2/pending_upstream_fix.go (about)

     1  package v2
     2  
     3  import "errors"
     4  
     5  // PendingUpstreamFix is an event type that indicates that the package is
     6  // expected to remain unfixed until the maintainers of the package's upstream
     7  // project implement a fix themselves.
     8  //
     9  // This event type is distinct from FixNotPlanned, which signals an expectation
    10  // that no fix is ever coming.
    11  //
    12  // PendingUpstreamFix is used in cases where a fix requires nontrivial upstream
    13  // changes that should be managed by the upstream maintainers.
    14  type PendingUpstreamFix struct {
    15  	// Note should explain why an upstream fix is anticipated or necessary.
    16  	Note string `yaml:"note"`
    17  }
    18  
    19  // Validate returns an error if the PendingUpstreamFix data is invalid.
    20  func (f PendingUpstreamFix) Validate() error {
    21  	if f.Note == "" {
    22  		return errors.New("note must not be empty")
    23  	}
    24  	return nil
    25  }