commit | 0c43e98dfe3f41a99362fa041990a047da508eee | [log] [tgz] |
---|---|---|
author | Nigel Tao <nigeltao@golang.org> | Sat Apr 23 12:17:41 2016 +1000 |
committer | Nigel Tao <nigeltao@golang.org> | Sat Apr 23 12:17:41 2016 +1000 |
tree | 86464617753d99aff159a62779c3ec55d283e753 | |
parent | 62bb72da9a2bbb2139731f3da2659852bd15df18 [diff] |
Add comment that dst and src must not overlap.
diff --git a/encode.go b/encode.go index 25c64c2..77eb280 100644 --- a/encode.go +++ b/encode.go
@@ -25,7 +25,7 @@ // slice of dst if dst was large enough to hold the entire encoded block. // Otherwise, a newly allocated slice will be returned. // -// It is valid to pass a nil dst. +// The dst and src must not overlap. It is valid to pass a nil dst. func Encode(dst, src []byte) []byte { if n := MaxEncodedLen(len(src)); n < 0 { panic(ErrTooLarge)