ARO-RP/vendor/github.com/nxadm/tail
darthhexx 1c4e98933e Vendor installer release 4.10
Switches to go.1.17, OCP 4.10, and Kubernetes 1.23 modules.
2022-05-25 14:49:12 +10:00
..
ratelimiter Update ginkgo, gomega, and mock dependencies 2020-08-03 14:23:54 +10:00
util Update vendoring 2021-02-17 13:34:36 +01:00
watch Update vendoring 2021-02-17 13:34:36 +01:00
winfile Update vendoring 2021-02-17 13:34:36 +01:00
.gitignore vendor 2021-01-19 10:08:04 -06:00
CHANGES.md Update vendoring 2021-02-17 13:34:36 +01:00
Dockerfile move to go.mod, add deps.go, upgrade dependencies, vendor 2020-11-06 11:35:56 -06:00
LICENSE Update ginkgo, gomega, and mock dependencies 2020-08-03 14:23:54 +10:00
README.md Update vendoring 2021-02-17 13:34:36 +01:00
tail.go Update vendoring 2021-02-17 13:34:36 +01:00
tail_posix.go Update vendoring 2021-02-17 13:34:36 +01:00
tail_windows.go Update vendoring 2021-02-17 13:34:36 +01:00

README.md

ciGo Reference

tail functionality in Go

nxadm/tail provides a Go library that emulates the features of the BSD tail program. The library comes with full support for truncation/move detection as it is designed to work with log rotation tools. The library works on all operating systems supported by Go, including POSIX systems like Linux and *BSD, and MS Windows. Go 1.9 is the oldest compiler release supported.

A simple example:

// Create a tail
t, err := tail.TailFile(
	"/var/log/nginx.log", tail.Config{Follow: true, ReOpen: true})
if err != nil {
    panic(err)
}

// Print the text of each received line
for line := range t.Lines {
    fmt.Println(line.Text)
}

See API documentation.

Installing

go get github.com/nxadm/tail/...

History

This project is an active, drop-in replacement for the abandoned Go tail library at hpcloud. Next to addressing open issues/PRs of the original project, nxadm/tail continues the development by keeping up to date with the Go toolchain (e.g. go modules) and dependencies, completing the documentation, adding features and fixing bugs.

Examples

Examples, e.g. used to debug an issue, are kept in the examples directory.