MCPcopy
hub / github.com/grpc/grpc-go / all

Method all

attributes/attributes.go:161–174  ·  view source on GitHub ↗

all returns an iterator that yields all key-value pairs in the Attributes chain. If a key appears multiple times, only the most recently added value is yielded.

()

Source from the content-addressed store, hash-verified

159// chain. If a key appears multiple times, only the most recently added value
160// is yielded.
161func (a *Attributes) all() iter.Seq2[any, any] {
162 return func(yield func(any, any) bool) {
163 seen := map[any]bool{}
164 for cur := a; cur != nil; cur = cur.parent {
165 if seen[cur.key] {
166 continue
167 }
168 if !yield(cur.key, cur.value) {
169 return
170 }
171 seen[cur.key] = true
172 }
173 }
174}

Callers 2

EqualMethod · 0.95
StringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected