Skip to content

error trying example #142

@mrcomac

Description

@mrcomac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions