Files
lo/docs/data/it-entries.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

767 B

name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
name slug sourceRef category subCategory signatures playUrl variantHelpers similarHelpers position
Entries entries it/map.go#L77 it map
func Entries[K comparable, V any](in ...map[K]V) iter.Seq2[K, V]
https://go.dev/play/p/ckLxqTE9KCz
it#map#entries
core#slice#entries
it#map#fromentries
it#map#topairs
20

Transforms a map into a sequence of key/value pairs. Accepts multiple maps and concatenates their entries.

Examples:

m := map[string]int{
    "apple":  1,
    "banana": 2,
    "cherry": 3,
}
entriesSeq := it.Entries(m)
var keys []string
var values []int
for k, v := range entriesSeq {
    keys = append(keys, k)
    values = append(values, v)
}
// keys contains map keys, values contains corresponding values