package tailfile

import "github.com/docker/cli/components/engine/pkg/tailfile"

Package tailfile provides helper functions to read the nth lines of any ReadSeeker.

Index

Variables

var ErrNonPositiveLinesNumber = errors.New("The number of lines to extract from the file must be positive")

ErrNonPositiveLinesNumber is an error returned if the lines number was negative.

Functions

func TailFile

func TailFile(f io.ReadSeeker, n int) ([][]byte, error)

TailFile returns last n lines of reader f (could be a fil).

Source Files

tailfile.go

Version
v17.11.0-ce+incompatible
Published
Nov 20, 2017
Platform
js/wasm
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.