hpcloud / tail

Go package for reading from continously updated files (tail -f)
MIT License
2.7k stars 502 forks source link

error trying example #142

Open mrcomac opened 6 years ago

mrcomac commented 6 years ago

when I trie the code bellow:

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

I got the error:

# github.com/ActiveState/tail
/usr/lib/go-1.10/src/github.com/ActiveState/tail/tail.go:195:45: cannot use &tail.Tomb (type *"github.com/ActiveState/tail/vendor/gopkg.in/tomb.v1".Tomb) as type *"github.com/hpcloud/tail/vendor/gopkg.in/tomb.v1".Tomb in argument to tail.watcher.BlockUntilExists
/usr/lib/go-1.10/src/github.com/ActiveState/tail/tail.go:343:49: cannot use &tail.Tomb (type *"github.com/ActiveState/tail/vendor/gopkg.in/tomb.v1".Tomb) as type *"github.com/hpcloud/tail/vendor/gopkg.in/tomb.v1".Tomb in argument to tail.watcher.ChangeEvents

golang version: go version go1.10.1 linux/amd64