github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/builds/errors.go (about)

     1  package builds
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  // UnknownResourceError is returned when a 'get' or 'put' step refers to a
     8  // resource which is not in the set of resources provided to the Planner.
     9  type UnknownResourceError struct {
    10  	Resource string
    11  }
    12  
    13  func (err UnknownResourceError) Error() string {
    14  	return fmt.Sprintf("unknown resource: %s", err.Resource)
    15  }
    16  
    17  // VersionNotProvidedError is returned when a 'get' step does not have a
    18  // corresponding input provided to the Planner.
    19  type VersionNotProvidedError struct {
    20  	Input string
    21  }
    22  
    23  func (err VersionNotProvidedError) Error() string {
    24  	return fmt.Sprintf("version for input %s not provided", err.Input)
    25  }