Build telegraf in Windows

Build telegraf in Windows

Can someone please explain how to build telegraf.exe for windows. I wrote a new plugin and I am stuck trying to build it for windows. Plugin is working in linux and macOS

GOOS=windows go build ./cmd/telegraf should do it

Above command can be used in Linux / Mac to build telegraf.exe for Windows. Can someone please confirm whether it is possible to build Telegraf on Windows? (This is just for curiosity, because I tried and couldn’t build on Telegraf on Windows while the above command and the generated exe works perfectly.)

Yes, Telegraf does build on Windows, we do it on each commit using Appveyor and I also do it often for development. Check the top level appveyor.yml file in the repo for the exact commands.