Signed and notarized Go app not launching after Gatekeeper dialog
As explained by James Turner, Gatekeeper adds some weird arguments that cause, in my case, the argument parsing lib to exit with error.
Here is a possible fix for your Go programs:
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)