GoString implements the fmt.GoStringer interface which is used when formatting using the "%#v" format specifier.
()
| 702 | // GoString implements the fmt.GoStringer interface which is used when |
| 703 | // formatting using the "%#v" format specifier. |
| 704 | func (m *Map[K, V]) GoString() string { |
| 705 | var buf strings.Builder |
| 706 | fmt.Fprintf(&buf, "used=%d global-depth=%d bucket-count=%d\n", m.used, m.globalDepth(), m.bucketCount()) |
| 707 | m.buckets(0, func(b *bucket[K, V]) bool { |
| 708 | fmt.Fprintf(&buf, "bucket %d (%p): local-depth=%d\n", b.index, b, b.localDepth) |
| 709 | b.goFormat(&buf) |
| 710 | return true |
| 711 | }) |
| 712 | return buf.String() |
| 713 | } |
| 714 | |
| 715 | // Len returns the number of entries in the map. |
| 716 | func (m *Map[K, V]) Len() int { |
nothing calls this directly
no test coverage detected