tail

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	Lines     int `flag:"" desc:"Number of lines to show"`
	Bytes     int `flag:"" desc:"Number of bytes to show"`
	LinesFlag bool
	BytesFlag bool
	Follow    bool `flag:"" desc:"Follow file updates in real-time"`
	XML       bool
	JSON      bool
	Plain     bool
	Pretty    bool
}

type TailError

type TailError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
	Path    string   `xml:"path,attr"`
}

type TailFile

type TailFile struct {
	XMLName        xml.Name `xml:"file"`
	Path           string   `xml:"path,attr"`
	LinesRequested int      `xml:"lines_requested,attr"`
	BytesRequested int      `xml:"bytes_requested,attr"`
	LinesReturned  int      `xml:"lines_returned,attr"`
	BytesReturned  int      `xml:"bytes_returned,attr"`
	FileTotalLines int      `xml:"file_total_lines,attr"`
	FileTotalBytes int64    `xml:"file_total_bytes,attr"`
	Truncated      string   `xml:"truncated,attr"`
	Content        string   `xml:"content,omitempty"`
	Language       string   `xml:"language,attr"`
	MIME           string   `xml:"mime,attr"`
}

type TailResult

type TailResult struct {
	XMLName        xml.Name    `xml:"tail"`
	Path           string      `xml:"path,attr"`
	Absolute       string      `xml:"absolute,attr"`
	LinesRequested int         `xml:"lines_requested,attr"`
	BytesRequested int         `xml:"bytes_requested,attr"`
	LinesReturned  int         `xml:"lines_returned,attr"`
	BytesReturned  int         `xml:"bytes_returned,attr"`
	FileTotalLines int         `xml:"file_total_lines,attr"`
	FileTotalBytes int64       `xml:"file_total_bytes,attr"`
	Truncated      string      `xml:"truncated,attr"`
	Language       string      `xml:"language,attr"`
	MIME           string      `xml:"mime,attr"`
	Content        string      `xml:"content,omitempty"`
	Files          []TailFile  `xml:"file,omitempty"`
	Timestamp      int64       `xml:"timestamp,attr"`
	Errors         []TailError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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