1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:04:44 -07:00
go/internal/memoize
Rebecca Stambler ecc01b7716 internal/memoize: document the complicated parts of the memoize package
This change is more of an exercise for myself to better understand the
implementation of the memoize package. It adds detailed documentation
for the get function in particular.

I also modified the tests to use a table-driven test format. I'm not
certain if this was the right approach (in case we want to add a
different type of test case in the future), but for now, it seems to
work fine.

Change-Id: I191a3b65af230e0af54b221c9f671582adec6c79
Reviewed-on: https://go-review.googlesource.com/c/tools/+/181685
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-06-12 16:51:35 +00:00
..
memoize_test.go internal/memoize: document the complicated parts of the memoize package 2019-06-12 16:51:35 +00:00
memoize.go internal/memoize: document the complicated parts of the memoize package 2019-06-12 16:51:35 +00:00
nocopy.go internal/memoize: a new library to memoize functions 2019-06-10 23:17:49 +00:00