github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/actor/actionerror/space_not_found_error.go (about)

     1  package actionerror
     2  
     3  import "fmt"
     4  
     5  // SpaceNotFoundError represents the scenario when the space searched for could
     6  // not be found.
     7  type SpaceNotFoundError struct {
     8  	GUID string
     9  	Name string
    10  }
    11  
    12  func (e SpaceNotFoundError) Error() string {
    13  	switch {
    14  	case e.Name != "":
    15  		return fmt.Sprintf("Space '%s' not found.", e.Name)
    16  	case e.GUID != "":
    17  		return fmt.Sprintf("Space with GUID '%s' not found.", e.GUID)
    18  	default:
    19  		return fmt.Sprintf("Space '' not found.")
    20  	}
    21  }