func (c *VaultClient) GetAccount(id string) (*Account, error) {
	length := 2
	bits := strings.Split(id, "/")

	if len(bits) < length {
		return nil, errors.Errorf("%s is not a valid account specifier", id)
	}

	accountType := bits[0]
	accountName := bits[1]

	switch accountType {
	case "aws":
		return c.newAwsAccount(accountName)
	case "azure":
		return c.newAzureAccount(accountName)
	case "github":
		return c.newGithubAccount(accountName)
	case "google":
		return c.newGoogleAccount(accountName)
	default:
		return nil, errors.Errorf("unsupported account type: %s", accountType)
	}
}
// GetAccount will determine which account to use from the specified id.
GetAccount will determine which account to use from the specified id.
// GetAccount will determine which account to use from the specified id .
func (c *VaultClient) GetAccount(id string) (*Account, error) {
	length := 2
	bits := strings.Split(id, "/")
	if len(bits) < length {
		return nil, errors.Errorf("%s is not a valid account specifier", id)
	}
	accountType := bits[0]
	accountName := bits[1]
	switch accountType {
	case "aws":
		return c.newAwsAccount(accountName)
	case "azure":
		return c.newAzureAccount(accountName)
	case "github":
		return c.newGithubAccount(accountName)
	case "google":
		return c.newGoogleAccount(accountName)
	default:
		return nil, errors.Errorf("unsupported account type: %s", accountType)
	}
}
func ( c * VaultClient ) GetAccount ( id string ) ( * Account , error ) { length := 2 bits := strings . Split ( id , " " ) if len ( bits ) < length { return nil , errors . Errorf ( " " , id ) } accountType := bits [ 0 ] accountName := bits [ 1 ] switch accountType { case " " : return c . newAwsAccount ( accountName ) case " " : return c . newAzureAccount ( accountName ) case " " : return c . newGithubAccount ( accountName ) case " " : return c . newGoogleAccount ( accountName ) default : return nil , errors . Errorf ( " " , accountType ) } }
GetAccount will determine which account to use from the specified id.
GetAccount will determine which account to use from the specified id .