Debugging the Set data struct. Fix mistyping

This commit is contained in:
2025-01-19 23:19:56 +03:00
parent 05e035925f
commit 19b44c14d9
2 changed files with 15 additions and 15 deletions

View File

@ -44,7 +44,6 @@ func convertInterfaceSliceToStruct(slice []interface{}) *[]dns.Record {
return &domains return &domains
} }
func (c *client) AddRecord(rec *dns.Record) (error, *dns.Response) { func (c *client) AddRecord(rec *dns.Record) (error, *dns.Response) {
c.Locker.Lock() c.Locker.Lock()
defer c.Locker.Unlock() defer c.Locker.Unlock()
@ -142,7 +141,7 @@ func (c *client) UpdateRecord(rec *dns.Record) (error, *dns.Response) {
return nil, &dns.Response{Message: string(body)} return nil, &dns.Response{Message: string(body)}
} }
func (c *client) GetRecords() (error, []*dns.Record) { func (c *client) GetRecords() (error, *[]dns.Record) {
var subdomains = CreateSet() var subdomains = CreateSet()
var wg sync.WaitGroup var wg sync.WaitGroup
@ -180,7 +179,8 @@ func (c *client) GetRecords() (error, []*dns.Record) {
select { select {
case records, ok := <-result_chan: case records, ok := <-result_chan:
if !ok { if !ok {
return nil, convertInterfaceSliceToStruct(subdomains.List()) records_new := convertInterfaceSliceToStruct(subdomains.List())
return nil, records_new
} }
for record := range records { for record := range records {

2
go.mod
View File

@ -3,7 +3,7 @@ module git.uoc.run.place/OxFF/dnsexit-manager
go 1.23.4 go 1.23.4
require ( require (
git.uoc.run.place/OxFF/dns-manager v0.0.0-20250107205730-c4ab438a9fd5 // indirect git.uoc.run.place/OxFF/dns-manager v0.0.0-20250114185820-a31877a751b9 // indirect
github.com/miekg/dns v1.1.62 // indirect github.com/miekg/dns v1.1.62 // indirect
golang.org/x/mod v0.18.0 // indirect golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.27.0 // indirect golang.org/x/net v0.27.0 // indirect