Hi Farid, If I understood your question correctly, you can play with build flags. Alternatively, you can add a "-diagnostics" flag.
Consider also design-by-contract with contracts tested at run time (e.g., we use our own implementation https://github.com/Parquery/gocontracts; see also other implementations in the readme). Le mer. 10 juil. 2019 à 03:35, <farid.m.zaka...@gmail.com> a écrit : > We've written some diagnostic tests that we execute during the test phase > (go test) however I was wondering if there's an established > pattern for how to include tests in the final binary and execute them > afterwards. > > The analogous version in Java would be that you could create a "test JAR" > which contains the test classes and execute an XUnit framework (JUnit) > programmatically yourself run the tests. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1441787d-eb2b-479e-821c-934694fbe6b7%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/1441787d-eb2b-479e-821c-934694fbe6b7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGu4bVCbqzAuSCDeDQazgPOB52XcOYuDww7%3DkzQxQ1HtnHKBWQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.