1
0
mirror of https://github.com/golang/go synced 2024-11-26 08:58:09 -07:00

encoding/asn1: fix doc for BitString.At's return value

Fixes #53287

Change-Id: If983ae34850d9b1b29764156a38628fa53897573
Reviewed-on: https://go-review.googlesource.com/c/go/+/411134
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: hopehook <hopehook@golangcn.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: hopehook <hopehook@golangcn.org>
Reviewed-by: Subham <sarkar.subhams2@gmail.com>
This commit is contained in:
RenKanai 2022-06-09 01:42:26 +09:00 committed by Rob Pike
parent ec2ea40b31
commit 202b7e7e76

View File

@ -162,7 +162,7 @@ type BitString struct {
}
// At returns the bit at the given index. If the index is out of range it
// returns false.
// returns 0.
func (b BitString) At(i int) int {
if i < 0 || i >= b.BitLength {
return 0