diff options
Diffstat (limited to 'src/pkg/bytes/bytes.go')
-rw-r--r-- | src/pkg/bytes/bytes.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go index e94a0ec5c..7d1426fb4 100644 --- a/src/pkg/bytes/bytes.go +++ b/src/pkg/bytes/bytes.go @@ -13,6 +13,7 @@ import ( // Compare returns an integer comparing the two byte arrays lexicographically. // The result will be 0 if a==b, -1 if a < b, and +1 if a > b +// A nil argument is equivalent to an empty slice. func Compare(a, b []byte) int { m := len(a) if m > len(b) { @@ -37,6 +38,7 @@ func Compare(a, b []byte) int { } // Equal returns a boolean reporting whether a == b. +// A nil argument is equivalent to an empty slice. func Equal(a, b []byte) bool func equalPortable(a, b []byte) bool { |