1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2024-12-28 16:00:22 +00:00
ceph-csi/vendor/github.com/nxadm/tail
Madhu Rajanna fb7dc13dfe rebase: update packages in go.mod to latest releases
updated few packages in go.mod to latest
available release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-06-04 11:52:22 +00:00
..
ratelimiter rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
util rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
watch rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
winfile rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
.gitignore rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
CHANGES.md rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
Dockerfile rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
go.mod rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
go.sum rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
LICENSE rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
README.md rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
tail_posix.go rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
tail_windows.go rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00
tail.go rebase: update packages in go.mod to latest releases 2021-06-04 11:52:22 +00:00

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.