Skip to content

Commit

Permalink
修改升级为 GO MOD 模式
Browse files Browse the repository at this point in the history
  • Loading branch information
issueye committed Mar 22, 2023
1 parent a1dbeea commit 2ce4fa4
Show file tree
Hide file tree
Showing 31 changed files with 39 additions and 2,360 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ matrix:
- go: tip

install:
- go get gopkg.in/fsnotify/fsnotify.v1
- go get github.com/fsnotify/fsnotify
- go get gopkg.in/tomb.v1
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* 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/issueye/tail/issues/57) related to reopen deleted file

## July, 2015

Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/issueye/tail/
ADD . $GOPATH/src/github.com/issueye/tail/

# expecting to fetch dependencies successfully.
RUN go get -v github.com/hpcloud/tail
RUN go get -v github.com/issueye/tail

# expecting to run the test successfully.
RUN go test -v github.com/hpcloud/tail
RUN go test -v github.com/issueye/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/issueye/tail
RUN go install -v github.com/issueye/tail/cmd/gotail

RUN $GOPATH/bin/gotail -h || true

Expand Down
2 changes: 1 addition & 1 deletion Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
[![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)

# Go package for tail-ing files

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

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

See [API documentation](http://godoc.org/github.com/hpcloud/tail).

## 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](https://github.com/hpcloud/tail/labels/Windows) for full Windows support.
## 升级为GO MOD 模式
2 changes: 1 addition & 1 deletion cmd/gotail/gotail.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"os"

"github.com/hpcloud/tail"
"github.com/issueye/tail"
)

func args2config() (tail.Config, int64) {
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/issueye/tail

go 1.19

require (
github.com/fsnotify/fsnotify v1.6.0
gopkg.in/tomb.v1 v1.0.0-20140529071818-c131134a1947
)

require golang.org/x/sys v0.0.0-20220908164124-27713097b956 // indirect
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
golang.org/x/sys v0.0.0-20220908164124-27713097b956 h1:XeJjHH1KiLpKGb6lvMiksZ9l0fVUh+AmGcm0nOMEBOY=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/tomb.v1 v1.0.0-20140529071818-c131134a1947 h1:aNEcl02ps/eZaBJi2LycKl0jPsUryySSSgrCxieZRYA=
gopkg.in/tomb.v1 v1.0.0-20140529071818-c131134a1947/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
6 changes: 3 additions & 3 deletions tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"sync"
"time"

"github.com/hpcloud/tail/ratelimiter"
"github.com/hpcloud/tail/util"
"github.com/hpcloud/tail/watch"
"github.com/issueye/tail/ratelimiter"
"github.com/issueye/tail/util"
"github.com/issueye/tail/watch"
"gopkg.in/tomb.v1"
)

Expand Down
4 changes: 2 additions & 2 deletions tail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"testing"
"time"

"github.com/hpcloud/tail/ratelimiter"
"github.com/hpcloud/tail/watch"
"github.com/issueye/tail/ratelimiter"
"github.com/issueye/tail/watch"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion tail_windows.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//go:build windows
// +build windows

package tail

import (
"github.com/hpcloud/tail/winfile"
"github.com/issueye/tail/winfile"
"os"
)

Expand Down
6 changes: 0 additions & 6 deletions vendor/gopkg.in/fsnotify/fsnotify.v1/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions vendor/gopkg.in/fsnotify/fsnotify.v1/.travis.yml

This file was deleted.

34 changes: 0 additions & 34 deletions vendor/gopkg.in/fsnotify/fsnotify.v1/AUTHORS

This file was deleted.

Loading

0 comments on commit 2ce4fa4

Please sign in to comment.