mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-15 09:19:21 +02:00
20 lines
414 B
Go
20 lines
414 B
Go
package geosite
|
|
|
|
import "github.com/xtls/xray-core/common/matcher/domain"
|
|
|
|
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
|
|
|
|
func ToDomains(dms []*Domain) []*domain.Domain {
|
|
dm := make([]*domain.Domain, len(dms))
|
|
|
|
for idx, entry := range dms {
|
|
dm[idx] = entry.ToDomain()
|
|
}
|
|
|
|
return dm
|
|
}
|
|
|
|
func (d *Domain) ToDomain() *domain.Domain {
|
|
return &domain.Domain{Type: d.Type, Value: d.Value}
|
|
}
|