podman/test/tools/vendor/github.com/nxadm/tail
Paul Holzinger c7827957a4
ginkgo: restructure install work flow
- move the ginkgo deps into test/tools which is more consitent with the
  other tools there, listing in dependencies always causes errors with
  linters
- do not install it globally on the system, instead we use it in a
  subdir of this project

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-25 14:41:43 +01:00
..
ratelimiter ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
util ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
watch ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
winfile ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
.gitignore ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
CHANGES.md ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
Dockerfile ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
LICENSE ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
README.md ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
tail.go ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
tail_posix.go ginkgo: restructure install work flow 2022-11-25 14:41:43 +01:00
tail_windows.go ginkgo: restructure install work flow 2022-11-25 14:41:43 +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.