func (d *Domain) AddEntitlementIDs(entitlementIDs ...string) {
	for _, entitlementID := range entitlementIDs {
		if _, ok := d.entitlementIDs[entitlementID]; !ok {
			d.entitlementIDs[entitlementID] = true
		}
	}
}
AddEntitlementIDs adds entitlements by IDs to the given domain
package domainmanager
import (
	"fmt"
	"strings"
	"github.com/moby/libentitlement/parser"
	"github.com/sirupsen/logrus"
)
type Domain struct {
	name           string
	subdomains     map[string]*Domain
	entitlementIDs map[string]bool
}
func NewDomain(name string) *Domain {
	if parser.IsValidDomainName(name) == false {
		logrus.Errorf("Invalid domain name for: %s", name)
	}
	subdomainsMap := make(map[string]*Domain)
	entitlementIDList := make(map[string]bool)
	return &Domain{name: name, subdomains: subdomainsMap, entitlementIDs: entitlementIDList}
}
func (d *Domain) AddSubdomains(subdomains ...*Domain) {
	for _, subdomain := range subdomains {
		d.subdomains[subdomain.name] = subdomain
	}
}