]> Cypherpunks repositories - gostls13.git/commit
slices: document and test nilness behavior of all functions
authorAlan Donovan <adonovan@google.com>
Mon, 12 May 2025 17:16:23 +0000 (13:16 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 29 May 2025 18:14:52 +0000 (11:14 -0700)
commit4878b4471bf1267a8f87b40ed49b36ab82b79d18
tree2800dbb43272531fd64d85b63c556826e68cb1d3
parent7b4d065267aec8f899a5c5423c1ac501d31807cc
slices: document and test nilness behavior of all functions

This change documents the current nilness behavior of all
functions in the package, and asserts each with a test.

There is no change to behavior, but the postcondition is
strengthened, so this may require a proposal.

Fixes #73604
Fixes #73048

Change-Id: Ieb68e609a1248bd81c8507d3795785622a65f8cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/671996
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
src/slices/iter.go
src/slices/slices.go
src/slices/slices_test.go