github.com/loafoe/cli@v7.1.0+incompatible/actor/actionerror/multiple_organizations_found_error.go (about)

     1  package actionerror
     2  
     3  import (
     4  	"fmt"
     5  	"strings"
     6  )
     7  
     8  // MultipleOrganizationsFoundError represents the scenario when the cloud
     9  // controller returns multiple organizations when filtering by name. This is a
    10  // far out edge case and should not happen.
    11  type MultipleOrganizationsFoundError struct {
    12  	Name  string
    13  	GUIDs []string
    14  }
    15  
    16  func (e MultipleOrganizationsFoundError) Error() string {
    17  	guids := strings.Join(e.GUIDs, ", ")
    18  	return fmt.Sprintf("Organization name '%s' matches multiple GUIDs: %s", e.Name, guids)
    19  }