Hi
I want to detect if the binary is built with “-H windowsgui”, so it should proceed with GUI, otherwise the console logic will be proceeded.
So I can handle GUI and CLI logic of my app in one place (that works good on Linux and Darwin) and I can built it twice for windows:
go build -ldflags="-H windowsgui" -o myapp.exe
go build -o myapp-cli.exe
Please help me