]> Cypherpunks.ru repositories - gostls13.git/commit
reflect: deprecate (Slice|String)Header
authorCarlo Alberto Ferraris <cafxx@strayorange.com>
Thu, 21 Apr 2022 08:49:12 +0000 (17:49 +0900)
committerGopher Robot <gobot@golang.org>
Wed, 18 May 2022 15:15:29 +0000 (15:15 +0000)
commitbc2e961cf4cda945dc6d607a5076b4e376553e9f
treef57f4b4c3ec67188d2ff72e030db375949b176c1
parent5f2fdbe7ed58bc98b60521bde2f3fcdc4af20826
reflect: deprecate (Slice|String)Header

As discussed in CL 401434 there are substantial misuses of these in the
wild, and they are a potential source of unsafety even for code that
does not use them directly.

We should either keep them as-is and document when/how they can be used
safely, or deprecate them so that uses will eventually die out.

After some discussion, it was decided to deprecate them outright.
Since the docs already mentioned that they may be unstable across
releases, it should be possible to get rid of them completely later on.

Change-Id: I3b75819409177b5a286c1e9861a2edb6fd1301b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/401434
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
doc/go1.19.html
src/reflect/value.go