diff options
| author | 2025-11-19 08:00:00 +0800 | |
|---|---|---|
| committer | 2025-11-19 08:00:00 +0800 | |
| commit | ed0a113f034aa42aea23471c4bc0d7af159b7002 (patch) | |
| tree | 7e828011b9e213499ce382eb17e2552da6e48de4 /loose.go | |
| parent | Remove some redundant code (diff) | |
| signature | No signature | |
Probably should name the custom packages specially
Diffstat (limited to 'loose.go')
| -rw-r--r-- | loose.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,7 +2,7 @@ package furgit import ( "bytes" - stdzlib "compress/zlib" + "compress/zlib" "fmt" "io" "os" @@ -10,7 +10,7 @@ import ( "strconv" "git.sr.ht/~runxiyu/furgit/internal/bufpool" - "git.sr.ht/~runxiyu/furgit/internal/zlib" + "git.sr.ht/~runxiyu/furgit/internal/zlibx" ) const looseHeaderLimit = 4096 @@ -54,7 +54,7 @@ func (repo *Repository) looseReadTyped(id Hash) (ObjectType, bufpool.Buffer, err return ObjectTypeInvalid, bufpool.Buffer{}, err } - raw, err := zlib.Decompress(compressed) + raw, err := zlibx.Decompress(compressed) if err != nil { return ObjectTypeInvalid, bufpool.Buffer{}, err } @@ -104,7 +104,7 @@ func (repo *Repository) looseTypeSize(id Hash) (ObjectType, int64, error) { } defer func() { _ = f.Close() }() - zr, err := stdzlib.NewReader(f) + zr, err := zlib.NewReader(f) if err != nil { return ObjectTypeInvalid, 0, err } @@ -211,7 +211,7 @@ func (repo *Repository) WriteLooseObject(obj Object) (Hash, error) { } var buf bytes.Buffer - zw := stdzlib.NewWriter(&buf) + zw := zlib.NewWriter(&buf) if _, err := zw.Write(raw); err != nil { return Hash{}, err } |
