summaryrefslogtreecommitdiff
path: root/vendor/github.com/nxadm/tail/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/nxadm/tail/README.md')
-rw-r--r--vendor/github.com/nxadm/tail/README.md40
1 files changed, 24 insertions, 16 deletions
diff --git a/vendor/github.com/nxadm/tail/README.md b/vendor/github.com/nxadm/tail/README.md
index dbb6c1727..f47939c74 100644
--- a/vendor/github.com/nxadm/tail/README.md
+++ b/vendor/github.com/nxadm/tail/README.md
@@ -1,36 +1,44 @@
-[![Build Status](https://travis-ci.org/nxadm/tail.svg?branch=master)](https://travis-ci.org/nxadm/tail)
+![ci](https://github.com/nxadm/tail/workflows/ci/badge.svg)[![Go Reference](https://pkg.go.dev/badge/github.com/nxadm/tail.svg)](https://pkg.go.dev/github.com/nxadm/tail)
-This is repo is forked from the dormant upstream repo at
-[hpcloud](https://github.com/hpcloud/tail). This fork adds support for go
-modules, updates the dependencies, adds features and fixes bugs. Go 1.9 is
-the oldest compiler release supported.
+# tail functionality in Go
-# Go package for tail-ing files
+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 Go package striving to emulate the features of the BSD `tail` program.
+A simple example:
```Go
-t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
+// 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](http://godoc.org/github.com/nxadm/tail).
-
-## Log rotation
-
-Tail comes with full support for truncation/move detection as it is
-designed to work with log rotation tools.
+See [API documentation](https://pkg.go.dev/github.com/nxadm/tail).
## Installing
go get github.com/nxadm/tail/...
-## Windows support
+## History
+
+This project is an active, drop-in replacement for the
+[abandoned](https://en.wikipedia.org/wiki/HPE_Helion) Go tail library at
+[hpcloud](https://github.com/hpcloud/tail). Next to
+[addressing open issues/PRs of the original project](https://github.com/nxadm/tail/issues/6),
+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.
-This package [needs assistance](https://github.com/nxadm/tail/labels/Windows) for full Windows support.
+## Examples
+Examples, e.g. used to debug an issue, are kept in the [examples directory](/examples). \ No newline at end of file