Debugging the Set data struct
This commit is contained in:
@ -34,6 +34,17 @@ type dnsexitDTO struct {
|
||||
Delete *dns.Record `json:"delete,omitempty"`
|
||||
}
|
||||
|
||||
func convertInterfaceSliceToStruct(slice []interface{}) *[]dns.Domain {
|
||||
var domains []dns.Domain
|
||||
|
||||
for _, domain := range slice {
|
||||
fmt.Println(domain)
|
||||
}
|
||||
|
||||
return &domains
|
||||
}
|
||||
|
||||
|
||||
func (c *client) AddRecord(rec *dns.Record) (error, *dns.Response) {
|
||||
c.Locker.Lock()
|
||||
defer c.Locker.Unlock()
|
||||
@ -169,7 +180,7 @@ func (c *client) GetRecords() (error, []*dns.Record) {
|
||||
select {
|
||||
case records, ok := <-result_chan:
|
||||
if !ok {
|
||||
return nil, subdomains.List()
|
||||
return nil, convertInterfaceSliceToStruct(subdomains.List())
|
||||
}
|
||||
|
||||
for record := range records {
|
||||
|
Reference in New Issue
Block a user