Skip to content

Commit

Permalink
few more edits to the way arrays are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
NicJellz committed Feb 2, 2021
1 parent 93affe0 commit 06e4e1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ func updateDisposableDomains(source string) error {
}

// clear up invalid disposable domains
disposableDomains.Range(func(key, value interface{}) bool {
if _, exists := newDomains[key.(string)]; !exists {
disposableDomains.Delete(key)
}
return true
})
/*
disposableDomains.Range(func(key, value interface{}) bool {
if _, exists := newDomains[key.(string)]; !exists {
disposableDomains.Delete(key)
}
return true
})
// update new domain data
for _, d := range domains {
disposableDomains.Store(d, struct{}{})
}
// update new domain data
for _, d := range domains {
disposableDomains.Store(d, struct{}{})
}
*/
return nil
}
2 changes: 1 addition & 1 deletion verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func loadDisposableDomains() {
return
}

disposableDomains := strings.Split(disposableEmails, ",")
disposableDomains = strings.Split(disposableEmails, ",")

disposableDomainsLoaded = true
}
Expand Down

0 comments on commit 06e4e1a

Please sign in to comment.