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.12.1-ce+incompatible
Published
Feb 27, 2018
Platform
darwin/amd64
Imports
4 packages
Last checked
9 minutes ago

Tools for package owners.