From e8cacbc0ad1535ffaa40a5d021a456ca95ae42d8 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Thu, 26 Oct 2023 22:10:56 -0400 Subject: [PATCH] Add link to runtime.hmap struct --- docs/28-maps-memory-leaks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/28-maps-memory-leaks.md b/docs/28-maps-memory-leaks.md index 865c236..fcf1fcc 100644 --- a/docs/28-maps-memory-leaks.md +++ b/docs/28-maps-memory-leaks.md @@ -77,7 +77,7 @@ Each bucket is a fixed-size array of eight elements. In the case of an insertion -Under the hood, a Go map is a pointer to a runtime.hmap struct. This struct contains multiple fields, including a B field, giving the number of buckets in the map: +Under the hood, a Go map is a pointer to a [runtime.hmap](https://github.com/golang/go/blob/0262ea1ff9ac3b9fd268a48fcaaa6811c20cbea2/src/runtime/map.go#L117-L131) struct. This struct contains multiple fields, including a B field, giving the number of buckets in the map: ```go type hmap struct {