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
when I trie the code bellow:
I got the error:
golang version: go version go1.10.1 linux/amd64