diff --git a/CHANGES.md b/CHANGES.md index 422790c0..cb3ed537 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,16 +1,16 @@ -# API v1 (gopkg.in/hpcloud/tail.v1) +# API v1 (gopkg.in/paulsc/tail.v1) ## April, 2016 * Migrated to godep, as depman is not longer supported * Introduced golang vendoring feature -* Fixed issue [#57](https://github.com/hpcloud/tail/issues/57) related to reopen deleted file +* Fixed issue [#57](https://github.com/paulsc/tail/issues/57) related to reopen deleted file ## July, 2015 * Fix inotify watcher leak; remove `Cleanup` (#51) -# API v0 (gopkg.in/hpcloud/tail.v0) +# API v0 (gopkg.in/paulsc/tail.v0) ## June, 2015 diff --git a/Dockerfile b/Dockerfile index cd297b94..716a09dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,17 @@ FROM golang -RUN mkdir -p $GOPATH/src/github.com/hpcloud/tail/ -ADD . $GOPATH/src/github.com/hpcloud/tail/ +RUN mkdir -p $GOPATH/src/github.com/paulsc/tail/ +ADD . $GOPATH/src/github.com/paulsc/tail/ # expecting to fetch dependencies successfully. -RUN go get -v github.com/hpcloud/tail +RUN go get -v github.com/paulsc/tail # expecting to run the test successfully. -RUN go test -v github.com/hpcloud/tail +RUN go test -v github.com/paulsc/tail # expecting to install successfully -RUN go install -v github.com/hpcloud/tail -RUN go install -v github.com/hpcloud/tail/cmd/gotail +RUN go install -v github.com/paulsc/tail +RUN go install -v github.com/paulsc/tail/cmd/gotail RUN $GOPATH/bin/gotail -h || true diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 904ea805..454bf4ba 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/hpcloud/tail", + "ImportPath": "github.com/paulsc/tail", "GoVersion": "go1.5.1", "Deps": [ { diff --git a/Makefile b/Makefile index 6591b24f..dbb59080 100644 --- a/Makefile +++ b/Makefile @@ -8,4 +8,4 @@ fmt: # Run the test in an isolated environment. fulltest: - docker build -t hpcloud/tail . + docker build -t paulsc/tail . diff --git a/README.md b/README.md index ed8bd9ac..3b55d1a1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -[![Build Status](https://travis-ci.org/hpcloud/tail.svg)](https://travis-ci.org/hpcloud/tail) -[![Build status](https://ci.appveyor.com/api/projects/status/vrl3paf9md0a7bgk/branch/master?svg=true)](https://ci.appveyor.com/project/Nino-K/tail/branch/master) +# Paul's fork + +Also check https://github.com/hpcloud/tail +Also check https://github.com/nxadm/tail # Go package for tail-ing files @@ -12,7 +14,7 @@ for line := range t.Lines { } ``` -See [API documentation](http://godoc.org/github.com/hpcloud/tail). +See [API documentation](http://godoc.org/github.com/paulsc/tail). ## Log rotation @@ -21,8 +23,8 @@ designed to work with log rotation tools. ## Installing - go get github.com/hpcloud/tail/... + go get github.com/paulsc/tail/... ## Windows support -This package [needs assistance](https://github.com/hpcloud/tail/labels/Windows) for full Windows support. +This package [needs assistance](https://github.com/paulsc/tail/labels/Windows) for full Windows support. diff --git a/appveyor.yml b/appveyor.yml index d370055b..f1f60f95 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ build_script: - SET GOPATH=c:\workspace - go test -v -race ./... test: off -clone_folder: c:\workspace\src\github.com\hpcloud\tail +clone_folder: c:\workspace\src\github.com\paulsc\tail branches: only: - master diff --git a/cmd/gotail/gotail.go b/cmd/gotail/gotail.go index 3da55f23..7d6ec0ac 100644 --- a/cmd/gotail/gotail.go +++ b/cmd/gotail/gotail.go @@ -8,7 +8,7 @@ import ( "fmt" "os" - "github.com/hpcloud/tail" + "github.com/paulsc/tail" ) func args2config() (tail.Config, int64) { diff --git a/tail.go b/tail.go index c99cdaa2..374338eb 100644 --- a/tail.go +++ b/tail.go @@ -15,9 +15,9 @@ import ( "sync" "time" - "github.com/hpcloud/tail/ratelimiter" - "github.com/hpcloud/tail/util" - "github.com/hpcloud/tail/watch" + "github.com/paulsc/tail/ratelimiter" + "github.com/paulsc/tail/util" + "github.com/paulsc/tail/watch" "gopkg.in/tomb.v1" ) @@ -414,7 +414,11 @@ func (tail *Tail) sendLine(line string) bool { } for _, line := range lines { - tail.Lines <- &Line{line, now, nil} + select { + case tail.Lines <- &Line{line, now, nil}: + case <-tail.Dying(): + return true + } } if tail.Config.RateLimiter != nil { diff --git a/tail_test.go b/tail_test.go index 38d6b84b..04624ad4 100644 --- a/tail_test.go +++ b/tail_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "github.com/hpcloud/tail/ratelimiter" - "github.com/hpcloud/tail/watch" + "github.com/paulsc/tail/ratelimiter" + "github.com/paulsc/tail/watch" ) func init() { diff --git a/tail_windows.go b/tail_windows.go index ef2cfca1..bf192884 100644 --- a/tail_windows.go +++ b/tail_windows.go @@ -3,7 +3,7 @@ package tail import ( - "github.com/hpcloud/tail/winfile" + "github.com/paulsc/tail/winfile" "os" ) diff --git a/util/util.go b/util/util.go index 54151fe3..94486b7a 100644 --- a/util/util.go +++ b/util/util.go @@ -18,7 +18,7 @@ var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)} // fatal is like panic except it displays only the current goroutine's stack. func Fatal(format string, v ...interface{}) { - // https://github.com/hpcloud/log/blob/master/log.go#L45 + // https://github.com/paulsc/log/blob/master/log.go#L45 LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack())) os.Exit(1) } diff --git a/watch/inotify.go b/watch/inotify.go index 2bbfe0b6..f74a86fa 100644 --- a/watch/inotify.go +++ b/watch/inotify.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - "github.com/hpcloud/tail/util" + "github.com/paulsc/tail/util" "gopkg.in/fsnotify/fsnotify.v1" "gopkg.in/tomb.v1" diff --git a/watch/inotify_tracker.go b/watch/inotify_tracker.go index 739b3c2a..4fa06f5b 100644 --- a/watch/inotify_tracker.go +++ b/watch/inotify_tracker.go @@ -10,7 +10,7 @@ import ( "sync" "syscall" - "github.com/hpcloud/tail/util" + "github.com/paulsc/tail/util" "gopkg.in/fsnotify/fsnotify.v1" ) diff --git a/watch/polling.go b/watch/polling.go index 49491f21..5a5fd288 100644 --- a/watch/polling.go +++ b/watch/polling.go @@ -8,7 +8,7 @@ import ( "runtime" "time" - "github.com/hpcloud/tail/util" + "github.com/paulsc/tail/util" "gopkg.in/tomb.v1" )