buffer
Package buffer provides Node Buffer-style helpers for byte slices.
import "github.com/sahilkhaire/gox/buffer"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Compare | buf.compare(other) | func | Compare compares two buffers lexicographically (Buffer.compare). |
| Equals | buf.equals(other) | func | Equals reports whether a and b are equal (timing-safe enough for content equality). |
Types
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Buffer | — | type | Buffer is a byte slice with helper methods. |
Methods
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Buffer.Concat | Buffer.concat(list) | method | Concat joins buffers (Buffer.concat). |
| Buffer.From | Buffer.from(data) | method | From allocates a copy of data (Buffer.from). |
| Buffer.FromString | Buffer.from(str) | method | FromString creates a buffer from a string. |