From e88388ab9698cf7e4003df8d5c8756e5f0937a64 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Wed, 16 Oct 2024 18:03:42 +0800 Subject: [PATCH] document Decode to short buffer --- base64.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base64.go b/base64.go index d53e095..8e60c0f 100644 --- a/base64.go +++ b/base64.go @@ -625,7 +625,8 @@ func decodeGeneric(enc *Encoding, dst, src []byte) (n int, err error) { // Decode decodes src using the encoding enc. It writes at most // [Encoding.DecodedLen](len(src)) bytes to dst and returns the number of bytes -// written. If src contains invalid base64 data, it will return the +// written. The caller must ensure that dst is large enough to hold all +// the decoded data. If src contains invalid base64 data, it will return the // number of bytes successfully written and [CorruptInputError]. // New line characters (\r and \n) are ignored. func (enc *Encoding) Decode(dst, src []byte) (int, error) {