p2p/dnsdisc: using maps.Copy (#29377)
This commit is contained in:
parent
3b77e0ff4b
commit
3754a6cc92
@ -20,6 +20,7 @@ import (
|
||||
"context"
|
||||
"crypto/ecdsa"
|
||||
"errors"
|
||||
"maps"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
@ -453,9 +454,7 @@ func (mr mapResolver) clear() {
|
||||
}
|
||||
|
||||
func (mr mapResolver) add(m map[string]string) {
|
||||
for k, v := range m {
|
||||
mr[k] = v
|
||||
}
|
||||
maps.Copy(mr, m)
|
||||
}
|
||||
|
||||
func (mr mapResolver) LookupTXT(ctx context.Context, name string) ([]string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user