mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
encoding/pem: clarify Decode only works on lines
Fixes #53524 Change-Id: I929ee3c055c3ca564cd6cc374124f493aea2fbf6 Reviewed-on: https://go-review.googlesource.com/c/go/+/421636 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
6f90ae3623
commit
2e6cbab1c8
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ var colon = []byte(":")
|
|||
// Decode will find the next PEM formatted block (certificate, private key
|
||||
// etc) in the input. It returns that block and the remainder of the input. If
|
||||
// no PEM data is found, p is nil and the whole of the input is returned in
|
||||
// rest.
|
||||
// rest. Blocks must start at the beginning of a line and end at the end of a line.
|
||||
func Decode(data []byte) (p *Block, rest []byte) {
|
||||
// pemStart begins with a newline. However, at the very beginning of
|
||||
// the byte array, we'll accept the start string without it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue