go env GOMOD - gives the path to the go.mod in use in module mode, and is empty otherwise (i.e. GOPATH mode)
On Mon, 9 Dec 2019, 00:25 Dan Kortschak, <d...@kortschak.io> wrote: > Is there a way to query whether an invocation of the go command would > be running in module mode? > > thanks > Dan > > -- > 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/c0c406db898a66fb1fe2638242922512315ff190.camel%40kortschak.io > . > -- 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/CACoUkn7agQLeSYzqGuVX_68gmizpC2Ckd2PMW7i4W_ufc5isiQ%40mail.gmail.com.