Movatterモバイル変換


[0]ホーム

URL:


sync

package
v5.16.4Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2025 License:Apache-2.0Imports:5Imported by:20

Details

Repository

github.com/go-git/go-git

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcGetBufioReader

func GetBufioReader(readerio.Reader) *bufio.Reader

GetBufioReader returns a *bufio.Reader that is managed by a sync.Pool.Returns a bufio.Reader that is reset with reader and ready for use.

After use, the *bufio.Reader should be put back into the sync.Poolby calling PutBufioReader.

funcGetByteSlice

func GetByteSlice() *[]byte

GetByteSlice returns a *[]byte that is managed by a sync.Pool.The initial slice length will be 16384 (16kb).

After use, the *[]byte should be put back into the sync.Poolby calling PutByteSlice.

funcGetBytesBuffer

func GetBytesBuffer() *bytes.Buffer

GetBytesBuffer returns a *bytes.Buffer that is managed by a sync.Pool.Returns a buffer that is reset and ready for use.

After use, the *bytes.Buffer should be put back into the sync.Poolby calling PutBytesBuffer.

funcGetZlibWriter

func GetZlibWriter(wio.Writer) *zlib.Writer

GetZlibWriter returns a *zlib.Writer that is managed by a sync.Pool.Returns a writer that is reset with w and ready for use.

After use, the *zlib.Writer should be put back into the sync.Poolby calling PutZlibWriter.

funcPutBufioReader

func PutBufioReader(reader *bufio.Reader)

PutBufioReader puts reader back into its sync.Pool.

funcPutByteSlice

func PutByteSlice(buf *[]byte)

PutByteSlice puts buf back into its sync.Pool.

funcPutBytesBuffer

func PutBytesBuffer(buf *bytes.Buffer)

PutBytesBuffer puts buf back into its sync.Pool.

funcPutZlibReader

func PutZlibReader(zZLibReader)

PutZlibReader puts z back into its sync.Pool, first closing the reader.The Byte slice dictionary is also put back into its sync.Pool.

funcPutZlibWriter

func PutZlibWriter(w *zlib.Writer)

PutZlibWriter puts w back into its sync.Pool.

Types

typeZLibReader

type ZLibReader struct {Reader zlibReadCloser// contains filtered or unexported fields}

funcGetZlibReader

func GetZlibReader(rio.Reader) (ZLibReader,error)

GetZlibReader returns a ZLibReader that is managed by a sync.Pool.Returns a ZLibReader that is reset using a dictionary that isalso managed by a sync.Pool.

After use, the ZLibReader should be put back into the sync.Poolby calling PutZlibReader.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp