MCPcopy Index your code
hub / github.com/hpcloud/tail

github.com/hpcloud/tail @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
132 symbols 383 edges 16 files 37 documented · 28% 6 cross-repo links updated 3y ago★ 2,78352 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status Build status

Go package for tail-ing files

A Go package striving to emulate the features of the BSD tail program.

t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
for line := range t.Lines {
    fmt.Println(line.Text)
}

See API documentation.

Log rotation

Tail comes with full support for truncation/move detection as it is designed to work with log rotation tools.

Installing

go get github.com/hpcloud/tail/...

Windows support

This package needs assistance for full Windows support.

Extension points exported contracts — how you extend this code

FileWatcher (Interface)
FileWatcher monitors file-level events. [2 implementers]
watch/watch.go
Storage (Interface)
(no doc) [1 implementers]
ratelimiter/storage.go

Core symbols most depended-on inside this repo

Fatal
called by 16
tail.go
Pour
called by 10
ratelimiter/leakybucket.go
Printf
called by 9
tail.go
Fatalf
called by 7
tail.go
TailFile
called by 6
tail.go
Stop
called by 5
tail.go
isCreate
called by 5
watch/inotify_tracker.go
Println
called by 4
tail.go

Shape

Method 58
Function 57
Struct 14
Interface 3

Languages

Go100%

Modules by API surface

tail_test.go36 symbols
tail.go30 symbols
watch/inotify_tracker.go15 symbols
ratelimiter/leakybucket.go10 symbols
watch/filechanges.go6 symbols
watch/polling.go5 symbols
ratelimiter/memory.go5 symbols
winfile/winfile.go4 symbols
watch/inotify.go4 symbols
watch/watch.go3 symbols
util/util.go3 symbols
ratelimiter/storage.go3 symbols

For agents

$ claude mcp add tail \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact