Skip to content

Commit

Permalink
document Decode to short buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Oct 16, 2024
1 parent fb7a3ae commit e88388a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base64.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e88388a

Please sign in to comment.