diff options
| author | 2026-03-05 21:17:08 +0800 | |
|---|---|---|
| committer | 2026-03-05 21:17:08 +0800 | |
| commit | 77d651d2fcef14a55d21649435bb02836fbc3415 (patch) | |
| tree | 36663447db71560f908bf43c97b0ad8ca9c1bbf7 /internal/compress/flate/token.go | |
| parent | internal/compress/zlib: Check errors properly and prettify (diff) | |
| signature | No signature | |
*: Prettify
Diffstat (limited to 'internal/compress/flate/token.go')
| -rw-r--r-- | internal/compress/flate/token.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/compress/flate/token.go b/internal/compress/flate/token.go index d818790c..40fa9454 100644 --- a/internal/compress/flate/token.go +++ b/internal/compress/flate/token.go @@ -320,7 +320,7 @@ func (t *tokens) Slice() []token { // VarInt returns the tokens as varint encoded bytes. func (t *tokens) VarInt() []byte { - var b = make([]byte, binary.MaxVarintLen32*int(t.n)) + b := make([]byte, binary.MaxVarintLen32*int(t.n)) var off int for _, v := range t.tokens[:t.n] { off += binary.PutUvarint(b[off:], uint64(v)) @@ -331,7 +331,7 @@ func (t *tokens) VarInt() []byte { // FromVarInt restores t to the varint encoded tokens provided. // Any data in t is removed. func (t *tokens) FromVarInt(b []byte) error { - var buf = bytes.NewReader(b) + buf := bytes.NewReader(b) var toks []token for { r, err := binary.ReadUvarint(buf) |
