// AddInstanceDomainByName adds an instance domain using passed parameters
AddInstanceDomainByName adds an instance domain using passed parameters
// AddInstanceDomainByName adds an instance domain using passed parameters
func (r *PCPRegistry) AddInstanceDomainByName(name string, instances []string) (InstanceDomain, error) {
	if r.HasInstanceDomain(name) {
		return nil, errors.New("The InstanceDomain already exists for this registry")
	}
	indom, err := NewPCPInstanceDomain(name, instances)
	if err != nil {
		return nil, err
	}
	err = r.AddInstanceDomain(indom)
	if err != nil {
		return nil, err
	}
	return indom, nil
}
func ( r * PCPRegistry ) AddInstanceDomainByName ( name string , instances [ ] string ) ( InstanceDomain , error ) { if r . HasInstanceDomain ( name ) { return nil , errors . New ( " " ) } indom , err := NewPCPInstanceDomain ( name , instances ) if err != nil { return nil , err } err = r . AddInstanceDomain ( indom ) if err != nil { return nil , err } return indom , nil }
AddInstanceDomainByName adds an instance domain using passed parameters
AddInstanceDomainByName adds an instance domain using passed parameters