Add adds a domain to the set. Safe for concurrent use.
(domain string)
| 119 | |
| 120 | // Add adds a domain to the set. Safe for concurrent use. |
| 121 | func (ds *DomainSet) Add(domain string) { |
| 122 | if domain != "" { |
| 123 | ds.mu.Lock() |
| 124 | ds.domains[domain] = struct{}{} |
| 125 | ds.mu.Unlock() |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | // AddAll adds multiple domains to the set. Safe for concurrent use. |
| 130 | func (ds *DomainSet) AddAll(domains []string) { |
no outgoing calls