pktline

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(pkt []byte) []byte

Data returns the packet pkt without its length header. The length header is not validated. Returns an empty slice when pkt is a magic packet such as '0000'.

func IsFlush

func IsFlush(pkt []byte) bool

IsFlush detects the special flush packet '0000'

func NewScanner

func NewScanner(r io.Reader) *bufio.Scanner

NewScanner returns a bufio.Scanner that splits on Git pktline boundaries

func WriteDelim added in v0.125.0

func WriteDelim(w io.Writer) error

WriteDelim writes a pkt delim packet.

func WriteFlush

func WriteFlush(w io.Writer) error

WriteFlush writes a pkt flush packet.

func WriteString

func WriteString(w io.Writer, str string) (int, error)

WriteString writes a string with pkt-line framing

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL