]> Cypherpunks repositories - gostls13.git/commit
internal/reflectlite: include Kind in ValueError message
authorOri Rawlings <orirawlings@gmail.com>
Fri, 29 May 2020 03:41:38 +0000 (22:41 -0500)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Oct 2020 00:15:09 +0000 (00:15 +0000)
commitc19725016df2600a204c9f8447bfcb7dcbdb128a
treedbfdbb1ecfd63c7f4180cb9779abd419fbd1ec8c
parentf8e554021b7de4bf1150f64d047091b429c92b39
internal/reflectlite: include Kind in ValueError message

The implementation has been ported from reflect, but to avoid
introducing a dependency on strconv, Kind.String() falls back to
"invalid" if the Kind is unknown rather than "kind" + strconv.Itoa(int(k))

Fixes #39286

Change-Id: I82277242a6c41d0146dabd9d20339fe72d562500
Reviewed-on: https://go-review.googlesource.com/c/go/+/235522
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
src/internal/reflectlite/type.go
src/internal/reflectlite/value.go