lines

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxMsgSize = 1024 * 128 // 128 KiB

MaxMsgSize establishes the threshold to flush the buffer when using the `Send` function. It's a variable instead of a constant to make it easier to override in tests.

Functions

func CopyAndAppend

func CopyAndAppend(s [][]byte, e []byte) ([][]byte, int)

CopyAndAppend adds a newly allocated copy of `e` to the `s` slice. Useful to avoid io buffer shennanigans

func Send

func Send(r io.Reader, sender Sender) error

Send reads from `r` and handles the buffered lines using `sender`

Types

type Sender

type Sender func([][]byte) error

Sender handles a buffer of lines from a Git command

Jump to

Keyboard shortcuts

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