github.com/paketo-buildpacks/packit@v1.3.2-0.20211206231111-86b75c657449/fail.go (about)

     1  package packit
     2  
     3  import "github.com/paketo-buildpacks/packit/internal"
     4  
     5  // Fail is a sentinal value that can be used to indicate a failure to detect
     6  // during the detect phase. Fail implements the Error interface and should be
     7  // returned as the error value in the DetectFunc signature. Fail also supports
     8  // a modifier function, WithMessage, that allows the caller to set a custom
     9  // failure message. The WithMessage function supports a fmt.Printf-like format
    10  // string and variadic arguments to build a message, eg:
    11  // packit.Fail.WithMessage("failed: %w", err).
    12  var Fail = internal.Fail