Adding a Command to a Beat

I am wondering what is the preferred method to add a command (or subcommand) to a Beat. The Beat was created from scratch using the instructions in the Beats Developer Guide. The issue I am having is that Cobra library used by libbeat is located under {beat root}/vendor/github.com/elastic/beats/vendor/github.com/spf13/cobra and the library is not available to the Beat. My solution was to move spf13/cobra from the libbeat vendor directory tree to the beat vendor directory tree, but this seems messy at best. If there a better way to do this?

I suggest you use govendor to handle your dependencies: https://github.com/kardianos/govendor
You can add and remove dependencies as you need: https://github.com/kardianos/govendor/blob/master/doc/faq.md

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.