Skip to content

Commit 18f8f8e

Browse files
committed
dnsx/alg: s/flatten/vals
1 parent 32dd625 commit 18f8f8e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

intra/dnsx/alg.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func NewXips(tid, uid string, pri, sec []netip.Addr, ttl time.Time) *xips {
241241
return x
242242
}
243243

244-
func flatten[K comparable, V any](m map[K]V, upto uint) []V {
244+
func vals[K comparable, V any](m map[K]V, upto uint) []V {
245245
outv := make([]V, 0, upto)
246246
for _, v := range m {
247247
if upto != 0 && uint(len(outv)) >= upto {
@@ -283,7 +283,7 @@ func (p *xips) allips(t xaddrtyp, s xaddrstatus) (out []netip.Addr) {
283283
g = p.aux
284284
}
285285
const all = 0
286-
for _, v := range flatten(g, all) {
286+
for _, v := range vals(g, all) {
287287
out = append(out, v.get(s)...)
288288
}
289289
return

intra/dnsx/plus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (t *plus) all() []Transport {
9393
defer t.mu.RUnlock()
9494

9595
const all = 0
96-
return flatten(t.transports, all)
96+
return vals(t.transports, all)
9797
}
9898

9999
func (t *plus) ID() *x.Gostr {

0 commit comments

Comments
 (0)