Get started by making sure the contents of the vendored beats folder is
pushed to a remote repository. Otherwise, go will overwrite the folder
with the selected revision of
The following command will initialize a new module in your repo.
go mod init
Make sure to add the approprite
replace directives from the
of Beats: https://github.com/elastic/beats/tree/master/go.mod
Unfortunately, this workaround is needed to make sure your Beat can be compiled.
To depend on the latest
github.com/elastic/beats run the following command:
go get github.com/elastic/beats@master
To move the dependencies to vendor, you need to manually fetch the new
magefile.go for newly generated Beats from the dev-tools of
We suggest you read the following section to learn about maintaining dependencies using go modules: * How to upgrade and downgrade dependencies